Re: [PATCH v2] Btrfs: make xattr replace operations atomic

2014-11-07 Thread Filipe David Manana
On Sat, Nov 8, 2014 at 1:26 AM, Robert White wrote: > On 11/07/2014 05:01 PM, Filipe Manana wrote: >> >> V2: Added missing btrfs_mark_buffer_dirty() call for the case where a >> replace >> happens for an item with no other xattrs and the new xattr value size >> is >> the same as the old

Re: [PATCH v2] Btrfs: make xattr replace operations atomic

2014-11-07 Thread Robert White
On 11/07/2014 05:01 PM, Filipe Manana wrote: V2: Added missing btrfs_mark_buffer_dirty() call for the case where a replace happens for an item with no other xattrs and the new xattr value size is the same as the old xattr value size; Made btrfs_search_slot not release the path if i

[PATCH v2] Btrfs: make xattr replace operations atomic

2014-11-07 Thread Filipe Manana
Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the xattr. Xattrs are used to