Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2021-01-10 Thread Hannes Reinecke
On 1/9/21 11:42 AM, Christoph Hellwig wrote: Change the policy so that a BLKROSET on the whole device also affects partitions. To quote Martin K. Petersen: It's very common for database folks to twiddle the read-only state of block devices and partitions. I know that our users will find it very

[dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2021-01-09 Thread Christoph Hellwig
Change the policy so that a BLKROSET on the whole device also affects partitions. To quote Martin K. Petersen: It's very common for database folks to twiddle the read-only state of block devices and partitions. I know that our users will find it very counter-intuitive that setting /dev/sda read-o

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Ming Lei
On Tue, Dec 08, 2020 at 05:28:27PM +0100, Christoph Hellwig wrote: > Change the policy so that a BLKROSET on the whole device also affects > partitions. To quote Martin K. Petersen: > > It's very common for database folks to twiddle the read-only state of > block devices and partitions. I know th

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Ming Lei
On Tue, Dec 08, 2020 at 11:59:27AM +0100, Christoph Hellwig wrote: > On Tue, Dec 08, 2020 at 06:29:23PM +0800, Ming Lei wrote: > > > - test_bit(GD_READ_ONLY, &bdev->bd_disk->state); > > > + return bdev->bd_read_only || get_disk_ro(bdev->bd_disk); > > > } > > > EXPORT_SYMBOL(bdev_read_only

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Hannes Reinecke
On 12/8/20 5:28 PM, Christoph Hellwig wrote: Change the policy so that a BLKROSET on the whole device also affects partitions. To quote Martin K. Petersen: It's very common for database folks to twiddle the read-only state of block devices and partitions. I know that our users will find it very

[dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Christoph Hellwig
Change the policy so that a BLKROSET on the whole device also affects partitions. To quote Martin K. Petersen: It's very common for database folks to twiddle the read-only state of block devices and partitions. I know that our users will find it very counter-intuitive that setting /dev/sda read-o

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Johannes Thumshirn
On 08/12/2020 10:28, Christoph Hellwig wrote: > On Tue, Dec 08, 2020 at 12:27:41AM -0500, Martin K. Petersen wrote: >> >> Christoph, >> >>> The existing behavior is inconsistent in the sense that doing: >>> >>> permits writes. But: >>> >>> >>> >>> doesn't. >>> >>> And a subsequent: >> >> Looks lik

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Christoph Hellwig
On Tue, Dec 08, 2020 at 06:29:23PM +0800, Ming Lei wrote: > > - test_bit(GD_READ_ONLY, &bdev->bd_disk->state); > > + return bdev->bd_read_only || get_disk_ro(bdev->bd_disk); > > } > > EXPORT_SYMBOL(bdev_read_only); > > I think this patch should be folded into previous one, otherwise

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Ming Lei
On Mon, Dec 07, 2020 at 02:19:16PM +0100, Christoph Hellwig wrote: > Change the policy so that a BLKROSET on the whole device also affects > partitions. To quote Martin K. Petersen: > > It's very common for database folks to twiddle the read-only state of > block devices and partitions. I know th

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-08 Thread Christoph Hellwig
On Tue, Dec 08, 2020 at 12:27:41AM -0500, Martin K. Petersen wrote: > > Christoph, > > > The existing behavior is inconsistent in the sense that doing: > > > > permits writes. But: > > > > > > > > doesn't. > > > > And a subsequent: > > Looks like the command line pieces got zapped from the comm

Re: [dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-07 Thread Martin K. Petersen
Christoph, > The existing behavior is inconsistent in the sense that doing: > > permits writes. But: > > > > doesn't. > > And a subsequent: Looks like the command line pieces got zapped from the commit description. In any case this fixes the issue for me. My read-only blktests succeed with th

[dm-devel] [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions

2020-12-07 Thread Christoph Hellwig
Change the policy so that a BLKROSET on the whole device also affects partitions. To quote Martin K. Petersen: It's very common for database folks to twiddle the read-only state of block devices and partitions. I know that our users will find it very counter-intuitive that setting /dev/sda read-o