From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Darren Hart <dvhart@infradead.org>,
linux-ext4@vger.kernel.org, adilger@dilger.ca,
sgw@linux.intel.com
Subject: Re: [PATCH 1/3] lib/ext2fs: Add ext2fs_symlink
Date: Sat, 5 Jan 2013 17:40:59 -0500 [thread overview]
Message-ID: <20130105224059.GA29789@thunk.org> (raw)
In-Reply-To: <20130105200716.GM20106@blackbox.djwong.org>
On Sat, Jan 05, 2013 at 12:07:16PM -0800, Darrick J. Wong wrote:
> Given that you can have at most one data block anyway, does it matter to set
> EXTENTS_FL?
It doesn't matter either way.
> Also, what happens to the inode + data block if the ext2fs_link fails? I don't
> see any code that explicitly rolls back those allocations, but maybe I missed
> something?
It's fine. We don't actually update the block bitmap, nor update the
block group statistics, until the very end, when the proposed code does this:
*/
if (!fastlink)
ext2fs_block_alloc_stats2(fs, blk, +1);
ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
This is one of the reasons why ext2fs_new_block and ext2fs_new_inode
don't actually mark the block and inode as in use. You could argue
they are misnamed; something like ext2fs_find_unused_{block,inode}()
would have been better names, but what I can say? I didn't think of
that back in 1996....
- Ted
next prev parent reply other threads:[~2013-01-05 22:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-04 20:00 [PATCH 0/3 V2] ext2fsprogs: Symlink support Darren Hart
2013-01-04 20:00 ` [PATCH 1/3] lib/ext2fs: Add ext2fs_symlink Darren Hart
2013-01-04 20:00 ` [PATCH 2/3] debugfs: Add symlink command Darren Hart
2013-01-04 20:01 ` [PATCH 3/3] libext2fs: Remove obsolete redefinition of EXT2_FT_DIR Darren Hart
2013-01-05 20:07 ` [PATCH 1/3] lib/ext2fs: Add ext2fs_symlink Darrick J. Wong
2013-01-05 22:40 ` Theodore Ts'o [this message]
2013-01-15 19:17 ` Theodore Ts'o
2013-01-15 19:43 ` Theodore Ts'o
2013-01-15 19:53 ` [PATCH 1/2] debugfs: fix mknod command so that it updates the block group statistics Theodore Ts'o
2013-01-15 19:53 ` [PATCH 2/2] tests: create test for debugfs creating special files Theodore Ts'o
2013-01-19 5:29 ` [PATCH 1/3] lib/ext2fs: Add ext2fs_symlink Darren Hart
2013-01-05 0:15 ` [PATCH 0/3 V2] ext2fsprogs: Symlink support Theodore Ts'o
2013-01-05 0:26 ` Darren Hart
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=20130105224059.GA29789@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=darrick.wong@oracle.com \
--cc=dvhart@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sgw@linux.intel.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).