All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Hudec <bulb@ucw.cz>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@ftp.linux.org.uk, akpm@osdl.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/8] VFS: per inode statfs (core)
Date: Thu, 27 Oct 2005 10:07:13 +0200	[thread overview]
Message-ID: <20051027080713.GA25460@djinn> (raw)
In-Reply-To: <E1EUrb7-0001AU-00@dorka.pomaz.szeredi.hu>

[-- Attachment #1: Type: text/plain, Size: 3056 bytes --]

On Wed, Oct 26, 2005 at 22:10:09 +0200, Miklos Szeredi wrote:
> > > > > > > This patch adds a statfs method to inode operations.  This is invoked
> > > > > > > whenever the dentry is available (not called from sys_ustat()) and the
> > > > > > > filesystem implements this method.  Otherwise the normal
> > > > > > > s_op->statfs() will be called.
> > > > > > > 
> > > > > > > This change is backward compatible, but calls to vfs_statfs() should
> > > > > > > be changed to vfs_dentry_statfs() whenever possible.
> > > > > > 
> > > > > > What the fuck for?  statfs() returns data that by definition should
> > > > > > not depend on inode within a filesystem.
> > > > > 
> > > > > Exactly.  But it's specified nowhere that there has to be a one-one
> > > > > mapping between remote filesystem - local filesystem.
> > > > 
> > > > Unfortunately making statfs alone aware of them does not help. Most useful
> > > > tools that use statfs go to /proc/mouts, read all the entries and invoke
> > > > statfs for each path. So if for some non-root path different values are
> > > > returned, these tools won't see them anyway. So try to think about how to
> > > > provide the info about subfilesystems first.
> > > 
> > > 'df .': tried it and it did not do what was expected, but that can
> > > definitely be fixed
> > 
> > It *did* what was expected -- walked back up to the mountpoint and called
> > statfs there.
> 
> Yes, but I didn't expect that it would do that.  Why?  Because I asked
> it for free space in the current directory and not at the mountpoint.
> 
> Since it's not _expecting_ subfilesystems to exist, it's
> understandable that it did not perform well.
> 
> > And it cannot be fixed (without loss of functionality) unless
> > you somehow tell it where the boundary of the subfilesystem lies.
> 
> Of course it can be fixed.  Just always let it do
> statfs(path_supplied_by_user).  If there are no subfses the results
> will be the same.  If there _are_ subfses the results will be more
> meaningful, not less.

Not _without__loss__of__functionality__. Part of the functionality is
looking up the mount-point and other info about the filesystem, which is
no longer correct when subfilesystems are exposed.

> [...]
> > > None of the above examples need (and use) /etc/mtab or /proc/mounts.
> > > 
> > > Just because the info is not available about the placement of the
> > > subfilesystems, doesn't mean that the subfilesystems don't actually
> > > exist.
> > 
> > No, it does not. But it does mean that some applications that should know
> > about them won't know and will give even more confusing results.
> 
> How will they give more confusing results?  Please ellaborate.

I mean specifically the case of df and similar things. So far remote
filesystems generally return obviously invalid results so far. But when
they are made to return correct values for subfilesystem, these tools
need a way to find where those subfilesystems start.

--
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2005-10-27  8:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24 16:55 [PATCH 2/8] VFS: per inode statfs (core) Miklos Szeredi
2005-10-25  4:25 ` Al Viro
2005-10-25  5:44   ` Miklos Szeredi
2005-10-26 17:31     ` Jan Hudec
2005-10-26 19:17       ` Miklos Szeredi
2005-10-26 19:52         ` Jan Hudec
2005-10-26 20:10           ` Miklos Szeredi
2005-10-26 20:15             ` Anton Altaparmakov
2005-10-27  8:07             ` Jan Hudec [this message]
2005-10-27  8:23               ` Miklos Szeredi
2005-10-27 12:35                 ` Trond Myklebust
2005-10-27 12:53                   ` Miklos Szeredi
2005-10-27 18:27                     ` Bryan Henderson
2005-10-27 19:41                       ` Miklos Szeredi
2005-10-27  0:11       ` Bryan Henderson

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=20051027080713.GA25460@djinn \
    --to=bulb@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@ftp.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 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.