On Fri, Feb 22, 2013 at 04:19:27PM -0500, Marios Titas wrote:
> I think that many end users will find all this very confusing. They
> will never expect that renaming a file will cause it to suddenly lose
> one flag (NODATACOW) while preserving the other (NODATASUM).
> Especially since they cannot explicitly control the NODATASUM flag on
> a per file basis. I think that renaming a file should preserve all
> flags no matter if it's done in the same directory or not. Just like
> it preserves permissions, ownership and inode number.

I agree. For completeness, the other inherited flags/attributes are
compression statuses. Silently changing them on remove may be wrong in
case the file gains the 'never try to compress' flag after some clever
heuristic (which we do not have yet) decides so.

> So I think
> inheriting the flags from the parent on rename is not a good idea
> either. Interestingly enough, files don't lose any of the two flags if
> instead of renaming you link and then unlink the original.

Link does not take the same codepath as new file or rename. A new
directory entry is created and link count increased.

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to