linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: Christoph Hellwig <hch@infradead.org>
Cc: Nick Piggin <npiggin@suse.de>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Ulrich Drepper <drepper@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [rfc] new stat*fs-like syscall?
Date: Sat, 26 Jun 2010 21:54:44 +0900	[thread overview]
Message-ID: <13226.1277556884@jrobl> (raw)
In-Reply-To: <20100626093544.GA27715@infradead.org>


Christoph Hellwig:
> That's really job for a pathconf system call that allows quering random
> paramters.

Do you mean it should be implemented such like this?
vfs_pathconf(struct dentry, int parm)
--> return d_sb->s_op->pathconf(parm)

I am afraid it is overdesign because the actual parameter(for FS) is
_PC_LINK_MAX only. All other params are already handled by VFS, glibc or
sb->statfs.


J. R. Okajima

(pathconf(3) parameters from the manual)
       _PC_LINK_MAX
              returns  the  maximum number of links to the file.  If fd or path refer to a direc-
              tory, then the value applies to the whole directory.  The  corresponding  macro  is
              _POSIX_LINK_MAX.

       _PC_MAX_CANON
              returns  the  maximum length of a formatted input line, where fd or path must refer
              to a terminal.  The corresponding macro is _POSIX_MAX_CANON.

       _PC_MAX_INPUT
              returns the maximum length of an input line, where fd or path must refer to a  ter-
              minal.  The corresponding macro is _POSIX_MAX_INPUT.

       _PC_NAME_MAX
              returns  the maximum length of a filename in the directory path or fd that the pro-
              cess is allowed to create.  The corresponding macro is _POSIX_NAME_MAX.

       _PC_PATH_MAX
              returns the maximum length of a relative pathname when path or fd  is  the  current
              working directory.  The corresponding macro is _POSIX_PATH_MAX.

       _PC_PIPE_BUF
              returns the size of the pipe buffer, where fd must refer to a pipe or FIFO and path
              must refer to a FIFO.  The corresponding macro is _POSIX_PIPE_BUF.

       _PC_CHOWN_RESTRICTED
              returns non-zero if the chown(2) call may not be used on this file.  If fd or  path
              refer to a directory, then this applies to all files in that directory.  The corre-
              sponding macro is _POSIX_CHOWN_RESTRICTED.

       _PC_NO_TRUNC
              returns non-zero if accessing filenames longer than  _POSIX_NAME_MAX  generates  an
              error.  The corresponding macro is _POSIX_NO_TRUNC.

       _PC_VDISABLE
              returns  non-zero if special character processing can be disabled, where fd or path
              must refer to a terminal.

  reply	other threads:[~2010-06-26 12:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 13:14 [rfc] new stat*fs-like syscall? Nick Piggin
2010-06-24 14:03 ` Miklos Szeredi
2010-06-24 14:36   ` Nick Piggin
2010-06-24 14:08 ` Andy Lutomirski
2010-06-24 14:18   ` Miklos Szeredi
2010-06-24 14:37     ` Andrew Lutomirski
2010-06-24 14:48       ` Miklos Szeredi
2010-06-25  3:50         ` Nick Piggin
2010-06-24 23:06   ` Andreas Dilger
2010-06-25  6:37     ` Christoph Hellwig
2010-06-24 23:13 ` Andreas Dilger
2010-06-25  4:01   ` Nick Piggin
2010-06-25  4:33     ` Jeff Garzik
2010-06-25 17:47     ` Andreas Dilger
2010-06-25 17:52       ` Ulrich Drepper
2010-06-25 18:16         ` Christoph Hellwig
2010-06-25 18:45           ` Christoph Hellwig
2010-06-25 19:40             ` Ulrich Drepper
2010-06-26  5:53 ` J. R. Okajima
2010-06-26  9:35   ` Christoph Hellwig
2010-06-26 12:54     ` J. R. Okajima [this message]
2010-07-05 20:58       ` Brad Boyer
2010-07-05 23:31         ` J. R. Okajima
2010-07-06  0:45           ` Brad Boyer
2010-07-06 16:45             ` Linus Torvalds
2010-07-07  1:44               ` Christoph Hellwig
2010-07-07  2:28                 ` Linus Torvalds
2010-06-26 14:49     ` Ulrich Drepper
2010-06-26 10:13 ` 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=13226.1277556884@jrobl \
    --to=hooanon05@yahoo.co.jp \
    --cc=drepper@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).