On Sat, Nov 8, 2014 at 1:26 AM, Robert White <rwhite@xxxxxxxxx> 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 xattr value size; >> Made btrfs_search_slot not release the path if it returns EOVERFLOW >> (from >> split_leaf), so that we can get the current size of the item when >> doing >> the replace and extend the leaf to a size smaller then what we passed >> to >> btrfs_search_slot if the xattr exists in the item (and the new extend >> size >> is new_size - old_size, excluding xattr's name and sizeof struct >> btrfs_dir_item). > > > Stupid Question Here: How does this "replace and extend" affect the whole > copy-on-write paradigm. Aren't you now overwriting the contents of the old > data instead of doing a COW? Btree nodes are always COWed. > > Not a passive-aggressive commentary question, I genuinely don't understand > this piece of code so I am seeking a learning opportunity. > > -- > 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 -- Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men." -- 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
