From: "Steve French (IBM LTC)" <smfltc@us.ibm.com>
To: Nathan Scott <nathans@sgi.com>, linux-fsdevel@vger.kernel.org
Subject: Re: quota woes
Date: Wed, 13 Aug 2003 10:50:32 -0500 [thread overview]
Message-ID: <3F3A5E48.8670D4CE@us.ibm.com> (raw)
In-Reply-To: 20030812230532.GB743@frodo
sys_quotactl takes a pathname, which is translated to a superblock. This
would work fine for the many "deviceless" filesystems except that the name is
not translated as it is in most path based calls in the kernel. sys_quotactl
takes the path name (ie parm named special) and simply converts it to a
superblock:
tmp = getname(special);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
bdev = lookup_bdev(tmp);
putname(tmp);
if (IS_ERR(bdev))
return PTR_ERR(bdev);
sb = get_super(bdev);
My suggestion is to allow this to work for more filesystems by falling back on
failure on the above device to sb resolution (or changing the above code) to the
standard way paths are resolved to superblocks in the kernel sys layer. For
example in statfs the name to superblock resolution is done simply by calling:
error = user_path_walk(path, &nd);
then the vfs routine is called with the sb retrieved from above:
vfs_statfs_native(nd.dentry->d_inode->i_sb ...)
This kind of name resolution (using user_path_walk or equivalent) handles a much
wider variety of filesystems than doing the more awkward name to device then
device to superblock.
Note that the routine that dispatches to the filesystem only needs a superblock
(which deviceless and network filesystems can handle) and does not explicitly
need a device number or name:
do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, caddr_t
addr)
I expect that CIFS and AFS and NFSv4 are not the only deviceless filesystems
that could be easily enhanced to transparently send the quota calls to the
proper target server if the above change were made. For the CIFS case,
sending user quota calls to the server (Samba, Windows, Network Attached Storage
appliance) is fairly easy (group quotas for the case of CIFS network protocol
need more investigation).
Nathan Scott wrote:
> > And currently they are
> > validating the device because kernel interface requires a device (at
> > least if we are speaking about standard VFS quota - XFS is a bit
> > different case).
>
> The XFS commands all require block special devices; the one command
> that doesn't is Q_SYNC (one of the standard VFS commands) because
> it can be used to sync all filesystems quota files at once, iirc.
>
> cheers.
>
> --
> Nathan
next prev parent reply other threads:[~2003-08-13 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-10 19:54 quota woes Steve French (IBM LTC)
2003-08-11 1:24 ` Nathan Scott
2003-08-12 12:23 ` Jan Kara
2003-08-12 23:05 ` Nathan Scott
2003-08-13 15:50 ` Steve French (IBM LTC) [this message]
2003-08-13 20:04 ` Stefan (metze) Metzmacher
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=3F3A5E48.8670D4CE@us.ibm.com \
--to=smfltc@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=nathans@sgi.com \
/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.