Re: Nullblk configfs oddities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 18, 2022 at 5:54 PM Chaitanya Kulkarni
<chaitanyak@xxxxxxxxxx> wrote:
>
> On 4/18/22 14:38, Josef Bacik wrote:
> > Hello,
> >
> > I'm trying to add a test to fsperf and it requires the use of nullblk.  I'm
> > trying to use the configfs thing, and it's doing some odd things.  My basic
> > reproducer is
> >
> > modprobe null_blk
> > mkdir /sys/kernel/config/nullb/nullb0
> > echo some shit into the config
> > echo 1 > /sys/kernel/config/nullb/nullb0/power
> >
> > Now null_blk apparently defaults to nr_devices == 1, so it creates nullb0 on
> > modprobe.  But this doesn't show up in the configfs directory.  There's no way
> > to find this out until when I try to mkfs my nullb0 and it doesn't work.  The
> > above steps gets my device created at /dev/nullb1, but there's no actual way to
> > figure out that's what happened.  If I do something like
> > /sys/kernel/config/nullb/nullbfsperf I still just get nullb<number>, I don't get
> > my fancy name.
> >
>
> when you load module with default module parameter it will create a
> default device with no memory backed mode, that will not be visible in
> the configfs.
>
> So you need to load the module with nr_devices=0 that will prevent the
> null_blk to create the default device which is not memory backed and not
> present in the configfs:-
>

Yup I know what it's doing, I'm raising this as it's weird and took me
a bit to work out what was happening, and it annoyed me.  It's not
anything I can't work around, but the UX kinda sucks.  Thanks,

Josef



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux