Re: Does data checksumming remain for files with No_COW file attribute?

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

 



Ok, so data checksumming does not remain for newly created empty files with No_COW attribute. I think it's an important trait of Btrfs behavior and should be added to wiki. So that users are informed that disabling CoW on a per-file basis also loses checksum correctness of such file.

24.09.2016, 15:37, "Hugo Mills" <hugo@xxxxxxxxxxxxx>:
> On Sat, Sep 24, 2016 at 03:26:14PM +0300, Alexander Tomokhov wrote:
>>  There is an unanswered question at stackexchange:
>>  http://unix.stackexchange.com/q/303130/41572
>>
>>  Assume that we don't invoke mount options like nodatacow and nodatasum - operate only at file attributes level, which are controlled with lsattr/chattr. So does setting No_COW on a file (chattr +C) imply disabling data checksumming on it? The same way as mount options behave (nodatacow implies nodatasum)? Moreover may it disable checksumming only for newly written extents and keep for reading existing ones?
>
>    Yes, it does imply disabling checksums.
>
>    If you have extents in the file when +C is set, then the flag is
> ignored (even for new extents, as far as I know): you can only
> usefully set +C on a file with no extents.
>
>    So, to use +C, you either need to touch the file first, then set +C
> on it, then open the file and write to it, or you need to have +C set
> on the parent directory.
>
>    Hugo.
>
>>  --
>>  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
>
> --
> Hugo Mills | Comic Sans goes into a bar, and the barman says, "We
> hugo@... carfax.org.uk | don't serve your type here."
> http://carfax.org.uk/ |
> PGP: E2AB1DE4 |
--
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