xfs
[Top] [All Lists]

Re: [PATCH 1/3] xfsprogs: populate fs table with xfs entries first, fore

To: Bill O'Donnell <billodo@xxxxxxxxxx>, linux-xfs@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/3] xfsprogs: populate fs table with xfs entries first, foreign entries last
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 14 Sep 2016 14:54:27 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <b49366ac-d277-a26f-1936-8e736d1c913c@xxxxxxxxxxx>
References: <1473866381-28975-1-git-send-email-billodo@xxxxxxxxxx> <1473866381-28975-2-git-send-email-billodo@xxxxxxxxxx> <b49366ac-d277-a26f-1936-8e736d1c913c@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
On 9/14/16 12:50 PM, Eric Sandeen wrote:
>> @@ -113,8 +119,13 @@ path_f(
> Oops, I mentioned this to you as needed, but it's wrong, sorry.
> 
> Just drop this hunk, this is supposed to select path i, not iterate
> over anything.  Sorry for mentioning it.
> 
>> >            printf(_("value %d is out of range (0-%d)\n"),
>> >                    i, fs_count-1);
>> >    } else {
>> > -          fs_path = &fs_table[i];
>> > -          pathlist_f();
>> > +          for (i = 0; i < fs_count; i++) {
>> > +                  fs_path = &fs_table[i];
>> > +                  /* Table is ordered xfs first, then foreign */
>> > +                  if (fs_path->fs_flags & FS_FOREIGN && !foreign_allowed)
>> > +                          break;
>> > +                  pathlist_f();
>> > +          }
>> >    }
>> >    return 0;
>> >  }

Oh, right.  You need the test & break in print_f not path_f, otherwise:

# quota/xfs_quota -x
xfs_quota> print
Filesystem          Pathname
    /home               /dev/mapper/vg_bp05-lv_home
    /mnt/test2          /dev/sdc1
(F) /                   /dev/mapper/vg_bp05-lv_root
(F) /boot               /dev/sda1
(F) /mnt/test           /dev/sdb1
xfs_quota> 

"print" gives you foreign filesystems when you didn't ask for them.

-Eric

<Prev in Thread] Current Thread [Next in Thread>