From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
viro@zeniv.linux.org.uk, clm@fb.com, jbacik@fb.com,
linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-kernel@vger.kernel.org, jeffm@suse.com, fdmanana@suse.com
Subject: Re: [RFC v2 0/2] vfs / btrfs: add support for ustat()
Date: Thu, 17 Jul 2014 19:49:40 +0200 [thread overview]
Message-ID: <20140717174940.GR10393@wotan.suse.de> (raw)
In-Reply-To: <20140717080301.GA14263@infradead.org>
On Thu, Jul 17, 2014 at 01:03:01AM -0700, Christoph Hellwig wrote:
> On Wed, Jul 16, 2014 at 02:37:56PM -0700, Luis R. Rodriguez wrote:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >
> > This makes the implementation simpler by stuffing the struct on
> > the driver and just letting the driver iinsert it and remove it
> > onto the sb list. This avoids the kzalloc() completely.
>
> Again, NAK. Make btrfs report the proper anon dev_t in stat and
> everything will just work.
Let's consider this userspace case:
struct stat buf;
struct ustat ubuf;
/* Find a valid device number */
if (stat("/", &buf)) {
fprintf(stderr, "Stat failed: %s\n", strerror(errno));
return 1;
}
/* Call ustat on it */
if (ustat(buf.st_dev, &ubuf)) {
fprintf(stderr, "Ustat failed: %s\n", strerror(errno));
return 1;
}
In the btrfs case it has an inode op for getattr, that is used and we set
the dev to anonymous dev_t. Later ustat will use user_get_super() which
will only be able to work with a userblock if the super block's only
dev_t is assigned to it. Since we have many anonymous to dev_t mapping
to super block though we can't complete the search for btfs and ustat()
fails with -EINVAL. The series expands the number of dev_t's that a super
block can have and allows this search to complete.
Luis
next prev parent reply other threads:[~2014-07-17 17:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 21:37 [RFC v2 0/2] vfs / btrfs: add support for ustat() Luis R. Rodriguez
2014-07-16 21:37 ` [RFC v2 1/2] fs/super.c: add new super block sub devices super_block_dev Luis R. Rodriguez
2014-07-16 21:37 ` [RFC v2 2/2] btrfs: use the new VFS super_block_dev Luis R. Rodriguez
2014-07-17 8:03 ` [RFC v2 0/2] vfs / btrfs: add support for ustat() Christoph Hellwig
2014-07-17 17:49 ` Luis R. Rodriguez [this message]
2014-08-15 2:48 ` Luis R. Rodriguez
2014-08-15 6:28 ` 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=20140717174940.GR10393@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=clm@fb.com \
--cc=fdmanana@suse.com \
--cc=hch@infradead.org \
--cc=jbacik@fb.com \
--cc=jeffm@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--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).