Hi Lennart,

On 2015-04-08 23:12, Lennart Poettering wrote:
>> --- a/src/journal/journalctl.c
>> > +++ b/src/journal/journalctl.c
>> > @@ -1290,7 +1290,7 @@ static int setup_keys(void) {
>> >          size_t mpk_size, seed_size, state_size, i;
>> >          uint8_t *mpk, *seed, *state;
>> >          ssize_t l;
>> > -        int fd = -1, r;
>> > +        int fd = -1, r, attr = 0;
>> >          sd_id128_t machine, boot;
>> >          char *p = NULL, *k = NULL;
>> >          struct FSSHeader h;
>> > @@ -1385,9 +1385,13 @@ static int setup_keys(void) {
>> >  
>> >          /* Enable secure remove, exclusion from dump, synchronous
>> >           * writing and in-place updating */
>> > -        r = chattr_fd(fd, true, 
>> > FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL);
>> > -        if (r < 0)
>> > -                log_warning_errno(errno, "Failed to set file attributes: 
>> > %m");
>> > +        if (ioctl(fd, FS_IOC_GETFLAGS, &attr) < 0)
>> > +                log_warning_errno(errno, "FS_IOC_GETFLAGS failed: %m");
>> > +
>> > +        attr |= FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL;
>> > +
>> > +        if (ioctl(fd, FS_IOC_SETFLAGS, &attr) < 0)
>> > +                log_warning_errno(errno, "FS_IOC_SETFLAGS failed: %m");
> This is unrelated, and should not be reverted at all.
> 
> Lennart

Ok, this was a my fault to revert this chunk; anyway I would like to know which 
is the purpose of the FS_NOCOW_FL flag here. If I read the code, the file is 
few hundred bytes long, so in BTRFS this would be stored in the metadata chunk, 
and I am not sure if FS_NOCOW_FL is honored at all...


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to