lkml.org 
[lkml]   [2014]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC v2 0/2] vfs / btrfs: add support for ustat()
    On Thu, Jul 17, 2014 at 1:49 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
    > 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.

    Any further advice? I'll submit a v3 for RFC with some small change
    for a fix for stress testing identified by Filipe Manana.

    Luis


    \
     
     \ /
      Last update: 2014-08-15 05:01    [W:5.316 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site