All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 5/5] xfstests: test 197, add a testcase for d_off truncation
Date: Tue, 30 Dec 2008 22:00:17 -0600	[thread overview]
Message-ID: <495AEE51.9030805@sandeen.net> (raw)
In-Reply-To: <20081230230913.619447000@bombadil.infradead.org>

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

  reply	other threads:[~2008-12-31  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081230230810.986105000@bombadil.infradead.org>
2008-12-30 23:08 ` [PATCH 1/5] xfstests: fix compiler warnings Christoph Hellwig
2008-12-31  1:59   ` Eric Sandeen
2008-12-31  9:30     ` Christoph Hellwig
2008-12-31 12:08     ` Christoph Hellwig
2008-12-30 23:08 ` [PATCH 2/5] xfstests: update for xfs_dinode_core_t removal Christoph Hellwig
2008-12-31  2:08   ` Eric Sandeen
2008-12-30 23:08 ` [PATCH 3/5] xfstests: test 195, add a testcase for the nodump flag Christoph Hellwig
2008-12-31  2:55   ` Eric Sandeen
2008-12-30 23:08 ` [PATCH 4/5] xfstests: test 196, add a testcase for renames across project boundaries Christoph Hellwig
2008-12-31  3:36   ` Eric Sandeen
2008-12-30 23:08 ` [PATCH 5/5] xfstests: test 197, add a testcase for d_off truncation Christoph Hellwig
2008-12-31  4:00   ` Eric Sandeen [this message]
2008-12-31  9:31     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=495AEE51.9030805@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.