* Re: [PATCH V2 0/3] block: avoid to drop & re-add partitions if partitions aren't changed
[not found] ` <20210224081825.GA1339@lst.de>
@ 2021-02-24 11:23 ` Ming Lei
2021-02-24 16:14 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2021-02-24 11:23 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jens Axboe, linux-block, Ewan D . Milne, linux-kernel
On Wed, Feb 24, 2021 at 09:18:25AM +0100, Christoph Hellwig wrote:
> On Wed, Feb 24, 2021 at 11:58:26AM +0800, Ming Lei wrote:
> > Hi Guys,
> >
> > The two patches changes block ioctl(BLKRRPART) for avoiding drop &
> > re-add partitions if partitions state isn't changed. The current
> > behavior confuses userspace because partitions can disappear anytime
> > when calling into ioctl(BLKRRPART).
>
> Which is the f***king point of BLKRRPART and the behavior it had
> since day 1. Please fix the application(s) that all it all the time
> instead of bloating the kernel, as said before.
>
ioctl(BLKRRPART) can be called without changing partition table in
fdisk, cfdisk, sfdisk, systemd and blockdev at least, and it isn't only
on one single application. Even for blockdev, not sure if it can be fixed
because '--rereadpt' is simply one subcommand.
--
Ming
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2 0/3] block: avoid to drop & re-add partitions if partitions aren't changed
2021-02-24 11:23 ` [PATCH V2 0/3] block: avoid to drop & re-add partitions if partitions aren't changed Ming Lei
@ 2021-02-24 16:14 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2021-02-24 16:14 UTC (permalink / raw)
To: Ming Lei
Cc: Christoph Hellwig, Jens Axboe, linux-block, Ewan D . Milne, linux-kernel
On Wed, Feb 24, 2021 at 07:23:54PM +0800, Ming Lei wrote:
> > > The two patches changes block ioctl(BLKRRPART) for avoiding drop &
> > > re-add partitions if partitions state isn't changed. The current
> > > behavior confuses userspace because partitions can disappear anytime
> > > when calling into ioctl(BLKRRPART).
> >
> > Which is the f***king point of BLKRRPART and the behavior it had
> > since day 1. Please fix the application(s) that all it all the time
> > instead of bloating the kernel, as said before.
> >
>
> ioctl(BLKRRPART) can be called without changing partition table in
> fdisk, cfdisk, sfdisk, systemd and blockdev at least, and it isn't only
> on one single application. Even for blockdev, not sure if it can be fixed
> because '--rereadpt' is simply one subcommand.
I can also do all kinds of other bad things when I really want to. So
if a privileged user uses *fdisk, or explicitly calls
blockdev --rereadpt, we can expect this behavior, and all of them above
should not be frequent.
It seems like the main culprit is systemd, so please look into what is
going wrong there.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-24 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210224035830.990123-1-ming.lei@redhat.com>
[not found] ` <20210224081825.GA1339@lst.de>
2021-02-24 11:23 ` [PATCH V2 0/3] block: avoid to drop & re-add partitions if partitions aren't changed Ming Lei
2021-02-24 16:14 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®