Re: [PATCH 1/3] lib/ext2fs: Add ext2fs_symlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux