Re: [PATCH v2] Btrfs: don't update atime on RO subvolumes

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

 



On Fri, Jun 15, 2012 at 10:56 AM, Liu Bo <liubo2009@xxxxxxxxxxxxxx> wrote:
>> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>> index f6ab6f5..4d0ceed 100644
>> --- a/fs/btrfs/inode.c
>> +++ b/fs/btrfs/inode.c
>> @@ -4478,6 +4478,11 @@ int btrfs_dirty_inode(struct inode *inode)
>>  static int btrfs_update_time(struct inode *inode, struct timespec *now,
>>                            int flags)
>>  {
>> +     struct btrfs_root *root = BTRFS_I(inode)->root;
>> +
>> +     if (btrfs_root_readonly(root))
>> +             return -EROFS;
>> +
>
>
> It also needs to acquire root->fs_info->subvol_sem, doesn't it?
>
> thanks,
> liubo
>

Normally yes I think. But does it matter at this point? If the flags are
modified at the same time as we access them, wouldn't it be still
random which value (old/new) we get, even with subvol_sem?

(sorry for the double mail Liu...as always forgot Reply All)
--
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