[Devel] [RH7 PATCH 2/3] compile fix for ext4-add-mfsync-support part2

2015-07-21 Thread Dmitry Monakhov
__sync_inode was removed in rh7-3.10.0-229.7.2 It is honest to simply disable mfsync in nojournal mode since we so not test nojournal mode at all. https://jira.sw.ru/browse/PSBM-34910 Signed-off-by: Dmitry Monakhov --- fs/ext4/fsync.c | 13 + 1 files changed, 1 insertions(+), 12

[Devel] [RH7 PATCH 3/3] ext4: update defragmentation codebase compile-fix

2015-07-21 Thread Dmitry Monakhov
base commit: 107926c10323f17ec683aee70d05eaf6a080c147 Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c | 18 +- fs/ext4/move_extent.c |2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 7e8a3d8

Re: [Devel] [vzlin-dev] [PATCH rh7] ploop: fix race on prealloc request

2015-08-06 Thread Dmitry Monakhov
Maxim Patlasov writes: > kaio_submit_alloc() sometimes piggybacks ploop request with additional work: > set preq->prealloc_size, pass preq to fsync_thread, perform preallocation > there, get it back to kaio_submit_alloc(), move preallocation from > preq->prealloc_size to io->prealloced_size. > >

[Devel] [RH7 PATCH] ext4: fix automatic csum calculation

2015-08-30 Thread Dmitry Monakhov
m write_end) Minor fix: do not calculate csum for empty files. Signed-off-by: Dmitry Monakhov --- fs/ext4/ext4.h |3 ++- fs/ext4/inode.c| 13 + fs/ext4/pfcache.c | 41 +++-- fs/ext4/truncate.h |3 +++ 4 files changed, 41 insert

[Devel] [RH7 PATCH] ext4: drop pfcache csum on fallocate

2015-09-28 Thread Dmitry Monakhov
If fallocate will change file's data we have to drop csum. Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 08b0709..fe95102 100644 --- a/fs/ext4/extents.c +++ b/fs

Re: [Devel] [RH7 PATCH] ext4: drop pfcache csum on fallocate

2015-09-29 Thread Dmitry Monakhov
Dmitry Monakhov writes: Please ignore this patch, use second version instead > If fallocate will change file's data we have to drop csum. > > Signed-off-by: Dmitry Monakhov > --- > fs/ext4/extents.c |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) &

[Devel] [RH7 PATCH] ext4: drop pfcache csum on fallocate V2

2015-09-29 Thread Dmitry Monakhov
>From 83ea3af40033e4214383a9846d8180d9c096c2e0 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Tue, 29 Sep 2015 14:35:25 +0400 Subject: [RH7 PATCH] ext4: drop pfcache csum on fallocate v2 If fallocate will change file's data we have to drop csum. https://jira.sw.ru/browse/PS

[Devel] [PATCH 1/2] e4defrag2: fix fd leakage

2015-09-30 Thread Dmitry Monakhov
http://kb.odin.com/en/127035 Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 43f38c5..7be14a8 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1964,6 +1964,7

[Devel] [PATCH 2/2] e4defrag2: Fix donor file lookup for IAF defragmentation

2015-09-30 Thread Dmitry Monakhov
Currently dircache per-group bucket explicitly initialized only if IEF candidates are found for a group, but dircache is also required for IAF files. Let's initialize all popilated groups. https://jira.sw.ru/browse/PSBM-40027 Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c |

[Devel] [RH7 PATCH] CBT combined patch

2015-09-30 Thread Dmitry Monakhov
-block-cbt-fix-mistype-statement diff-cbt-add-get_once-feature diff-cbt-fix-bytes-to-block-conversion-bug diff-cbt-add-missed-mutex_unlock Only minor context fixes from original patches https://jira.sw.ru/browse/PSBM-34156 Signed-off-by: Dmitry Monakhov --- block/Kconfig |8

[Devel] [PATCH:rh7] [regression] do not allow to reopen socket

