All of lore.kernel.org
 help / color / mirror / Atom feed
* Nullblk configfs oddities
@ 2022-04-18 21:38 Josef Bacik
  2022-04-18 21:54 ` Chaitanya Kulkarni
  0 siblings, 1 reply; 11+ messages in thread
From: Josef Bacik @ 2022-04-18 21:38 UTC (permalink / raw)
  To: bvanassche; +Cc: linux-block

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.

I don't really care what the solution looks like, I either need to be able to
create a random name and have a symlink automatically created so I can get to
the right device node (which I don't think can be done without udev, so I'm not
fan of this) or I need a way to figure out from configfs which device my thing
actually got created as.

It would also be nice if /sys/kernel/config/nullb/nullb0 was populated at
modinfo time so I know it's there already, then I could do something silly like
get the next number and use that as my device.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-05-03 20:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 21:38 Nullblk configfs oddities Josef Bacik
2022-04-18 21:54 ` Chaitanya Kulkarni
2022-04-18 22:02   ` Josef Bacik
2022-04-18 22:15     ` Chaitanya Kulkarni
2022-04-18 22:14   ` Jens Axboe
2022-04-18 22:21     ` Chaitanya Kulkarni
2022-04-18 22:24       ` Jens Axboe
2022-04-18 22:28         ` Josef Bacik
2022-04-19  4:23         ` Damien Le Moal
2022-04-19 14:49           ` Bart Van Assche
2022-05-03 20:20           ` Josef Bacik

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.