Re: [RFC V2] block: reject I/O for same fd if block size changed

2021-01-03 Thread Minwoo Im
On 21-01-04 00:57:07, Chaitanya Kulkarni wrote: > On 12/30/20 08:03, Minwoo Im wrote: > > Let's say, for example of NVMe device, Format command to change out > > LBA format to another logical block size and BLKRRPART to re-read > > partition information with a same file descriptor like: > > > >

Re: [RFC V2] block: reject I/O for same fd if block size changed

2021-01-03 Thread Chaitanya Kulkarni
On 12/30/20 08:03, Minwoo Im wrote: > > diff --git a/block/genhd.c b/block/genhd.c > index 73faec438e49..c3a73cba7c88 100644 > --- a/block/genhd.c > +++ b/block/genhd.c > @@ -81,6 +81,7 @@ bool set_capacity_and_notify(struct gendisk *disk, sector_t > size) >*/ > if (!capacity || !s

Re: [RFC V2] block: reject I/O for same fd if block size changed

2021-01-03 Thread Chaitanya Kulkarni
On 12/30/20 08:03, Minwoo Im wrote: > Let's say, for example of NVMe device, Format command to change out > LBA format to another logical block size and BLKRRPART to re-read > partition information with a same file descriptor like: > > fd = open("/dev/nvme0n1", O_RDONLY); > > nvme_forma