[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-xfs
Subject: Re: [PATCH 5/5] xfstests: test 197,
From: Eric Sandeen <sandeen () sandeen ! net>
Date: 2008-12-31 4:00:17
Message-ID: 495AEE51.9030805 () sandeen ! net
[Download RAW message or body]
Christoph Hellwig wrote:
> Make sure our directory offsets fit into a 32 bit value.
> Based on a report by John Stanley.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
...
> +struct linux_dirent64 {
> + uint64_t d_ino;
> + int64_t d_off;
> + unsigned short d_reclen;
> + unsigned char d_type;
> + char d_name[0];
> +};
...
> + for (bpos = 0; bpos < nread;) {
> + d = (struct linux_dirent64 *) (buf + bpos);
> + /*
> + * Can't use off_t here xfsqa is compiled with
> + * -D_FILE_OFFSET_BITS=64
> + */
> + if (d->d_off != (long)d->d_off) {
So can this test only fail on a 32-bit arch? I haven't paid enough
attention to the original bug... sorry if that's a dumb question. :)
-Eric
> + fprintf(stderr, "detected d_off truncation "
> + "d_name = %s, d_off = %lld\n",
> + d->d_name, (long long)d->d_off);
> + exit(EXIT_FAILURE);
> + }
> + bpos += d->d_reclen;
> + }
> + }
> +
> + exit(EXIT_SUCCESS);
> +}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic