Re: [PATCH][resend] fs: Add hooks for get_hole_size to generic_block_fiemap

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

 



On Wed, Sep 03, 2014 at 11:52:25AM -0400, Bob Peterson wrote:
> Hi,
> 
> I sent this patch a few weeks back and it didn't receive any comments.
> So I assume it's okay to add upstream?
> 
> The problem:
> If you do a fiemap operation on a very large sparse file, it can take
> an extremely long amount of time (we're talking days here) because
> function __generic_block_fiemap does a block-for-block search when it
> encounters a hole.
> 
> The solution:
> Allow the underlying file system to return the hole size so that function
> __generic_block_fiemap can quickly skip the hole.
> 
> Preamble:
> In cases where the fs-specific block_map() function finds a hole, it
> can return the hole size in b_size. This is efficient because the file
> system doesn't need to figure out block mapping a second time to
> determine the hole size. The patch repurposes the buffer_meta flag
> to tell when the fs-specific block_map() is passing back the hole_size:
> If the fs-specific block_map() doesn't set the buffer_meta bit,

Use of BH_Meta is a bit wierd. Mapping the data blocks of a file and
expecting the return to have the BH_Meta flag set seems, well,
A Little Bit Wrong. We're not short of buffer flags, perhaps adding
a purpose sepcific flag for this?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux