Subject: Re: Named attributes

From: David Robinson <[email-masked]>
Date: Tue, 19 Feb 2002 18:26:30 -0600

Spencer Shepler wrote:
 > As other have pointed out to me, this does seem opposite to the
 > regular attributes of a file when it is truncated.  The mode isn't
 > changed with O_TRUNC (unless setuid/setgid is set) or group isn't
 > reset as a result of O_TRUNC.  Should named attributes be removed as a
 > result of O_TRUNC.  Is this behavior exist in operating environments
 > today and if so, which ones?

If the semantics of O_TRUNC on a file with arbitrary named attributes
is to leave them as is, does this mean that in order to recreate a
file the client must explicitly list all available attributes and
delete/reset them?  What if it doesn't grok a named attribute?
Should it delete it or leave it alone?

	-David

---

From: "Dan Trufasiu" <[email-masked]>
Date: Wed, 20 Feb 2002 15:52:28 -0500

I consider that the client has to take care of the extended attributes. The
client has to query about their existence and to create, delete or replace
them when a object is created or overwrote. I consider that named attributes
has to be seen as full part of the process. The client has to consider that
every object can have extended attributes. In this case I consider that the
server doesn't have to do any action and is better to have a note in the
protocol
I don't have inside information into NTFS implementation but from my
investigation it is working like this.

Dan

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of David Robinson
> Sent: Tuesday, February 19, 2002 7:27 PM
> To: [email-masked]
> Subject: Re: Named attributes
>
>
> Spencer Shepler wrote:

---

From: Spencer Shepler <[email-masked]>
Date: Wed, 20 Feb 2002 19:09:00 -0600

> Should it delete it or leave it alone?

Good question and one that applies equally to the local filesystem
case where extended/named attributes are available.  If an application
doesn't understand extended attributes (hasn't been recoded since the
introduction of those extended attribute APIs) it will rely on
O_TRUNCATE as it has before and will be left with the existing
extended attributes.  NFSv4 hasn't made this any worse (maybe).

Okay, I took the cheap way out.

-- 
Spencer