On 11/26/2014 04:28 PM, Roman Mamedov wrote:
On Wed, 26 Nov 2014 16:20:44 -0800
Robert White <rwh...@pobox.com> wrote:
(Trying to clear the NOCOW attribute on a file in BTRFS is _silently_
ignored as invalid. That recursive removal only changed the directories.)
And the chattr command even completes with a zero exit code, this is rather
unexpected.
That's what "silently" means in this context. I didn't pick the result,
and it's not what I would have done. I've got no idea if this was ever
discussed at any length for pros-and-cons. I could make an argument for
the silent result, or against it. Since the attribute is immutable there
really isn't a "nope, that's just not possible dave" errno value to
return that isn't as confusing as just skipping it.
The closest result code would be ENOSUP (operation not supported) but
changing attributes _is_ supported, just not that particular attribute
in that particular circumstance.
Also, the "set attributes" call sets all the attributes at once so there
is no way to say which attribute was rejected. As such, a "do what you
can and let the people check the result" behavior is not at all
unreasonable.
Life is full of flaws. 8-)
--
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