Re: [PATCH 2/5] btrfs: Remove dead code

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

 




On  4.12.2017 15:50, David Sterba wrote:
> On Fri, Dec 01, 2017 at 11:19:41AM +0200, Nikolay Borisov wrote:
>> 'clear' is always set to 0 (BTRFS_FEATURE_COMPAT_SAFE_CLEAR,
>> BTRFS_FEATURE_COMPAT_RO_SAFE_CLEAR and BTRFS_FEATURE_INCOMPAT_SAFE_CLEAR are
>> all defined to 0). So remove the code that logically can never execute.
> 
> The point of the macros is to wrap all values that can mean
> "compatibility, safe to clear", similar to BTRFS_FEATURE_COMPAT_RO_SUPP
> etc. So when we have such feature, we'll modify the defines and the rest
> of the code will work.

Fair enough feel free to drop it.

> 
> But with your change the 'safe clear' would have to be patched again. The
> macros provide complete interface, though some of the bits are not used.
> A single line of unused code is IMHO not that significant that we have
> to remove it and silently break the implementation.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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