All of lore.kernel.org
 help / color / mirror / Atom feed
* no EBUSY on BLKRRPART, regression?
@ 2021-04-15 11:31 Karel Zak
  2021-04-15 12:09 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Karel Zak @ 2021-04-15 11:31 UTC (permalink / raw)
  To: linux-block; +Cc: Jens Axboe, Christoph Hellwig



 Hi,

 it seems BLKRRPART does not return EBUSY although the whole-disk
 device contains mounted partitions. It seems like regression,
 or what did I overlook?

 BLKRRPART is very old way how fdisk-like programs detect that the
 whole-disk device is not used by system, otherwise it warns users. Now
 it does not work ;-( 

 Yes, it would be probably better to use open(O_EXCL) in these days.

        # lsblk /dev/sda
        NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
        sda      8:0    0 223.6G  0 disk
        ├─sda1   8:1    0   200M  0 part /boot/efi
        ├─sda2   8:2    0     5G  0 part /boot
        ├─sda3   8:3    0 125.5G  0 part
        ├─sda4   8:4    0    50G  0 part /
        └─sda5   8:5    0  42.9G  0 part /home/archive


        # strace -e ioctl blockdev --rereadpt /dev/sda
        ioctl(3, BLKRRPART)                     = 0

        # uname -r
        5.11.10-200.fc33.x86_64

 Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


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

end of thread, other threads:[~2021-04-15 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-15 11:31 no EBUSY on BLKRRPART, regression? Karel Zak
2021-04-15 12:09 ` Christoph Hellwig

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.