From: Theodore Tso <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 4/5] make extent_goto() deterministic when logical block not found
Date: Thu, 17 Apr 2008 17:14:21 -0400 [thread overview]
Message-ID: <20080417211421.GL3063@mit.edu> (raw)
In-Reply-To: <1207623660-1088-5-git-send-email-sandeen@redhat.com>
On Mon, Apr 07, 2008 at 10:00:59PM -0500, Eric Sandeen wrote:
> Make sure that extent_goto() leaves us at the last extent
> prior to the requested logical block, if the logical block
> requested lands in a hole.
Thanks, applied. You do realize this won't necessarily do the right
thing if the sparse file doesn't have a block mapped at logical block
#0, and you then do an extent_goto() block 0, right? Also, if
extent_get(EXT2_EXTENT_PREV_SIB) fails for various reasons, it still
could be non-deterministic. Code that depends on this may want to do
some sanity checking.
Also, it might be prudent to check the return value here:
> + retval = ext2fs_extent_get(handle,
> + EXT2_EXTENT_PREV_SIB,
> + &extent);
> return EXT2_ET_EXTENT_NOT_FOUND;
and return either the error returned by ext2fs_extent_get, or possibly
invent a new error code, say EXT2_ET_EXTENT_GOTO_BACKUP_FAILED and
return that if retval is non-zero.
I've left this as-is for now but there might be a potential robustness
problem hiding here.
- Ted
next prev parent reply other threads:[~2008-04-17 22:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1207623660-1088-1-git-send-email-sandeen@redhat.com>
2008-04-08 3:00 ` [PATCH 1/5] Fix tst_extents build Eric Sandeen
2008-04-17 20:58 ` Theodore Tso
2008-04-08 3:00 ` [PATCH 2/5] print a bit more info for the tst_extents info command Eric Sandeen
2008-04-17 21:01 ` Theodore Tso
2008-04-08 3:00 ` [PATCH 3/5] fix ext2fs_extent_insert when at last extent in node Eric Sandeen
2008-04-17 21:06 ` Theodore Tso
2008-04-08 3:00 ` [PATCH 4/5] make extent_goto() deterministic when logical block not found Eric Sandeen
2008-04-17 21:14 ` Theodore Tso [this message]
2008-04-08 3:01 ` [PATCH 5/5] Preliminary ext2fs_extent_set_bmap Eric Sandeen
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=20080417211421.GL3063@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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;
as well as URLs for NNTP newsgroup(s).