From: Eric Sandeen <sandeen@sandeen.net>
To: Brian Foster <bfoster@redhat.com>, Eric Sandeen <sandeen@redhat.com>
Cc: Eryu Guan <eguan@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_repair: fix max block offset test
Date: Fri, 19 Dec 2014 12:54:22 -0600 [thread overview]
Message-ID: <5494745E.60500@sandeen.net> (raw)
In-Reply-To: <20141218151835.GC13471@laptop.bfoster>
On 12/18/14 9:18 AM, Brian Foster wrote:
hought this looked familiar:
>
> http://oss.sgi.com/archives/xfs/2014-09/msg00524.html
>
> Either one is fine with me. If we use the fix below, I think we should
> update the error message since it technically refers to the extent
> offset and we slightly tweak the meaning of the failure.
>
> Brian
Ok, so here's what I wonder about with your patch.
+ if (irec.br_startoff > fs_max_file_offset) {
What if the extent starting logical offset is *at* fs_max_file_offset
(which is sadly in blocks, not bytes, for extra confusion points),
but the extent is 1GB in length?
Isn't this a problem because we've now got files in the block which
are beyond fs_max_file_offset, and probably also beyond sb_maxbytes?
I'm not sure I follow why you feel the message needs to change with
my version:
+ /* Ensure this extent does not extend beyond the max offset */
+ if (irec.br_startoff + irec.br_blockcount - 1 >
+ fs_max_file_offset) {
do_warn(
_("inode %" PRIu64 " - extent offset too large - start %" PRIu64 ", "
"count %" PRIu64 ", offset %" PRIu64 "\n"),
ino, irec.br_startblock, irec.br_blockcount,
irec.br_startoff);
If any (block) offset in the file is beyond the max, then we say the offset is
too large, and give it's physical block, its length, and its starting offset
(granted, the message is a bit *weird* - br_startblock really doesn't matter
here, but I don't think I've fundamentally changed the meaning of the test).
However, I've come to learn that you are almost always right about subtleties
like this, so perhaps you can explain again to me, using smaller words. :)
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-12-19 18:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 17:54 [PATCH] xfs_repair: fix max block offset test Eric Sandeen
2014-12-18 15:18 ` Brian Foster
2014-12-18 16:43 ` Eric Sandeen
2014-12-19 18:54 ` Eric Sandeen [this message]
2014-12-19 20:26 ` Brian Foster
2014-12-19 19:58 ` [PATCH V2] " Eric Sandeen
2014-12-19 20:31 ` Brian Foster
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=5494745E.60500@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bfoster@redhat.com \
--cc=eguan@redhat.com \
--cc=sandeen@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox