All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
To: l.allegrucci@tiscalinet.it, linux-kernel@vger.kernel.org
Subject: Re: Redundant syscalls?
Date: Fri, 15 Feb 2002 12:17:58 -0600 (CST)	[thread overview]
Message-ID: <200202151817.MAA28366@tomcat.admin.navo.hpc.mil> (raw)
In-Reply-To: <02021517152700.01701@odyssey>

---------  Received message begins Here  ---------

> 
> 
> I was wondering why do we need fsetxattr(2), fgetxattr(2) etc when we 
> already have setxattr(2), getxattr(2) etc working on file names
> instead of file descriptors.
> truncate(2)/ftruncate(2) is another more traditional example.

Atomic actions.

Consider the case of a file that doesn't exist yet. first you
open it, then perform the fsetxattr. If you use the name, then it becomes
possible to rename the file and substitute a different one before the
setxattr. Now, the open file will be missing the attribute(s).
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

  parent reply	other threads:[~2002-02-15 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-15 16:24 Redundant syscalls? Lorenzo Allegrucci
2002-02-15 17:00 ` Doug McNaught
2002-02-15 18:17 ` Jesse Pollard [this message]
     [not found] <02021517152700.01701@odyssey.suse.lists.linux.kernel>
2002-02-15 17:47 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200202151817.MAA28366@tomcat.admin.navo.hpc.mil \
    --to=pollard@tomcat.admin.navo.hpc.mil \
    --cc=l.allegrucci@tiscalinet.it \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.