Linux filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Linux-FSDevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] Apply the umask in VFS optionally (also POSIX ACL kernel infrastructure)
Date: Sun, 4 Aug 2002 15:42:38 +0100	[thread overview]
Message-ID: <20020804154238.A28581@infradead.org> (raw)
In-Reply-To: <200208041546.43303.agruen@suse.de>; from agruen@suse.de on Sun, Aug 04, 2002 at 03:46:43PM +0200

On Sun, Aug 04, 2002 at 03:46:43PM +0200, Andreas Gruenbacher wrote:
> I believe that (2) is the more reasonable choice in this case, so I propose
> this patch, which adds the MS_NOUMASK mount option. The flag is set by the
> file system, if the file system does not want the VFS to apply the umask,
> after which the file system itself is responsible for applying the umask
> where appropriate.

In the current XFS trees we have that flag as IS_POSIXACL() and S_POSIXACL
inod flag. (And I think some of your 2.4 patches do the same).  After some
thinking a per-superblock flag looks best to me, but instead of naming it
MS_NOUMASK I'd really, really prefer MS_POSIXACL.  Rationale:

(1) there is not much other reasoning why we shouldn't apply the umask
(2) this way lowlevel filesystem drivers can enabled/disable acl
    per-mountpoint or even on-the-fly (if remount implements it)

> Finally, I have a question related to this. We had a bug with kernel tasks,
> which don't have a umask associated with them (nfsd in particular). Should
> kernel tasks that create files be required to have a valid fs_struct (which
> includes the umask), or should this be special cased in file systems?

Anything that deals with files shall have a valid fs_struct.  The number
of in-kernel threads that are supposed to deal with files is extremly
low (only in-kernel fileservers like nfsd, tux or the now dead khttpd)
and not worth workarounds in filesystem code.  Not to mention it is much
more elegant.


  reply	other threads:[~2002-08-04 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-04 13:46 [RFC] Apply the umask in VFS optionally (also POSIX ACL kernel infrastructure) Andreas Gruenbacher
2002-08-04 14:42 ` Christoph Hellwig [this message]
2002-08-05 11:41   ` Andreas Gruenbacher
2002-08-05 12:24     ` Christoph Hellwig

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=20020804154238.A28581@infradead.org \
    --to=hch@infradead.org \
    --cc=agruen@suse.de \
    --cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox