- stable@
19.03.2021, 08:29, "Dmitry Monakhov" :
> Otherwise we may endup blocking on pipe or socket.
>
> Fixes: 6d5d5ac ("io_uring: extend async work merge")
> Testcase:
> https://github.com/dmonakhov/liburing/commit/16d171b6ef9d68e6db66650a83d98c5c721d01
Otherwise we may endup blocking on pipe or socket.
Fixes: 6d5d5ac ("io_uring: extend async work merge")
Testcase:
https://github.com/dmonakhov/liburing/commit/16d171b6ef9d68e6db66650a83d98c5c721d01f6
Signed-off-by: Dmitry Monakhov
---
fs/io_uring.c | 3 +++
1 file changed, 3
10.03.2021, 16:41, "Christoph Hellwig" :
> On Wed, Mar 10, 2021 at 02:21:56PM +0100, Christoph Hellwig wrote:
>> Can you try this patch instead?
>>
>> http://lists.infradead.org/pipermail/linux-nvme/2021-February/023183.html
>
> Actually, please try the patch below instead, it looks like our
:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
Signed-off-by: Dmitry Monakhov
---
drivers/nvme/host/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 17ab332..7249ae7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
Paolo Valente writes:
>> Il giorno 9 lug 2020, alle ore 10:19, Dmitry Monakhov
>> ha scritto:
>>
>> Paolo Valente writes:
>>
>>>> Il giorno 8 lug 2020, alle ore 19:48, Dmitry Monakhov
>>>> ha scritto:
>>>>
>
p blkio /proc/cgroups
truncate -s 1M img
losetup /dev/loop0 img
echo bfq > /sys/block/loop0/queue/scheduler
grep blkio /proc/cgroups
for ((i=0;i /sys/fs/cgroup/blkio/a/cgroup.procs
dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
echo 0 > /sys/fs/cgroup/blkio
measure_alloc_pages_wait=Y measure maximum page allocation wait time
Signed-off-by: Dmitry Monakhov
---
lib/test_lockup.c | 27 +--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/lib/test_lockup.c b/lib/test_lockup.c
index 0f81252..867b2f4 100644
MUTEX reacquire_locks=Y\
cond_resched_inside=Y measure_lockup=Y &
stress-ng -c $(nproc) --timeout 10s&
time mkdir /sys/fs/cgroup/blkio/a
time rmdir /sys/fs/cgroup/blkio/a
Signed-off-by: Dmitry Monakhov
---
lib/test_lockup.c | 45 +
1 file changed
10s&
time mkdir /sys/fs/cgroup/blkio/a
Signed-off-by: Dmitry Monakhov
---
lib/test_lockup.c | 44 +++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/lib/test_lockup.c b/lib/test_lockup.c
index 0f81252..3e05d6e 100644
--- a/lib/test_lock
dir /sys/fs/cgroup/blkio/a
grep blkio /proc/cgroups
done
##TESTCASE_END:
changes since v2:
- use safe iteration macro to prevent freed object dereference.
Signed-off-by: Dmitry Monakhov
---
block/bfq-wf2q.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --
truncate -s 1M img
losetup /dev/loop0 img
echo bfq > /sys/block/loop0/queue/scheduler
grep blkio /proc/cgroups
for ((i=0;i /sys/fs/cgroup/blkio/a/cgroup.procs
dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
echo 0 > /sys/fs/cgroup/blkio/cgroup.procs
rmdir /
Paolo Valente writes:
>> Il giorno 9 lug 2020, alle ore 10:19, Dmitry Monakhov
>> ha scritto:
>>
>> Paolo Valente writes:
>>
>>>> Il giorno 8 lug 2020, alle ore 19:48, Dmitry Monakhov
>>>> ha scritto:
>>>>
>>>>
Paolo Valente writes:
>> Il giorno 8 lug 2020, alle ore 19:48, Dmitry Monakhov
>> ha scritto:
>>
>> Paolo Valente writes:
>>
>>> Hi,
>>> sorry for the delay. The commit you propose to drop fix the issues
>>> reported in [1].
>&
l one.
Please correct me if I'm wrong.
>
> I'll check it ASAP, unless you do it before me.
>
> Thanks,
> Paolo
>
> [1] https://lkml.org/lkml/2020/1/31/94
>
>> Il giorno 2 lug 2020, alle ore 12:57, Dmitry Monakhov
>> ha scritto:
>>
>> commit db37a34c
Dmitry Monakhov writes:
Ping. Do you have any objections against this patch?
> commit db37a34c563b ("block, bfq: get a ref to a group when adding it to a
> service tree")
> introduce leak forbfq_group and blkcg_gq objects because of get/put
> imbalance. See trace
ck/loop0/queue/scheduler
grep blkio /proc/cgroups
for ((i=0;i /sys/fs/cgroup/blkio/a/cgroup.procs
dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
echo 0 > /sys/fs/cgroup/blkio/cgroup.procs
rmdir /sys/fs/cgroup/blkio/a
grep blkio /proc/cgroups
done
##TESTCASE_E
ck/loop0/queue/scheduler
grep blkio /proc/cgroups
for ((i=0;i /sys/fs/cgroup/blkio/a/cgroup.procs
dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
echo 0 > /sys/fs/cgroup/blkio/cgroup.procs
rmdir /sys/fs/cgroup/blkio/a
grep blkio /proc/cgroups
done
##TESTCASE_E
Christoph Hellwig writes:
> Hi Dmitry,
>
> can you resend this series?
Sorry for a very long delay, I'm in the middle of honeymoon and this is
not a good time for a work :)
> I really think we should get this into 4.12 at least.
Please see updated version in the LKML list.
Christoph Hellwig writes:
> Hi Dmitry,
>
> can you resend this series?
Sorry for a very long delay, I'm in the middle of honeymoon and this is
not a good time for a work :)
> I really think we should get this into 4.12 at least.
Please see updated version in the LKML list.
"Martin K. Petersen" <martin.peter...@oracle.com> writes:
> Dmitry Monakhov <dmonak...@openvz.org> writes:
>
>> SCSI drivers do care about bip_seed so we must update it accordingly.
>
>> +bip->bip_iter.bi_sector += bytes_done >> 9;
>
"Martin K. Petersen" writes:
> Dmitry Monakhov writes:
>
>> SCSI drivers do care about bip_seed so we must update it accordingly.
>
>> +bip->bip_iter.bi_sector += bytes_done >> 9;
>
> This needs to count protection intervals. Otherwise things w
Christoph Hellwig writes:
> This look ok, but how did you manage to trigger this case?
# testcases
# TEST1
# Via bug in fallocate
truncate -l 1G img
losetup /dev/loop img
mkfs.ext4 -qF /dev/loop0
mkdir m
mount /dev/loop0 m
# command above truncate bdevs pagecache
xfs_io -c
Christoph Hellwig writes:
> This look ok, but how did you manage to trigger this case?
# testcases
# TEST1
# Via bug in fallocate
truncate -l 1G img
losetup /dev/loop img
mkfs.ext4 -qF /dev/loop0
mkdir m
mount /dev/loop0 m
# command above truncate bdevs pagecache
xfs_io -c "falloc -k 0 32G"
ENOTSUPP unconditionally.
IMHO (mode == FALLOC_FL_KEEP_SIZE) is sane API for thin-provision blkdevs
to preallocate space in advance. Nobody use it at the moment, but it may
be usefull in future.
>
> On Thu, Apr 06, 2017 at 04:02:49PM +0400, Dmitry Monakhov wrote:
>> Signed-off-by: Dm
MHO (mode == FALLOC_FL_KEEP_SIZE) is sane API for thin-provision blkdevs
to preallocate space in advance. Nobody use it at the moment, but it may
be usefull in future.
>
> On Thu, Apr 06, 2017 at 04:02:49PM +0400, Dmitry Monakhov wrote:
>> Signed-off-by: Dmitry Monakhov
>> ---
&
Some callers (usually error paths) call bdevname with null bdev.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/partition-generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/partition-generic.c b/block/partition-generic.c
index 7afb990..284de18
Idially this type of check should be handled at generic_make_request_checks
, but it is too late for bdevless bios, bad pointer was already
dereferenced at that point.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/blk-core.c | 5 +
1 file changed, 5 insertions(+)
Some callers (usually error paths) call bdevname with null bdev.
Signed-off-by: Dmitry Monakhov
---
block/partition-generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/partition-generic.c b/block/partition-generic.c
index 7afb990..284de18 100644
--- a/block/partition-generic.c
Idially this type of check should be handled at generic_make_request_checks
, but it is too late for bdevless bios, bad pointer was already
dereferenced at that point.
Signed-off-by: Dmitry Monakhov
---
block/blk-core.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/block/blk-core.c b
ard __find_get_block from null pointer bdev.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
fs/buffer.c | 24 +++-
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 9196f2a..4c8ce74 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@
ard __find_get_block from null pointer bdev.
Signed-off-by: Dmitry Monakhov
---
fs/buffer.c | 24 +++-
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 9196f2a..4c8ce74 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1355,8 +1355,12 @@ lookup_bh_
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
fs/block_dev.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 2eca00e..f4b13e1 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -2075,7 +2075,7 @@ stati
This prevent us from panic if someone invalidate bh under us.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
fs/jbd2/revoke.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index f9aefcd..e3b791d 100644
--- a/fs/jbd2/re
Signed-off-by: Dmitry Monakhov
---
fs/block_dev.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 2eca00e..f4b13e1 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -2075,7 +2075,7 @@ static long blkdev_fallocate(struct file
This prevent us from panic if someone invalidate bh under us.
Signed-off-by: Dmitry Monakhov
---
fs/jbd2/revoke.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index f9aefcd..e3b791d 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
If you saw a command "fallocate -k -l 1G /dev/vda" you probably think
that user want to preallocate space on thin-provision blkdev. Right?
What possibly can go wrong? Unfortunately you may destroy your filesystem
and kernel panic. The reason is the bug in blkdev_fallocate() which
unconditionally
If you saw a command "fallocate -k -l 1G /dev/vda" you probably think
that user want to preallocate space on thin-provision blkdev. Right?
What possibly can go wrong? Unfortunately you may destroy your filesystem
and kernel panic. The reason is the bug in blkdev_fallocate() which
unconditionally
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Reviewed-by: Christoph Hellwig <h...@lst.de>
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
--
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Reviewed-by: Christoph Hellwig
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 3 +++
1 file changed, 3
SCSI drivers do care about bip_seed so we must update it accordingly.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index b5009a8..82a6ffb 100644
--- a/blo
SCSI drivers do care about bip_seed so we must update it accordingly.
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index b5009a8..82a6ffb 100644
--- a/block/bio-integrity.c
+++ b/block
== bio_sectors(bio)
Let's just remove them completely.
changes from v1:
- remove 'sectors' arguments
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 11 ++-
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++
== bio_sectors(bio)
Let's just remove them completely.
changes from v1:
- remove 'sectors' arguments
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 11 ++-
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++---
4 files changed, 7
tes iterator was advanced during it's evolution. Later end_io handler
may easily restore original iterator by rewinding iterator to
iter->bi_done.
Note: this change makes sizeof (struct bvec_iter) multiple to 8
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
include/linux
tes iterator was advanced during it's evolution. Later end_io handler
may easily restore original iterator by rewinding iterator to
iter->bi_done.
Note: this change makes sizeof (struct bvec_iter) multiple to 8
Signed-off-by: Dmitry Monakhov
---
include/linux/bio.h | 21 +++--
include
.
This patch does:
- Return error back to caller with hope that it will react on this
- Truncate iterator size
Code was added long time ago here 4550dd6c, luckily no one hit it
in real life :)
changes since V1:
- Replace BUG_ON with error logic.
Signed-off-by: Dmitry Monakhov <dmo
.
This patch does:
- Return error back to caller with hope that it will react on this
- Truncate iterator size
Code was added long time ago here 4550dd6c, luckily no one hit it
in real life :)
changes since V1:
- Replace BUG_ON with error logic.
Signed-off-by: Dmitry Monakhov
---
drivers
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 5 +++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 2 ++
5 files c
Signed-off-by: Dmitry Monakhov
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 5 +++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 2 ++
5 files changed, 13 insertions(+), 13
ub.com/dmonakhov/xfstests/commit/3c6509eaa83b9c17cd0bc95d73fcdd76e1c54a85
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index f2b9
it in to one function.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
Documentation/block/data-integrity.txt | 3 --
block/bio-integrity.c | 88 ++
block/blk-core.c | 5 +-
block/bl
ub.com/dmonakhov/xfstests/commit/3c6509eaa83b9c17cd0bc95d73fcdd76e1c54a85
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index f2b9f09..f08096d 100644
--- a
it in to one function.
Signed-off-by: Dmitry Monakhov
---
Documentation/block/data-integrity.txt | 3 --
block/bio-integrity.c | 88 ++
block/blk-core.c | 5 +-
block/blk-mq.c | 8 +---
drivers
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## Fix various bugs in T10/DIF/DIX infrastructure
0001-bio-integrity-Do-not-allocate-integrity-context-for
0002-bio-integrity-bio_trim-should-truncate-integrity-vec
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## Fix various bugs in T10/DIF/DIX infrastructure
0001-bio-integrity-Do-not-allocate-integrity-context-for
0002-bio-integrity-bio_trim-should-truncate-integrity-vec
Reviewed-by: Christoph Hellwig <h...@lst.de>
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +190
Reviewed-by: Christoph Hellwig
Signed-off-by: Dmitry Monakhov
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, int
Ming Lei <tom.leim...@gmail.com> writes:
> On Mon, Apr 3, 2017 at 3:23 PM, Dmitry Monakhov <dmonak...@openvz.org> wrote:
>> Currently if some one try to advance bvec beyond it's size we simply
>> dump WARN_ONCE and continue to iterate beyond bvec array boundaries.
&
Ming Lei writes:
> On Mon, Apr 3, 2017 at 3:23 PM, Dmitry Monakhov wrote:
>> Currently if some one try to advance bvec beyond it's size we simply
>> dump WARN_ONCE and continue to iterate beyond bvec array boundaries.
>> This simply means that we endup dereferencing/cor
Christoph Hellwig writes:
> This is a pretty big increase in the bio_integrity_payload size,
> but I guess we can't get around it..
Yes, everybody hate this solution, me too, but I've stated with
other approach and it is appeaded to be very ugly.
My idea was that we have
Christoph Hellwig writes:
> This is a pretty big increase in the bio_integrity_payload size,
> but I guess we can't get around it..
Yes, everybody hate this solution, me too, but I've stated with
other approach and it is appeaded to be very ugly.
My idea was that we have two types of iterator
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 3 +++
1 file changed, 3 inse
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, in
Signed-off-by: Dmitry Monakhov
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, int size)
bio_advance(bio
it completely.
TODO: add xfstests testcase here
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 8 +---
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++---
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a
it completely.
TODO: add xfstests testcase here
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 8 +---
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++---
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/block/bio-integrity.c b
bio->bi_iter.bi_size == 0
The simplest way to fix that is to save original data vector and treat is
as immutable.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 6 --
include/linux/bio.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
Currently all integrity prep hooks are open-coded, and if prepare fails
we ignore it's code and fail bio with EIO. Let's return real error to
upper layer, so later caller may react accordingly. For example retry in
case of ENOMEM.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
bio->bi_iter.bi_size == 0
The simplest way to fix that is to save original data vector and treat is
as immutable.
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 6 --
include/linux/bio.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/bio-integrity.c b/blo
Currently all integrity prep hooks are open-coded, and if prepare fails
we ignore it's code and fail bio with EIO. Let's return real error to
upper layer, so later caller may react accordingly. For example retry in
case of ENOMEM.
Signed-off-by: Dmitry Monakhov
---
block/blk-core.c | 5
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## Fix various bugs in T10/DIF/DIX infrastructure
0001-bio-integrity-Do-not-allocate-integrity-context-for-fsync
0002-bio-integrity-save-original-iterator-for-verify-stage
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 5 +++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 3 +++
5 files c
.
This patch does:
- Return error back to caller with hope that it will react on this
- Truncate iterator size
Code was added long time ago here 4550dd6c, luckily no one hit it
in real life :)
changes since V1:
- Replace BUG_ON with error logic.
Signed-off-by: Dmitry Monakhov <dmo
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## Fix various bugs in T10/DIF/DIX infrastructure
0001-bio-integrity-Do-not-allocate-integrity-context-for-fsync
0002-bio-integrity-save-original-iterator-for-verify-stage
Signed-off-by: Dmitry Monakhov
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 5 +++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 3 +++
5 files changed, 14 insertions(+), 13
.
This patch does:
- Return error back to caller with hope that it will react on this
- Truncate iterator size
Code was added long time ago here 4550dd6c, luckily no one hit it
in real life :)
changes since V1:
- Replace BUG_ON with error logic.
Signed-off-by: Dmitry Monakhov
---
drivers
bio->bi_iter.bi_size == 0
The simplest way to fix that is to save original data vector and treat is
as immutable.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 6 --
include/linux/bio.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
bio->bi_iter.bi_size == 0
The simplest way to fix that is to save original data vector and treat is
as immutable.
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 6 --
include/linux/bio.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/bio-integrity.c b/blo
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, in
Signed-off-by: Dmitry Monakhov
---
block/bio.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, int size)
bio_advance(bio
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 4 ++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 3 +++
5 files c
Signed-off-by: Dmitry Monakhov
---
block/t10-pi.c | 9 +++--
drivers/scsi/lpfc/lpfc_scsi.c| 4 ++--
drivers/scsi/qla2xxx/qla_isr.c | 8
drivers/target/target_core_sbc.c | 2 +-
include/linux/t10-pi.h | 3 +++
5 files changed, 13 insertions(+), 13
it completely.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 8 +---
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++---
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/block/bio-integrity.c b/blo
:)
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
include/linux/bvec.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 89b65b8..86b914f 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -70,8
Currently all integrity prep hooks are open-coded, and if prepare fails
we ignore it's code and fail bio with EIO. Let's return real error to
upper layer, so later caller may react accordingly. For example retry in
case of ENOMEM.
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
it completely.
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 8 +---
block/bio.c | 4 ++--
drivers/md/dm.c | 2 +-
include/linux/bio.h | 5 ++---
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index
:)
Signed-off-by: Dmitry Monakhov
---
include/linux/bvec.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 89b65b8..86b914f 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -70,8 +70,7 @@ static inline void
Currently all integrity prep hooks are open-coded, and if prepare fails
we ignore it's code and fail bio with EIO. Let's return real error to
upper layer, so later caller may react accordingly. For example retry in
case of ENOMEM.
Signed-off-by: Dmitry Monakhov
---
block/blk-core.c | 5
/?l=linux-scsi=149087996913448=2
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
drivers/target/target_core_file.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/target/target_core_file.c
b/drivers/target/target_core_file.c
index 8
/?l=linux-scsi=149087996913448=2
Signed-off-by: Dmitry Monakhov
---
drivers/target/target_core_file.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/target/target_core_file.c
b/drivers/target/target_core_file.c
index 87aa376..d69908d 100644
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org>
---
block/bio-integrity.c | 3 +++
1 file changed, 3 inse
blkdev_issue_flush+0x7a/0x85
blkdev_fsync+0x35/0x42
vfs_fsync_range+0x8e/0x9f
vfs_fsync+0x1c/0x1e
do_fsync+0x31/0x4a
SyS_fsync+0x10/0x14
entry_SYSCALL_64_fastpath+0x1f/0xc2
Signed-off-by: Dmitry Monakhov
---
block/bio-integrity.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## General bulletproof protection for block layer
0001 Guard bvec iteration logic
## Fix various bugs in T10/DIF/DIX infrastructure
0002 bio integrity: Do not allocate integrity context for
0003 bio
This patch set fix various problems spotted during T10/DIF integrity machinery
testing.
TOC:
## General bulletproof protection for block layer
0001 Guard bvec iteration logic
## Fix various bugs in T10/DIF/DIX infrastructure
0002 bio integrity: Do not allocate integrity context for
0003 bio
"Martin K. Petersen" <martin.peter...@oracle.com> writes:
> Dmitry Monakhov <dmonak...@openvz.org> writes:
>
> Dmitry,
>
>> scsi_debug has very strange structure from one point it supports
>> dynamic number of devices but from other point context is c
"Martin K. Petersen" writes:
> Dmitry Monakhov writes:
>
> Dmitry,
>
>> scsi_debug has very strange structure from one point it supports
>> dynamic number of devices but from other point context is common for
>> all devices:
>
>> So basically w
Hi scsi_debug has very strange structure
from one point it supports dynamic number of devices
but from other point context is common for all devices:
- dif_storep (array of t10 dif tuples)
- map_storep (block map for thinprovision)
- fake_storep (in memory data storage)
- sdebug_q_arr (queue
Hi scsi_debug has very strange structure
from one point it supports dynamic number of devices
but from other point context is common for all devices:
- dif_storep (array of t10 dif tuples)
- map_storep (block map for thinprovision)
- fake_storep (in memory data storage)
- sdebug_q_arr (queue
It is reasonable drop page cache on discard, otherwise that pages may
be written by writeback second later, so thin provision devices will
not be happy. This seems to be a security leak in case of secure discard case.
Also add check for queue_discard flag on early stage.
Signed-off-by: Dmitry
1 - 100 of 481 matches
Mail list logo