() doesn't
> allocate space for length. Fix both to be consistent.
>
> Signed-off-by: Dongsheng Yang
> Reviewed-by: Ilya Dryomov
> Signed-off-by: Ilya Dryomov
> Signed-off-by: Sasha Levin
> ---
> drivers/block/rbd.c | 10 ++
> 1 file changed, 6 insertions(+)
On Fri, Jan 11, 2019 at 10:51 AM Roman Penyaev wrote:
>
> Hi Jens,
>
> That is interesting. Recently I sent an rfc related to epoll uring:
>
> https://lore.kernel.org/lkml/20190109164025.24554-1-rpeny...@suse.de
>
> which can be mapped to userspace and all ready events can be consumed
> from it d
lk-mq-sched: add framework for MQ capable IO schedulers")
Signed-off-by: Ilya Dryomov
---
block/blk-mq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 85a1c1a59c72..e3c39ea8e17b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
On Wed, Apr 4, 2018 at 2:53 PM, Arnd Bergmann wrote:
> A new set of warnings appeared in next-20180403 in some configurations
> when gcc cannot see that rbd_assert(0) leads to an unreachable code
> path:
>
> drivers/block/rbd.c: In function 'rbd_img_is_write':
> drivers/block/rbd.c:1397:1: error:
On Wed, Apr 4, 2018 at 11:49 AM, Arnd Bergmann wrote:
> A new set of warnings appeared in next-20180403 in some configurations
> when gcc cannot see that rbd_assert(0) leads to an unreachable code
> path:
>
> drivers/block/rbd.c: In function 'rbd_img_is_write':
> drivers/block/rbd.c:1397:1: error:
On Fri, Mar 30, 2018 at 9:17 PM, Gustavo A. R. Silva
wrote:
> In preparation to enabling -Wvla, remove the use of stack VLA.
>
> In this particular case, variable buf_size is replaced with a constant
> expression that can be computed at preprocessing time. This avoids two
> VLA warnings. Also, as
On Tue, Mar 20, 2018 at 11:39 AM, Colin Ian King
wrote:
> On 20/03/18 10:35, Dongsheng Yang wrote:
>> Hi Colin,
>>
>> On 03/19/2018 09:33 PM, Colin King wrote:
>>> From: Colin Ian King
>>>
>>> Trivial fix to spelling mistake in rdb_warn message text
>>>
>>> Signed-off-by: Colin Ian King
>>> ---
On Thu, Jan 11, 2018 at 2:09 PM, Ilya Dryomov wrote:
> Hello,
>
> I was doing some cleanup work on rbd BLKROSET handler and discovered
> that we ignore partition rw/ro setting (hd_struct->policy) for pretty
> much everything but straight writes.
>
> David (CCed) has blkt
Similar to blkdev_write_iter(), return -EPERM if the partition is
read-only. This covers ioctl(), fallocate() and most in-kernel users
but isn't meant to be exhaustive -- everything else will be caught in
generic_make_request_checks(), fail with -EIO and can be fixed later.
Signed-off-by:
(), which is used by quite a few drivers for things like
snapshots, read-only backing files/images, etc.
Signed-off-by: Ilya Dryomov
---
block/blk-core.c | 56 ++--
1 file changed, 38 insertions(+), 18 deletions(-)
diff --git a/block/blk-core.c b
bviously more important, but perhaps it's time to revisit that as
well?)
v2 -> v3:
- lookup part only once; combine read-only check with existing
should_fail_request check
v1 -> v2:
- added unlikely() per Sagi's suggestion
Thanks,
Ilya
Ilya Dryomov (2):
blo
On Wed, Jan 10, 2018 at 5:34 PM, Jens Axboe wrote:
> On 1/10/18 9:18 AM, Ilya Dryomov wrote:
>> Regular block device writes go through blkdev_write_iter(), which does
>> bdev_read_only(), while zeroout/discard/etc requests are never checked,
>> both userspace- and kernel-trig
Similar to blkdev_write_iter(), return -EPERM if the partition is
read-only. This covers ioctl(), fallocate() and most in-kernel users
but isn't meant to be exhaustive -- everything else will be caught in
generic_make_request_checks(), fail with -EIO and can be fixed later.
Signed-off-by:
bviously more important, but perhaps it's time to revisit that as
well?)
v1 -> v2:
- added unlikely() per Sagi's suggestion
Thanks,
Ilya
Ilya Dryomov (2):
block: fail op_is_write() requests to read-only partitions
block: add bdev_read_only() checks
(), which is used by quite a few drivers for things like
snapshots, read-only backing files/images, etc.
Signed-off-by: Ilya Dryomov
Reviewed-by: Sagi Grimberg
---
block/blk-core.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block
On Thu, Nov 16, 2017 at 10:02 AM, Ilya Dryomov wrote:
> On Thu, Nov 9, 2017 at 7:44 PM, Ilya Dryomov wrote:
>> Hello,
>>
>> I was doing some cleanup work on rbd BLKROSET handler and discovered
>> that we ignore partition rw/ro setting (hd_struct->policy) for
On Thu, Nov 9, 2017 at 7:44 PM, Ilya Dryomov wrote:
> Hello,
>
> I was doing some cleanup work on rbd BLKROSET handler and discovered
> that we ignore partition rw/ro setting (hd_struct->policy) for pretty
> much everything but straight writes.
>
> David (CCed) has blkt
bviously more important, but perhaps it's time to revisit that as
well?)
Thanks,
Ilya
Ilya Dryomov (2):
block: fail op_is_write() requests to read-only partitions
block: add bdev_read_only() checks to common helpers
block/blk-core.c | 23 ++-
bloc
Similar to blkdev_write_iter(), return -EPERM if the partition is
read-only. This covers ioctl(), fallocate() and most in-kernel users
but isn't meant to be exhaustive -- everything else will be caught in
generic_make_request_checks(), fail with -EIO and can be fixed later.
Signed-off-by:
(), which is used by quite a few drivers for things like
snapshots, read-only backing files/images, etc.
Signed-off-by: Ilya Dryomov
---
block/blk-core.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index
On Thu, Oct 19, 2017 at 2:14 AM, Al Viro wrote:
> On Wed, Oct 18, 2017 at 02:38:38PM +0200, Ilya Dryomov wrote:
>> Check for CAP_SYS_ADMIN before calling into the driver, similar to
>> blkdev_flushbuf(). This is safer and can spare a check in the driver.
>>
>> (Curre
On Mon, Oct 16, 2017 at 3:59 PM, Ilya Dryomov wrote:
> Hi Christoph, Martin,
>
> blkdev_issue_zeroout() now checks for any error. This required a minor
> refactor, so I dropped the stable tag, Jens can add it back if needed.
>
> v2 -> v3:
> - another code flow change
Check for CAP_SYS_ADMIN before calling into the driver, similar to
blkdev_flushbuf(). This is safer and can spare a check in the driver.
(Currently BLKROSET is overridden by md and rbd, rbd is missing the
check. md has the check, but it covers a lot more than BLKROSET.)
Signed-off-by: Ilya
On Mon, Oct 16, 2017 at 1:44 PM, Christoph Hellwig wrote:
> On Fri, Oct 06, 2017 at 02:31:20PM +0200, Ilya Dryomov wrote:
>> This would unconditionally overwrite any WRITE ZEROS error. If we get
>> e.g. -EIO, and manual zeroing is not allowed, I don't think we want to
&
s indicating lack of offload
support.
Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing")
Cc: Christoph Hellwig
Cc: "Martin K. Petersen"
Cc: Hannes Reinecke
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 45 +
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case.
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 63 +
1 file changed, 37 insertions(+), 26 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index
089&w=2
Thanks,
Ilya
Ilya Dryomov (2):
block: factor out __blkdev_issue_zero_pages()
block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()
block/blk-lib.c | 108 +---
1 file changed, 72 insertions(+), 36 deletions(-)
--
2.4.3
On Fri, Oct 6, 2017 at 2:31 PM, Ilya Dryomov wrote:
> On Fri, Oct 6, 2017 at 2:05 PM, Christoph Hellwig wrote:
>> On Thu, Oct 05, 2017 at 09:32:33PM +0200, Ilya Dryomov wrote:
>>> This is to avoid returning -EREMOTEIO in the following case: device
>>> doesn't
On Tue, Oct 10, 2017 at 11:16 AM, Ilya Dryomov wrote:
> On Thu, Oct 5, 2017 at 6:33 PM, Christoph Hellwig wrote:
>> Does the patch below fix the warning for you?
>>
>> --
>> From 28aae7104425433d39e6142adcd5b88dc5b0ad5f Mon Sep 17 00:00:00 2001
>> From: Chris
On Thu, Oct 5, 2017 at 6:33 PM, Christoph Hellwig wrote:
> Does the patch below fix the warning for you?
>
> --
> From 28aae7104425433d39e6142adcd5b88dc5b0ad5f Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig
> Date: Thu, 5 Oct 2017 18:31:02 +0200
> Subject: block: use DECLARE_COMPLETION_ONSTAC
On Fri, Oct 6, 2017 at 2:05 PM, Christoph Hellwig wrote:
> On Thu, Oct 05, 2017 at 09:32:33PM +0200, Ilya Dryomov wrote:
>> This is to avoid returning -EREMOTEIO in the following case: device
>> doesn't support WRITE SAME but scsi_disk::max_ws_blocks != 0, zeroo
On Thu, Oct 5, 2017 at 7:13 PM, Christoph Hellwig wrote:
> On Wed, Oct 04, 2017 at 05:03:16PM +0200, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_sam
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case.
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 63 +
1 file changed, 37 insertions(+), 26 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index
s indicating lack of offload
support.
Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing")
Cc: Christoph Hellwig
Cc: "Martin K. Petersen"
Cc: Hannes Reinecke
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 41 +
ditional checks to blkdev_issue_zeroout() and
__blkdev_issue_zero_pages(), the latter is no longer void
Previous patch(es) and discussion at
https://marc.info/?l=linux-block&m=150471953327942&w=2
https://marc.info/?l=linux-block&m=150601399031909&w=2
Thanks,
On Tue, Oct 3, 2017 at 10:04 AM, Christoph Hellwig wrote:
> On Thu, Sep 21, 2017 at 07:12:52PM +0200, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_sam
On Thu, Sep 21, 2017 at 7:12 PM, Ilya Dryomov wrote:
> Hi Christoph, Martin,
>
> blkdev_issue_zeroout() now checks for any error. This required a minor
> refactor, so I dropped the stable tag, Jens can add it back if needed.
>
> Previous patch and discussion at
>
> ht
s indicating lack of offload
support.
Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing")
Cc: Christoph Hellwig
Cc: "Martin K. Petersen"
Cc: Hannes Reinecke
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 27 +--
1 f
Hi Christoph, Martin,
blkdev_issue_zeroout() now checks for any error. This required a minor
refactor, so I dropped the stable tag, Jens can add it back if needed.
Previous patch and discussion at
https://marc.info/?l=linux-block&m=150471953327942&w=2
Thanks,
Ily
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case.
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 58 +++--
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index
On Tue, Sep 19, 2017 at 10:32 PM, Christoph Hellwig wrote:
> On Wed, Sep 06, 2017 at 07:38:10PM +0200, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
&
On Wed, Sep 13, 2017 at 11:50 AM, Ilya Dryomov wrote:
> On Wed, Sep 6, 2017 at 7:38 PM, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
&
On Wed, Sep 6, 2017 at 7:38 PM, Ilya Dryomov wrote:
> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
> is set. This means blkdev_issue_zeroout() must cope with WRITE SAME
> failing w
Hi Shaohua,
You wrote:
> BTW: blkdev_issue_zeroout retries if we immediately find the device doesn't
> support zeroout, but it doesn't retry if submit_bio_wait returns -EOPNOTSUPP.
> Is this correct behavior?
I sent a patch for that yesterday, see "[PATCH] block: cope with WRITE
SAME failing in b
lkdev_issue_write_same for zeroing")
Cc: Christoph Hellwig
Cc: "Martin K. Petersen"
Cc: Hannes Reinecke
Cc: sta...@vger.kernel.org # 4.12+
Signed-off-by: Ilya Dryomov
---
block/blk-lib.c | 49 +
1 file changed, 33 insertions(+), 16
On Tue, May 23, 2017 at 5:49 PM, Ilya Dryomov wrote:
> nbd_config is allocated in nbd_alloc_config(), but never freed.
>
> Fixes: 5ea8d10802ec ("nbd: separate out the config information")
> Signed-off-by: Ilya Dryomov
> ---
> drivers/block/nbd.c | 1 +
> 1 file c
There is nothing to clear -- nbd_device has just been allocated.
Fold nbd_reset() into its other caller, nbd_config_put().
Signed-off-by: Ilya Dryomov
---
drivers/block/nbd.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block
nbd_config is allocated in nbd_alloc_config(), but never freed.
Fixes: 5ea8d10802ec ("nbd: separate out the config information")
Signed-off-by: Ilya Dryomov
---
drivers/block/nbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index e7
On Tue, May 23, 2017 at 4:16 PM, Jens Axboe wrote:
> On 05/23/2017 08:14 AM, Josef Bacik wrote:
>> On Tue, May 23, 2017 at 12:38:31PM +0200, Ilya Dryomov wrote:
>>> nbd_config is allocated in nbd_alloc_config(), but never freed.
>>>
>>> Fixes: 5ea8d10
nbd_config is allocated in nbd_alloc_config(), but never freed.
Fixes: 5ea8d10802ec ("nbd: separate out the config information")
Signed-off-by: Ilya Dryomov
---
drivers/block/nbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 9a
drivers that call blk_integrity_register() and
use integrity infrastructure won't interfere with drivers that don't
but still want stable pages.
Fixes: 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk")
Cc: "Martin K. Petersen"
Cc: Dan Williams
Cc: Christoph Hellwig
On Thu, Mar 2, 2017 at 4:24 AM, Martin K. Petersen
wrote:
>>>>>> "Ilya" == Ilya Dryomov writes:
>
> Ilya,
>
> Ilya> Given the above, I'm not sure what the baseline is --
> Ilya> blk_integrity code isn't invoked for data-only lbafs. Co
On Fri, Feb 24, 2017 at 12:49 AM, Martin K. Petersen
wrote:
>>>>>> "Ilya" == Ilya Dryomov writes:
>
> Ilya,
>
> Ilya> Well, blk_integrity_revalidate() doesn't clear the profile, it
> Ilya> just clears the stable pages flag. Whoever calls
&
On Wed, Feb 22, 2017 at 5:41 AM, Martin K. Petersen
wrote:
>>>>>> "Ilya" == Ilya Dryomov writes:
>
> Ilya,
>
> Ilya> could you please explain blk_integrity_revalidate() and
> Ilya> its GENHD_FL_UP check in particular? We have t
Hello,
rbd requires stable pages if ceph message data CRCs are enabled. To
that end we set BDI_CAP_STABLE_WRITES in rbd_init_disk(), but since
commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk",
went into 4.4) this bit is almost immediately cleared:
add_disk
register_disk
55 matches
Mail list logo