Re: [PATCH] btrfs: Remove impossible condition from mergable_maps

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

 



On Tue, Jan 08, 2019 at 03:47:13PM +0800, Qu Wenruo wrote:
> On 2019/1/8 下午3:30, Nikolay Borisov wrote:
> > On 7.01.19 г. 21:10 ч., David Sterba wrote:
> >> On Tue, Dec 18, 2018 at 03:10:02PM +0200, Nikolay Borisov wrote:
> >>> We can never have extents marked as EXTENT_MAP_DELALLOC since this
> >>> value is only ever used by btrfs_get_extent_fiemap. In this case the
> >>> extent map is created by btrfs_get_extent_fiemap and is never really
> >>> published, this flag is used to return the corresponding userspace one.
> >>> Considering this, it's pointless having a check for EXTENT_MAP_DELALLOC
> >>> in mergable_maps. Just remove it.
> >>
> >> An assert would be good and a comment at EXTENT_MAP_DELALLOC definition
> >> repeating what's in the changelog. Otherwise ok.
> > 
> > Do we really need the assert though, it's plainly obvious
> > EXTENT_MAP_DELALLOC is only set in a single function?
> 
> IMHO ASSERT() is not for now, but for the future.
> Later on maybe some modification would change when and who sets DELALLOC
> bit.

Agreed, that's exactly the point. We want to catch when DELALLOC is
accidentally found during normal extent merging.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux