Re: [PATCH] block: don't warn when calling fsync on read-only block devices

2018-09-03 Thread Mikulas Patocka
On Wed, 22 Aug 2018, Jens Axboe wrote: > On 8/22/18 10:23 AM, Mikulas Patocka wrote: > > It is possible to call fsync on a read-only handle (for example, fsck.ext2 > > does it when doing read-only check), and this call results in kernel > > warning. This bug was int

[PATCH] block: don't warn when calling fsync on read-only block devices

2018-08-22 Thread Mikulas Patocka
It is possible to call fsync on a read-only handle (for example, fsck.ext2 does it when doing read-only check), and this call results in kernel warning. This bug was introduced by the commit 721c7fc701c7 "block: fail op_is_write() requests to read-only partitions". Signed-off-b

[PATCH 2/2] loop: enable compat ioctl LOOP_SET_BLOCK_SIZE

2018-05-03 Thread Mikulas Patocka
Enable compat ioctl LOOP_SET_BLOCK_SIZE. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Fixes: 89e4fdecb51c ("loop: add ioctl for changing logical block size") Cc: sta...@vger.kernel.org # v4.14+ --- drivers/block/loop.c |1 + 1 file changed, 1 insertion(+)

[PATCH 1/2] loop: enable compat ioctl LOOP_SET_DIRECT_IO

2018-05-03 Thread Mikulas Patocka
Enable compat ioctl LOOP_SET_DIRECT_IO. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Fixes: ab1cb278bc70 ("block: loop: introduce ioctl command of LOOP_SET_DIRECT_IO") Cc: sta...@vger.kernel.org # v4.4+ --- drivers/block/loop.c |2 ++ 1 file changed, 2 inse

Re: [PATCH] block: use 32-bit blk_status_t on Alpha

2018-03-21 Thread Mikulas Patocka
On Wed, 21 Mar 2018, Jens Axboe wrote: > On 3/21/18 10:42 AM, Mikulas Patocka wrote: > > Early alpha processors cannot write a single byte or word; they read 8 > > bytes, modify the value in registers and write back 8 bytes. > > > > The type blk_status_t is defin

[PATCH] Fix slab name "biovec-(1<<(21-12))"

2018-03-21 Thread Mikulas Patocka
I'm getting a slab named "biovec-(1<<(21-12))". It is caused by unintended expansion of the macro BIO_MAX_PAGES. This patch renames it to biovec-max. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Cc: sta...@vger.kernel.org # v4.14+ --- block/bio.c |4 +

[PATCH] block: use 32-bit blk_status_t on Alpha

2018-03-21 Thread Mikulas Patocka
we are on Alpha and if we are compiling for a processor that doesn't have the byte-word-extension. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Cc: sta...@vger.kernel.org # 4.13+ --- include/linux/blk_types.h |5 + 1 file changed, 5 insertions(

Re: [PATCH] wbt: fix incorrect throttling due to flush latency

2018-02-05 Thread Mikulas Patocka
On Mon, 5 Feb 2018, Jens Axboe wrote: > On 2/5/18 12:22 PM, Jens Axboe wrote: > > On 2/5/18 12:11 PM, Mikulas Patocka wrote: > >> I have a workload where one process sends many asynchronous write bios > >> (without waiting for them) and another process sends synchron

[PATCH] wbt: fix incorrect throttling due to flush latency

2018-02-05 Thread Mikulas Patocka
t only REQ_OP_READ requests are counted in the read bucket. The patch improves SATA write+flush throughput from 130MB/s to 350MB/s. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Cc: sta...@vger.kernel.org # v4.12+ --- block/blk-wbt.c |6 +- 1 file changed, 5 inse

Re: [PATCH] schedule: use unlikely()

2017-11-27 Thread Mikulas Patocka
On Sat, 25 Nov 2017, Ingo Molnar wrote: > > * Mikulas Patocka <mpato...@redhat.com> wrote: > > > On Fri, 24 Nov 2017, Ingo Molnar wrote: > > > > > > + return unlikely(plug != NULL) && > > > > (!list_em

Re: [dm-devel] new patchset to eliminate DM's use of BIOSET_NEED_RESCUER

2017-11-22 Thread Mikulas Patocka
On Wed, 22 Nov 2017, NeilBrown wrote: > On Tue, Nov 21 2017, Mikulas Patocka wrote: > > > On Tue, 21 Nov 2017, Mike Snitzer wrote: > > > >> On Tue, Nov 21 2017 at 4:23pm -0500, > >> Mikulas Patocka <mpato...@redhat.com> wrote: > >> > &

[PATCH] block: remove useless assignment in bio_split

2017-11-22 Thread Mikulas Patocka
Remove useless assignment to the variable "split" because the variable is unconditionally assigned later. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> --- block/bio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux

Re: new patchset to eliminate DM's use of BIOSET_NEED_RESCUER

2017-11-21 Thread Mikulas Patocka
On Tue, 21 Nov 2017, Mike Snitzer wrote: > On Tue, Nov 21 2017 at 4:23pm -0500, > Mikulas Patocka <mpato...@redhat.com> wrote: > > > This is not correct: > > > >2206 static void dm_wq_work(struct work_struct *work) > >2207 { > >2208

Re: [dm-devel] new patchset to eliminate DM's use of BIOSET_NEED_RESCUER [was: Re: [PATCH 00/13] block: assorted cleanup for bio splitting and cloning.]

2017-11-21 Thread Mikulas Patocka
On Tue, 21 Nov 2017, Mike Snitzer wrote: > On Tue, Nov 21 2017 at 7:43am -0500, > Mike Snitzer wrote: > > > Decided it a better use of my time to review and then hopefully use the > > block-core's bio splitting infrastructure in DM. Been meaning to do > > that for quite

[PATCH] brd: remove unused brd_mutex

2017-11-10 Thread Mikulas Patocka
Remove unused mutex brd_mutex. It is unused since the commit ff26956875c2 ("brd: remove support for BLKFLSBUF"). Signed-off-by: Mikulas Patocka <mpato...@redhat.com> --- drivers/block/brd.c |1 - 1 file changed, 1 deletion(-) Index: linux-2.6/dri

Re: [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 04:45:17PM -0500, Mikulas Patocka wrote: > > Hi > > > > I need the function bio_kmap_irq in the driver that I am developing, but > > it doesn't return the size of the mapped data.

[PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-07 Thread Mikulas Patocka
Hi I need the function bio_kmap_irq in the driver that I am developing, but it doesn't return the size of the mapped data. I've made this patch to fix it. Mikulas From: Mikulas Patocka <mpato...@redhat.com> The function bio_kmap_irq is not usable because it does not return th

[PATCH] brd: fix overflow in __brd_direct_access

2017-09-13 Thread Mikulas Patocka
with multiplication by the number of sectors per page. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> Fixes: 1647b9b959c7 ("brd: add dax_operations support") Cc: sta...@vger.kernel.org # 4.12+ --- drivers/block/brd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: li

[PATCH] fix an integer overflow in __blkdev_sectors_to_bio_pages

2017-08-14 Thread Mikulas Patocka
On Mon, 14 Aug 2017, Damien Le Moal wrote: > On Sun, 2017-08-13 at 22:47 -0400, Mikulas Patocka wrote: > > > > On Wed, 9 Aug 2017, h...@lst.de wrote: > > > > > Does commit 615d22a51c04856efe62af6e1d5b450aaf5cc2c0 > > > "block: Fix __blkd

Re: [dm-devel] [BUG] BLKZEROOUT on dm-crypt container cause OOM / kernel panic

2017-08-13 Thread Mikulas Patocka
On Wed, 9 Aug 2017, h...@lst.de wrote: > Does commit 615d22a51c04856efe62af6e1d5b450aaf5cc2c0 > "block: Fix __blkdev_issue_zeroout loop" fix the issue for you? > > -- > dm-devel mailing list > dm-de...@redhat.com > https://www.redhat.com/mailman/listinfo/dm-devel I think that patch is

Re: [PATCH] bio-integrity: revert "stop abusing bi_end_io"

2017-08-06 Thread Mikulas Patocka
On Sat, 5 Aug 2017, Martin K. Petersen wrote: > Mikulas, > > > The sector number in the integrity tag must match the physical sector > > number. So, it must be verified at the bottom. > > The ref tag seed matches the submitter block number (typically block > layer sector for the top device)

Re: [PATCH] bio-integrity: revert "stop abusing bi_end_io"

2017-08-05 Thread Mikulas Patocka
On Sat, 5 Aug 2017, Christoph Hellwig wrote: > > On Thu, Aug 03, 2017 at 10:10:55AM -0400, Mikulas Patocka wrote: > > That dm-crypt commit that uses bio integrity payload came 3 months before > > 7c20f11680a441df09de7235206f70115fbf6290 and it was already pr

[PATCH] bio-integrity: revert "stop abusing bi_end_io"

2017-08-03 Thread Mikulas Patocka
and it should be reworked for the next merge window, so that it calls bio_integrity_verify_fn only for the lowest level. Mikulas From: Mikulas Patocka <mpato...@redhat.co> The patch 7c20f11680a441df09de7235206f70115fbf6290 ("bio-integrity: stop abusing bi_end_io") changes th

Re: [dm-devel] v4.9, 4.4-final: 28 bioset threads on small notebook, 36 threads on cellphone

2017-02-14 Thread Mikulas Patocka
; > busy and this issue is "hard". > > Mike, it's not my job to debug DM code for you or sift through your bug > reports. > I don't read dm-devel, and I don't know why you think I that's my job. > > If there's something you think the block layer should be doing

Re: REQ_OP for zeroing, was Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-31 Thread Mikulas Patocka
On Fri, 28 Oct 2016, Christoph Hellwig wrote: > [adding Chaitanya to Cc] > > On Fri, Oct 28, 2016 at 07:43:41AM -0400, Mikulas Patocka wrote: > > We could detect if the REQ_OP_WRITE_SAME command contains all zeroes and > > if it does, turn it into "Write Zeroes"

Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-31 Thread Mikulas Patocka
On Fri, 28 Oct 2016, Bart Van Assche wrote: > On 10/28/2016 04:39 AM, Mikulas Patocka wrote: > > On Wed, 26 Oct 2016, Bart Van Assche wrote: > > > On 10/26/2016 02:46 PM, Mikulas Patocka wrote: > > > > I think the proper thing would be to m

Re: REQ_OP for zeroing, was Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-28 Thread Mikulas Patocka
On Wed, 26 Oct 2016, Christoph Hellwig wrote: > On Wed, Oct 26, 2016 at 05:46:11PM -0400, Mikulas Patocka wrote: > > I think the proper thing would be to move "discard_zeroes_data" flag into > > the bio itself - there would be REQ_OP_DISCARD and REQ_OP_DISCARD_ZERO

Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-28 Thread Mikulas Patocka
On Wed, 26 Oct 2016, Bart Van Assche wrote: > On 10/26/2016 02:46 PM, Mikulas Patocka wrote: > > I don't like the idea of complicating the code by turning discards into > > writes. > > That's not what my patch series does. The only writes added by my patch series &g

Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-26 Thread Mikulas Patocka
On Wed, 26 Oct 2016, Bart Van Assche wrote: > On 10/26/2016 01:26 PM, Mikulas Patocka wrote: > > The brd driver refuses misaligned discard requests with an error. However, > > this is suboptimal, misaligned requests could be handled by discarding a > > part of the re

[PATCH 0/4] brd: support discard

2016-10-26 Thread Mikulas Patocka
On Tue, 25 Oct 2016, Jens Axboe wrote: > On 10/25/2016 08:37 AM, Mike Snitzer wrote: > > On Tue, Oct 25 2016 at 9:07P -0400, > > Christoph Hellwig wrote: > > > > > I think the right fix is to kill off the BLKFLSBUF special case in > > > brd. Yes, it break compatibility -

[PATCH 2/4] brd: extend rcu read sections

2016-10-26 Thread Mikulas Patocka
is not supposed to race with discard. Signed-off-by: Mikulas Patocka <mpato...@redhat.com> --- drivers/block/brd.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/block/brd.c === ---

[PATCH 1/4] brd: handle misaligned discard

2016-10-26 Thread Mikulas Patocka
The brd driver refuses misaligned discard requests with an error. However, this is suboptimal, misaligned requests could be handled by discarding a part of the request that is aligned on a page boundary. This patch changes the code so that it handles misaligned requests. Signed-off-by: Mikulas

[PATCH 3/4] brd: implement discard

2016-10-26 Thread Mikulas Patocka
ould mount the filesystem without "-o discard". Signed-off-by: Mikulas Patocka <mpato...@redhat.com> --- drivers/block/brd.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) Index: lin

[PATCH 4/4] brd: remove unused brd_zero_page

2016-10-26 Thread Mikulas Patocka
-by: Mikulas Patocka <mpato...@redhat.com> --- drivers/block/brd.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) Index: linux-2.6/drivers/block/brd.c === --- linux-2.6.orig/drivers/block/brd.c +++ lin

Re: dm-crypt: Fix error with too large bios

2016-08-30 Thread Mikulas Patocka
On Tue, 30 Aug 2016, Mike Snitzer wrote: > On Tue, Aug 30 2016 at 8:19P -0400, > Mikulas Patocka <mpato...@redhat.com> wrote: > > > > > > > On Tue, 30 Aug 2016, Ming Lei wrote: > > > > > On Tue, Aug 30, 2016 at 5:57 AM, Mi

Re: dm-crypt: Fix error with too large bios

2016-08-29 Thread Mikulas Patocka
On Mon, 29 Aug 2016, Mike Snitzer wrote: > On Sat, Aug 27 2016 at 11:09am -0400, > Mikulas Patocka <mpato...@redhat.com> wrote: > > > > > > > On Fri, 26 Aug 2016, Mike Snitzer wrote: > > > > > On Thu, Aug 25 2016 at 4:13pm

Re: [dm-devel] dm-crypt: Fix error with too large bios

2016-08-25 Thread Mikulas Patocka
On Thu, 18 Aug 2016, Eric Wheeler wrote: > > On Wed, Jun 01 2016 at 9:44am -0400, Christoph Hellwig > > wrote: > > > > > > > be dm-crypt.c. Maybe you've identified some indirect use of > > > > > BIO_MAX_SIZE? > > > > > > > > I mean the recently introduced BIO_MAX_SIZE