2015-10-27 Thread Dmitry Monakhov
From: dmonak...@gmail.com https://jira.sw.ru/browse/PSBM-40500 Signed-off-by: Dmitry Monakhov Original patch >From e3bb504efd919f7bacd24cb14038953899b909e1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 19 Dec 2014 07:11:56 -0500 Subject: [PATCH] [regression] chunk lost from bd9

[Devel] [PATCH] coreutils/cp: handle EOF extents correctly

2015-10-30 Thread Dmitry Monakhov
-l 1M sparse_falloc.in cp sparse_falloc.in sparse_falloc.out cmp sparse_falloc.in sparse_falloc.out Signed-off-by: Dmitry Monakhov --- src/copy.c | 7 ++- tests/cp/sparse-unwritten.sh | 29 + 2 files changed, 35 insertions(+), 1 deletion(-) cre

[Devel] [RH7 PATCH] [PATCH] ext4: fix data corruption caused by unwritten and delayed extents

2015-12-03 Thread Dmitry Monakhov
ot very reliable, though on machines with bigger page size (like ppc) this can be seen more often (especially xfstest generic/127) Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman Signed-off-by: Dmitry Monakhov --- fs/ext4/extents_status.c |

[Devel] [RH7 PATCH] ext4: fix race aio-dio vs freeze_fs

2015-12-04 Thread Dmitry Monakhov
this this test at the moment. In order to fix this race we have to guard journal transaction with explicit sb_{start,end}_intwrite() as we do with ext4_evict_inode here:8e8ad8a5 Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-)

[Devel] [RH7 PATCH] ext4: ext4_split_extent_at should not cache tail extent

2015-12-10 Thread Dmitry Monakhov
; \ -c "pwrite -S 0xaa -b 128k 64k 128k" \ -c "fcollapse 0k 44k" \ /mnt/t Introduced by this commit: 6682179c7a7ef4368 (Flag was missed during port) https://jira.sw.ru/browse/PSBM-40580 Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c |2 +- 1 files change

[Devel] [RH7 PATCH] port "fs: kernel direct aio"

2015-12-21 Thread Dmitry Monakhov
https://jira.sw.ru/browse/PSBM-42444 Signed-off-by: Dmitry Monakhov --- fs/aio.c | 140 +++ fs/ceph/file.c | 10 +- fs/cifs/file.c | 7 +- fs/fuse/file.c | 12 +- include/linux/aio.h | 15 ++ include/linux

[Devel] [RH7 PATCH] cbt: fix blk_cbt_set endless loop

2016-02-09 Thread Dmitry Monakhov
- If (count % BITS_PER_PAGE == 0) we stuck in endless loop. - (!set) case was also wrong https://jira.sw.ru/browse/PSBM-43936 Signed-off-by: Dmitry Monakhov --- block/blk-cbt.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/block/blk-cbt.c b/block/blk-cbt.c

Re: [Devel] [PATCH rh7] fs: ext4: allow to throttle due to iolimit while reading directory blocks

2016-02-09 Thread Dmitry Monakhov
Vladimir Davydov writes: > Currently, we only throttle on reading/writing page cache. As a result, > if a user runs e.g. `find` inside a container, it will quickly consume > all available quota, so that a following attempt to read/write a file > will hang for an unacceptably long period of time i

Re: [Devel] [PATCH] kvm: do not SetPageDirty from kvm_set_pfn_dirty for file mappings

2016-02-12 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch solves the following problem: file system specific routines > involved in ordinary routine writeback process BUG_ON page_buffers() > because a page goes to writeback without buffer-heads attached. > > The way how kvm_set_pfn_dirty calls SetPageDirty works only f

[Devel] [PATCH 06/10] e4defrag2: validate block device at the beginning

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 3699a28..f1db897 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -2348,16 +2348,32 @@ static void

[Devel] [PATCH 07/10] patch ief_defrag_zoroes.patch

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index f1db897..8714f47 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1848,6 +1848,7 @@ static int prepare_donor(struct defrag_context *dfx

[Devel] [PATCH 01/10] e4defrag2: fixup stat some typos

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index a3d8225..717636f 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -931,8 +931,8 @@ static int group_add_ief_candidate

[Devel] [PATCH 05/10] e4defrag2: improve dircache debug

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 886b832..3699a28 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1075,12 +1075,16 @@ static void

[Devel] [PATCH 03/10] patch fake-op.patch

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 028bf79..6e74ec6 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -2364,6 +2364,8 @@ static void usage(void) fprintf(stderr, "

[Devel] [PATCH 08/10] e4defrag2: Allow to tune ief relocation cluster size

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 8714f47..dab4dbe 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -2409,6 +2409,7 @@ int main(int argc, char

[Devel] [PATCH 02/10] e4defrag2: improve debugging

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 717636f..028bf79 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -408,6 +408,16 @@ void

[Devel] [PATCH 10/10] e4defrag2: fixup IAF fragmentation conditions

2016-02-25 Thread Dmitry Monakhov
..1599: 233383..233386: 4:3681956: 71: 1600..1636:6829915.. 6829951: 37: 233387: eof /mnt/0/var/prometheus/data/c9/30306a52349207.db: 72 extents found https://jira.sw.ru/browse/PSBM-42954 Signed-off-by: Dmitry Monakhov --- misc/e4defr

[Devel] [PATCH 09/10] patch e4defrag-stage3_prep_scan-fix.patch

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index dab4dbe..5738a75 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1616,6 +1616,9 @@ static void pass3_prep(struct

[Devel] [PATCH 04/10] patch endl-fixes.patch

2016-02-25 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 6e74ec6..886b832 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -758,7 +758,7 @@ static int

Re: [Devel] [PATCH rh7 1/3] vfs: fix fallocate(FALLOC_FL_CONVERT_AND_EXTEND)

2016-03-10 Thread Dmitry Monakhov
Maxim Patlasov writes: > Modern vfs_fallocate() checks flags for sanity. To avoid EOPNOTSUPP error, > we have to list FALLOC_FL_CONVERT_AND_EXTEND among other valid flags. Also, > to keep checks uniform, the patch also enforces exclusiveness of the flag. Ack-by: dmonak...@openvz.org > > https://j

Re: [Devel] [PATCH rh7 2/3] ext4: rework fallocate(FALLOC_FL_CONVERT_AND_EXTEND)

2016-03-10 Thread Dmitry Monakhov
Maxim Patlasov writes: > Since Oct 9 2014 (commit 671ddaaab74a8495a549fccae49eb4305c11e5d2), ploop has > not used FALLOC_FL_KEEP_SIZE. This means that the part of > fallocate(FALLOC_FL_CONVERT_AND_EXTEND) extending i_size is redundant now. > Hence, we can use existing (and well tested) ext4_conve

Re: [Devel] [PATCH rh7 3/3] ext4: rename fallocate(FALLOC_FL_CONVERT_AND_EXTEND)

2016-03-10 Thread Dmitry Monakhov
Maxim Patlasov writes: > The feature doesn't extend i_size anymore. Let's rename it properly: > > s/convert_and_extend/convert_unwritten > s/CONVERT_AND_EXTEND/CONVERT_UNWRITTEN > > https://jira.sw.ru/browse/PSBM-22381 Ack-by: dmonak...@openvz.org > > Signed-off-by: Maxim Patlasov > --- > fs/ex

Re: [Devel] [vzlin-dev] [PATCH rh7] ploop: fix direct_io prealloc checks

2016-03-18 Thread Dmitry Monakhov
Maxim Patlasov writes: > Long time ago, when ploop used FALLOC_FL_KEEP_SIZE, the logic of > updating io->prealloced_size was implemented correctly: Ack-by: Dmitry Monakhov > > 1) Calculate [pos, end_pos) -- a fragment of image file we're going to >write to. >

Re: [Devel] [vzlin-dev] [PATCH rh7] ploop: must acquire write access on space allocation

2016-03-19 Thread Dmitry Monakhov
mall about of time. >> https://jira.sw.ru/browse/PSBM-20150 >> >> Signed-off-by: Dmitry Monakhov > Ack-by: Dmitry Monakhov > Signed-off-by: Maxim Patlasov > --- > drivers/block/ploop/io_direct.c | 17 + > 1 file changed, 13 insertions(+), 4 del

Re: [Devel] [vzlin-dev] [PATCH rh7 2/2] ploop: use FALLOC_FL_CONVERT_UNWRITTEN in io_direct

2016-03-19 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch implements an optimization of submit_alloc path for pio_direct: > write user data directly to host block-device (accordingly to fiemap info) > and then use fallocate(FALLOC_FL_CONVERT_UNWRITTEN). This avoids expensive > pagecache_write_begin/copy/pagecache_write

Re: [Devel] [PATCH rh7 2/2] block: suppress hard lockup warning in elv_drain_elevator

2016-03-19 Thread Dmitry Monakhov
Vladimir Davydov writes: > Under heavy io sg_io() might keep busy-looping in elv_drain_elevator() > under queue_lock and irqs disabled for quite a bit while trying to > insert a request to the tail of the queue, resulting in hard lockup: ACK > > Kernel panic - not syncing: Watchdog detected har

Re: [Devel] [PATCH rh7 1/2] kernel/watchdog.c: touch_nmi_watchdog should only touch local cpu not every one

2016-03-19 Thread Dmitry Monakhov
Vladimir Davydov writes: > From: Ben Zhang ACK > > I ran into a scenario where while one cpu was stuck and should have > panic'd because of the NMI watchdog, it didn't. The reason was another > cpu was spewing stack dumps on to the console. Upon investigation, I > noticed that when writing to

Re: [Devel] [vzlin-dev] [PATCH rh7 1/2] ploop: replace BLOCK_UNINIT

2016-03-19 Thread Dmitry Monakhov
Maxim Patlasov writes: > Next patch will need em->block_start even for unwritten extents. Instead of > using em->block_start == ~0, let's introduce new explicit field of 'em'. > > https://jira.sw.ru/browse/PSBM-22381 Ack-by:Dmitry Monakhov > > Signed-off-by: Maxim Patlasov > --- > drivers/bloc

Re: [Devel] [PATCH rh7 2/3] dcache: don't remove from shrink list in select_collect()

2016-03-24 Thread Dmitry Monakhov
Vladimir Davydov writes: > From: Al Viro > > Backport mainstream commit: > > commit fe91522a7ba82ca1a51b07e19954b3825e4aaa22 > Author: Al Viro > Date: Sat May 3 00:02:25 2014 -0400 > > don't remove from shrink list in select_collect() > > If we find something already on

Re: [Devel] [PATCH rh7 3/3] dcache: zap dentry_lru_del()

2016-03-24 Thread Dmitry Monakhov
Vladimir Davydov writes: > dentry_lru_del() is buggy - it tries to remove a dentry from a shrink > list, which is not protected by any locks and can only be safely > modified by a caller of dcache shrinker. Previous two patches replaced > this function calls with d_lru_del() and corresponding che

Re: [Devel] [PATCH rh7 1/3] dcache: dentry_kill(): don't try to remove from shrink list

2016-03-24 Thread Dmitry Monakhov
Vladimir Davydov writes: > Backport mainstream commit: > > commit 41edf278fc2f042f4e22a12ed87d19c5201210e1 > Author: Al Viro > Date: Thu May 1 10:30:00 2014 -0400 > > dentry_kill(): don't try to remove from shrink list > > If the victim in on the shrink list, don't remove it

[Devel] [PATCH] e4defrag2: Check fs-cross before call scan_fn handler

2016-04-08 Thread Dmitry Monakhov
https://jira.sw.ru/browse/PSBM-45214 Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 0643fa4..8ecae16 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1249,6 +1249,8

Re: [Devel] [vzlin-dev] [PATCH rh7] ploop: io_direct must fsync after fallocate

2016-04-08 Thread Dmitry Monakhov
Maxim Patlasov writes: > While handling fallocate(), ext4 firstly calls ext4_update_inode_size(), > then ext4_mark_inode_dirty(). Both update only in-core state. After > fallocate(), ploop updates BAT bypassing vfs layer (submit bio to > underlying block device). Hence, it's possible that BAT is

Re: [Devel] [vzlin-dev] [PATCH rh7] cbt: remove useless rcu_dereference() -v2

2016-04-08 Thread Dmitry Monakhov
Maxim Patlasov writes: > The implementation of CBT (blk-cbt.c) RCU-protects q->cbt, not cbt->map[ixd]. > > In v2: > - fixed one more place with redundant rcu_dereference > > Signed-off-by: Maxim Patlasov ACK. > --- > block/blk-cbt.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-

Re: [Devel] [PATCH rh7 1/5] cbt: factor out alloc_page

2016-04-09 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch moves the logic of allocating new page for cbt->map[idx] to > a separate function. It will be used in further patches. ACK > > Signed-off-by: Maxim Patlasov > --- > block/blk-cbt.c | 98 > +++ > 1 file cha

Re: [Devel] [PATCH rh7 2/5] cbt: introduce CBT_PAGE_MISSED

2016-04-09 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch introduces CBT_PAGE_MISSED -- a special value of cbt->map[i]. > No logic changed. The value will be used by the next patch. > > Signed-off-by: Maxim Patlasov ACK > --- > block/blk-cbt.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-

Re: [Devel] [PATCH rh7 3/5] cbt: make __blk_cbt_set() smarter

2016-04-11 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch adds two new args to __blk_cbt_set: pages_missed and idx_first. > Both are pointers. No logic changed, so far as everybody passes NULL/NULL. > The next patch will pass non-trivial values. > > The idea is to mark slots in cbt->map[idx] that need allocation with >

Re: [Devel] [PATCH rh7 5/5] cbt: add blk_cbt_map_copy_once() helper

2016-04-11 Thread Dmitry Monakhov
Maxim Patlasov writes: > Ploop will use the helper to make private "snapshot" copy of CBT mask. > > Signed-off-by: Maxim Patlasov ACK > --- > block/blk-cbt.c| 59 > > include/linux/blkdev.h |2 ++ > 2 files changed, 61 insertions(+

[Devel] [PATCH] ploop: force journal commit after dio_post_submit

2016-04-27 Thread Dmitry Monakhov
deferring fsync.But this is subject of another patch. Signed-off-by: Dmitry Monakhov --- drivers/block/ploop/io_direct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c index 8032999..5a2e12a 100644 --- a/drivers/block/ploop

Re: [Devel] [PATCH] ploop: force journal commit after dio_post_submit

2016-04-28 Thread Dmitry Monakhov
pletion. At this moment all extent modification already in journal. So once user call fsync it will call jbd2_complete_transaction() which is simply guarantee that transaction becomes stable on disk. > > Thanks, > Maxim > > On 04/27/2016 07:42 AM, Dmitry Monakhov wrote: >> On

Re: [Devel] [PATCH rh7 2/4] ploop: implement PLOOP_IOC_PUSH_BACKUP_IO

2016-04-30 Thread Dmitry Monakhov
Maxim Patlasov writes: > The ioctl(PLOOP_IOC_PUSH_BACKUP_IO) has two mode of operation: > Ack. See minor issue below. > 1) ctl.direction=PLOOP_READ tells userspace which cluster-blocks to > push out-of-band; moves processed preq-s from pending_tree to reported_tree > > 2) ctl.direction=PLOOP_WRIT

Re: [Devel] [PATCH rh7 3/4] ploop: wire push_backup into state-machine

2016-04-30 Thread Dmitry Monakhov
Maxim Patlasov writes: I can not avoid obsession that this request joggling fully destroys FS barriers assumptions. For example: fs does submit_bio(data_b1) submit_bio(data_b2) submit_bio(commit_b3, FLUSH|FUA) journal commit record wait_for_bio(commit_b3) But there is no guaranee that data_b1 a

Re: [Devel] [PATCH rh7 4/4] ploop: push_backup cleanup

2016-04-30 Thread Dmitry Monakhov
all suspended preq-s. Otherwise, > we won't be able to destroy ploop because some preq-s are still not > completed. > Acked-by: Dmitry Monakhov > Signed-off-by: Maxim Patlasov > --- > drivers/block/ploop/push_backup.c | 36 +++- > 1 file cha

Re: [Devel] [PATCH rh7 1/4] ploop: introduce pbd

2016-04-30 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch introduce push_backup descriptor ("pbd") and a few simple > functions to create and release it. > > Userspace can govern it by new ioctls: PLOOP_IOC_PUSH_BACKUP_INIT and > PLOOP_IOC_PUSH_BACKUP_STOP. Acked-by: Dmitry Monakhov > >

[Devel] [PATCH rh7] ploop: push_backup: fix reentrance in ploop_pb_get_pending()

2016-05-09 Thread Dmitry Monakhov
The patch implements what Dima Monakhov suggested: > AFAIU you have a re-entrance issue if several tasks want performs ioctls > task1:ioctl->wait > task2:ioctl->wait > > Just change wait sequence like this and you are safe: > /* blocking case */ >

Re: [Devel] [PATCH rh7] cbt: fix cbt->block_max calculation

2016-05-10 Thread Dmitry Monakhov
Maxim Patlasov writes: > When the size of block device is multiple of CBT blocksize, the following: > >> cbt->block_max = (size + blocksize) >> cbt->block_bits; Pure typo fix. ACK. > > is incorrect. This may end up in allocating one extra page in cbt->map and > also make various checks with cbt-

[Devel] [RH6 PATCH] [MS] ext4: collapse a single extent tree block into the inode if possible

2016-05-16 Thread Dmitry Monakhov
significantly increase the fsck time of the file system. Google-Bug-Id: 6801242 Signed-off-by: "Theodore Ts'o" Signed-off-by: Dmitry Monakhov diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 85c4d4e..5eba717 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1

[Devel] [PATCH 5/6] e4defrag2: prevent agressive donor lookup

2016-05-16 Thread Dmitry Monakhov
It was bad idea to try all dirs from all groups for donor especially for big filesystems. Let's scan only local ones. Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c

[Devel] [PATCH 6/6] e4defrag2: fix collapse inode index tree issue

2016-05-16 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 68 +++-- 1 files changed, 55 insertions(+), 13 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 7aab2b4..d351965 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c

[Devel] [PATCH 4/6] ext4defrag2: add on/off forcelocal option

2016-05-16 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 0ca7a63..771ee51 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -2516,7 +2516,7 @@ int main(int argc, char *argv

[Devel] [PATCH 3/6] ext4defrag2: improve statistics configuration

2016-05-16 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 85 + 1 files changed, 65 insertions(+), 20 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 9206c89..0ca7a63 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c

[Devel] [PATCH 2/6] e4defrag2: [TP case] force defrag for very low populated clusters

2016-05-16 Thread Dmitry Monakhov
If cluster has small numbers of blocks used it is reasonable to relocate such blocks regardless to inode's quality and free whole cluster. https://jira.sw.ru/browse/PSBM-46563 Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 54 +---

[Devel] [PATCH 1/6] e4defrag2: improve debugging

2016-05-16 Thread Dmitry Monakhov
Dump doror rejection reason. Signed-off-by: Dmitry Monakhov --- misc/e4defrag2.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index 8ecae16..797a342 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -217,6

Re: [Devel] [vzlin-dev] [PATCH rh7 2/4] ploop: io_direct: check for fsync fop on startup

2016-05-20 Thread Dmitry Monakhov
Maxim Patlasov writes: > We don't support host file systems without fsync fop. The patch refuses > to start ploop if fsync is absent. > > Signed-off-by: Maxim Patlasov Acked-by:dmonak...@openvz.org > --- > drivers/block/ploop/io_direct.c | 23 --- > 1 file changed, 12 inse

Re: [Devel] [vzlin-dev] [PATCH rh7 3/4] ploop: get rid of dio_fsync()

2016-05-20 Thread Dmitry Monakhov
Maxim Patlasov writes: > For ext4 dio_fsync() is actually equivalent to direct call to fsync fop: > > 1) file->f_op cannot be NULL; > 2) file->f_op->fsync is always equal to ext4_sync_file; > 3) ext4_sync_file() does filemap_write_and_wait() internally, >no need to call it explicitly. > > The

Re: [Devel] [vzlin-dev] [PATCH rh7 1/4] ploop: get rid of FOP_FSYNC

2016-05-20 Thread Dmitry Monakhov
Maxim Patlasov writes: > We keep ploop sources as in-tree module of rhel7-based kernel. So we know > for sure how fsync fop prototype looks like. > > Signed-off-by: Maxim Patlasov Acked-by:dmonak...@openvz.org > --- > drivers/block/ploop/io_direct.c | 15 +-- > include/linux/ploop

Re: [Devel] [vzlin-dev] [PATCH rh7 4/4] ploop: get rid of direct calls to file->f_op->fsync()

2016-05-20 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch hides file->f_op->fsync() in dio_sync. The only exception is > dio_truncate where "file" may come from userspace fd. > > Signed-off-by: Maxim Patlasov Acked-by:dmonak...@openvz.org > --- > drivers/block/ploop/io_direct.c | 13 + > 1 file changed,

Re: [Devel] [PATCH rh7] cbt: fix possible race on alloc_page()

2016-05-25 Thread Dmitry Monakhov
Maxim Patlasov writes: > cbt_page_alloc() drops cbt->lock before calling alloc_page(), > then re-acquires it. It's safer to re-check that cbt->map[idx] > is still NULL after re-acquiring the lock. > > Signed-off-by: Maxim Patlasov Indeed. Ack. > --- > block/blk-cbt.c |7 ++- > 1 file ch

Re: [Devel] [PATCH rh7] ploop: io_direct: delay f_op->fsync() until FLUSH|FUA

2016-05-26 Thread Dmitry Monakhov
Maxim Patlasov writes: > Once we converted extent to initialized it can be part of uncompleted > journal transaction, so we have to force transaction commit at some point. > > Instead of forcing transaction commit immediately, the patch delays it > until an incoming bio with FLUSH|FUA arrives. Th

Re: [Devel] [vzlin-dev] [PATCH rh7 1/2] ploop: push_backup: roll back ALLOW_READS patch

2016-06-08 Thread Dmitry Monakhov
Maxim Patlasov writes: > The patch reverts: > > Subject: [PATCH rh7] ploop: push_backup must pass READs intact > > If push_backup is in progress (doesn't matter "full" or "incremental") and > ploop state-machine detects incoming WRITE request to the cluster-block that > was not push_backup-ed yet

Re: [Devel] [vzlin-dev] [PATCH rh7 2/2] ploop: push_backup: rework lockout machinery

2016-06-08 Thread Dmitry Monakhov
Maxim Patlasov writes: > It was not very nice idea to reuse plo->lockout_tree for push_backup. Because > by design only one preq (for any given req_cluster) can sit in the lockout > tree, but while we're reusing the tree for a WRITE request, a READ from > backup tool may come. Such a READ may wan

Re: [Devel] [PATCH rh7] cbt: blk_cbt_update_size() should not copy uninitialized data

2016-06-09 Thread Dmitry Monakhov
Maxim Patlasov writes: > to_cpy is the number of page pointers to copy from current cbt to new. > The following check: > >> if ((new_sz + bsz) >> cbt->block_bits <= cbt->block_max) >> goto err_mtx; > > ensures that the copy will be done only for new cbt bigger than current. So,

Re: [Devel] [PATCH rh7] cbt: blk_cbt_update_size() must return if cbt->block_max not changed

2016-06-09 Thread Dmitry Monakhov
Maxim Patlasov writes: > It's useless to recreate cbt every time as we called for the same > block-device size. Actually, it's worthy only if cbt->block_max > increases. > > Since commit b8e560a299 (fix cbt->block_max calculation), we calculate > cbt->block_max precisely: > >> cbt->block_ma

Re: [Devel] [vzlin-dev] [PATCH rh7] ploop: push_backup: PLOOP_PEEK mode of ioctl(PLOOP_IOC_PUSH_BACKUP_IO)

2016-06-09 Thread Dmitry Monakhov
> Now, before stopping push_backup, userspace backup tool can ask ploop > about blocks needed to backup, but not reported as backed up: > > ctl->direction = PLOOP_PEEK; > ctl->n_extents = n; /* where n >= 1*/ > ret = ioctl(pfd, PLOOP_IOC_PUSH_BACKUP_IO, ctl); > > If push_backup w

[Devel] [PATCH 1/3] ploop: skip redundant fsync for REQ_FUA in post_submit

2016-06-15 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- drivers/block/ploop/io_direct.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c index b844a80..74a554a 100644 --- a/drivers/block/ploop/io_direct.c

[Devel] [PATCH 2/3] ploop: deadcode cleanup

2016-06-15 Thread Dmitry Monakhov
(rw & REQ_FUA) branch is impossible because REQ_FUA was cleared line above. Logic was moved to ploop_req_delay_fua_possible() long time ago. Signed-off-by: Dmitry Monakhov --- drivers/block/ploop/io_direct.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/block/p

[Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-15 Thread Dmitry Monakhov
W2, WBI:FUA, W1:NULLIFY:FUA https://jira.sw.ru/browse/PSBM-47107 Signed-off-by: Dmitry Monakhov --- drivers/block/ploop/dev.c | 10 +++--- drivers/block/ploop/map.c | 29 - 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/block/ploop/dev.c

[Devel] Re: openvz: Oops in ext4 when VPS starts

2010-07-23 Thread Dmitry Monakhov
Drunkard Zhang writes: > 2010/7/22 Ted Ts'o : >> On Thu, Jul 22, 2010 at 05:39:16PM +0800, Drunkard Zhang wrote: >>> I run into a oops when mirgate /vz directory to ext4 lvm under gentoo + >>> openvz. >> >> What were you doing precisely at the time of the oops?  The oops logs >> indicates it was

[Devel] [PATCH 0/3] ext4: Extent code cleanup

2007-06-22 Thread Dmitry Monakhov
Hi, i've finaly found time to review and test ext4 patches. And i have some fixes: [1] One more one line fix for ext4-block-reservation patch. IMHO it is better to merge it with my previous block reservation fixes. [2] Fix compilation with EXT_DEBUG [3] Some code cleanup

[Devel] [PATCH 1/3] ext4 block reservation fix3

2007-06-22 Thread Dmitry Monakhov
If ext4_reserve_block has failed we have to drop quota. Signed-off-by: Dmitry Monakhov <[EMAIL PROTECTED]> --- fs/ext4/balloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index a9655f1..eacffd3 100644 --- a/fs/ext4/balloc.c

[Devel] [PATCH 2/3] extent compilation fixes

2007-06-22 Thread Dmitry Monakhov
Fix compilation with EXT_DEBUG, also fix leXX_to_cpu convertions. Signed-off-by: Dmitry Monakhov <[EMAIL PROTECTED]> --- fs/ext4/extents.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 6f72dcb..1

[Devel] [PATCH 3/3] ext4: extent macros cleanup

2007-06-22 Thread Dmitry Monakhov
- Replace math equation to it's macro equivalent - make ext4_ext_grow_indepth() indexes/leaf correct Signed-off-by: Dmitry Monakhov <[EMAIL PROTECTED]> --- fs/ext4/extents.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext

[Devel] Re: [PATCH] ext3: fix ext34_fill_super group description initialization

2007-08-13 Thread Dmitry Monakhov
On 13:09 Mon 13 Aug , Dmitry Monakhov wrote: > ->s_group_desc have to be zero filled because if sb_read() failed > we jump to following error path. > failed_mount2: > for (i = 0; i < db_count; i++) > brelse(sbi->s_group_desc[i]);<< Bad things

[Devel] [PATCH] ext3: fix ext34_fill_super group description initialization

2007-08-13 Thread Dmitry Monakhov
->s_group_desc have to be zero filled because if sb_read() failed we jump to following error path. failed_mount2: for (i = 0; i < db_count; i++) brelse(sbi->s_group_desc[i]);<< Bad things may happen here Signed-off-by: Dmitry Monakhov <[EMAIL PROTEC

Re: [Devel] vziolimits: lost patch?

2015-05-06 Thread Dmitry Monakhov
Konstantin Khorenko writes: > Dima, please take a look: > > there was 1 more vziolimit patch (attached), > is it lost or not needed now? Patch is correct, but it belongs to thorottle patch set. > > Thank you. > > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > Author:

<    1   2