[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

[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

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:

Re: [Devel] [vzlin-dev] [RH7 PATCH 1/2] port diff-ext4-in-containers-treat-panic_on_errors-as-remount-ro_on_errors

2015-06-10 Thread Dmitry Monakhov
tin Khlebnikov > Acked-by: Maxim V. Patlasov > > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 06/07/2015 09:20 PM, Dmitry Monakhov wrote: >> >> Signed-off-by: Dmitry Monakhov >> --- >> fs/ext4/super.c | 14

Re: [Devel] [PATCH rh7] ub: resurrect sync accounting

2015-06-10 Thread Dmitry Monakhov
Konstantin Khorenko writes: Acked-by > Dima, please review. > > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 06/10/2015 11:16 AM, Vladimir Davydov wrote: >> Related to https://jira.sw.ru/browse/PSBM-34007 >> >> Signed-off-by: Vladimir Davydov >> --- >> fs/s

Re: [Devel] [PATCH rh7 0/7] ub: resurrect blkio prio/stats

2015-06-10 Thread Dmitry Monakhov
Konstantin Khorenko writes: > Dima, please review the patchset. > > -- > Best regards, > > Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 06/09/2015 05:06 PM, Vladimir Davydov wrote: >> https://jira.sw.ru/browse/PSBM-34007 >> >> Vladimir Davydov (7): >> ioprio: move IOPRIO_WHO_UBC h

Re: [Devel] [PATCH rh7 0/3] ext4: speedup shrinking non-delay extents

2018-04-13 Thread Dmitry Monakhov
Konstantin Khorenko writes: > We faced a situation when all (32) cpus on a node content on sbi->s_es_lock > shrinking extents on a single superblock and > shrinking extents goes very slow (180 sec in average!). > > crash> struct ext4_sb_info 0x882fcb7ca800 -p > > s_es_nr_inode = 3173832, >

[Devel] [RH7 PATCH] ext4: fallocate mode - convert and extend

2015-06-23 Thread Dmitry Monakhov
rowse/PSBM-22381 Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c | 135 ++- include/uapi/linux/falloc.h |3 + 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 606a47c..dfa4e7a 10

[Devel] [RH7 PATCH 1/3] ext4: fix wrong assert in ext4_mb_normalize_request()

2015-06-23 Thread Dmitry Monakhov
Signed-off-by: Theodore Ts'o Signed-off-by: Dmitry Monakhov --- fs/ext4/mballoc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index dca78da..ebc7255 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@

[Devel] [RH7 PATCH 2/3] ext4: CVE-2014-8086 prevent bugon on race between write/fcntl

2015-06-23 Thread Dmitry Monakhov
18 8b 00 85 c0 89 RIP [] ext4_direct_IO+0x162/0x3d0 RSP Reported-by: Sasha Levin Signed-off-by: Theodore Ts'o Signed-off-by: Dmitry Monakhov Cc: sta...@vger.kernel.org --- fs/ext4/file.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/f

[Devel] [RH7 PATCH 3/3] [fs] file_table: get rid of s_files and files_lock

2015-06-23 Thread Dmitry Monakhov
42 2013 -0400 get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro Signed-off-by: Jarod Wilson Signed-off-by: Dmitry M

[Devel] [RH7 PATCH 1/2] fs: check container odirect and fsync settings in __dentry_open

2015-06-24 Thread Dmitry Monakhov
yanov Acked-by: Dmitry Monakhov Signed-off-by: Dmitry Monakhov --- fs/open.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/open.c b/fs/open.c index 435794f..d64cfad 100644 --- a/fs/open.c +++ b/fs/open.c @@ -683,6 +683,11 @@ static int do_dentry_open(struct

[Devel] [RH7 PATCH 2/2] jbd2: raid amnesia protection for the journal

2015-06-24 Thread Dmitry Monakhov
ambiguity we should pefrorm 'stabilize write'. 1) Read and rewrite latest commit id block 2) Invalidate next block in order to guarantee that journal head becomes stable. Signed-off-by: Dmitry Monakhov --- fs/jbd2/recovery.c | 77 +++-

[Devel] [RH7 PATCH 1/6] vfs: add support for a lazytime mount option

2015-06-25 Thread Dmitry Monakhov
M-20411 Signed-off-by: Theodore Ts'o Signed-off-by: Al Viro Signed-off-by: Dmitry Monakhov --- fs/ext4/inode.c |6 fs/fs-writeback.c| 62 +++-- fs/gfs2/file.c |4 +- fs/inode.c

[Devel] [RH7 PATCH 2/6] vfs: add find_inode_nowait() function

2015-06-25 Thread Dmitry Monakhov
the inode's reference count. Signed-off-by: Theodore Ts'o Signed-off-by: Al Viro Signed-off-by: Dmitry Monakhov --- fs/inode.c | 50 ++ include/linux/fs.h |5 + 2 files changed, 55 insertions(+), 0 deletions(-) diff

[Devel] [RH7 PATCH 3/6] ext4: add optimization for the lazytime mount option

2015-06-25 Thread Dmitry Monakhov
x27;o Signed-off-by: Al Viro Signed-off-by: Dmitry Monakhov --- fs/ext4/inode.c | 60 +++ fs/ext4/super.c | 10 +++ include/trace/events/ext4.h | 30 + 3 files changed, 100 insertions(+), 0 deletions(-)

[Devel] [RH7 PATCH 4/6] fs: make sure the timestamps for lazytime inodes eventually get written

2015-06-25 Thread Dmitry Monakhov
ure these inodes get written out. We do this by setting up a second delayed work structure which wakes up the CPU much more rarely compared to writeback_expire_centisecs. Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Signed-off-by: Dmitry Monakhov --- fs/fs-writeback.c

[Devel] [RH7 PATCH 5/6] fs: add dirtytime_expire_seconds sysctl

2015-06-25 Thread Dmitry Monakhov
ML-commit: 1efff914afac8a965ad63817ecf8861a927c2ace Mon Sep 17 00:00:00 2001 Add a tuning knob so we can adjust the dirtytime expiration timeout, which is very useful for testing lazytime. Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Signed-off-by: Dmitry Monakhov --- fs/fs-writeb

[Devel] [RH7 PATCH 6/6] ext4: fix lazytime optimization

2015-06-25 Thread Dmitry Monakhov
ML-commit 8f4d855839179f410fa910a26eb81d646d628f26 Mon Sep 17 00:00:00 2001 We had a fencepost error in the lazytime optimization which means that timestamp would get written to the wrong inode. Signed-off-by: Theodore Ts'o Signed-off-by: Dmitry Monakhov --- fs/ext4/inode.c |2 +- 1

Re: [Devel] [PATCH RH7 v2 1/4] ve: remove sysctl_fsync_enable and use ve_fsync_behavior instead

2015-06-30 Thread Dmitry Monakhov
Pavel Tikhomirov writes: > - sysctl_fsync_enable is always = 2 and checking it is meaningless > - we already changed it with ve_fsync_behavior in setfl and dentry_open > - in do_fsync and syncfs we have both checks > - in msync replace > - in sync_file_range we don't need replacement according to

Re: [Devel] [PATCH RH7 v2 2/4] ve: initialize fsync_enable also for non ve0 environment

2015-06-30 Thread Dmitry Monakhov
Pavel Tikhomirov writes: > v2: only on ve cgroup creation ACK > > https://jira.sw.ru/browse/PSBM-34286 > Signed-off-by: Pavel Tikhomirov > --- > kernel/ve/ve.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c > index 8bbba1f..212c781 100644 > --- a/kern

Re: [Devel] [PATCH RH7 v2 4/4] ve: cgroup: initialize odirect_enable, features and _randomize_va_space

2015-06-30 Thread Dmitry Monakhov
Pavel Tikhomirov writes: > v2: move intitialization from init_ve_struct to ve_create, remove > get_ve_features > > Signed-off-by: Pavel Tikhomirov > --- > kernel/ve/ve.c | 5 + > kernel/ve/vecalls.c | 23 --- > 2 files changed, 5 insertions(+), 23 deletions(-) ACK

Re: [Devel] [PATCH rh7 1/3] vfs: fix data corruption when blocksize < pagesize for mmaped data

2015-07-01 Thread Dmitry Monakhov
Cyrill Gorcunov writes: > From: Jan Kara > > ->page_mkwrite() is used by filesystems to allocate blocks under a page > which is becoming writeably mmapped in some process' address space. This > allows a filesystem to return a page fault if there is not enough space > available, user exceeds quot

Re: [Devel] [PATCH 2/3] ext4: fix lost truncate due to race with writeback

2015-07-01 Thread Dmitry Monakhov
Cyrill Gorcunov writes: > From: Jan Kara > > The following race can lead to a loss of i_disksize update from truncate > thus resulting in a wrong inode size if the inode size isn't updated > again before inode is reclaimed: > > ext4_setattr()mpage_map_and_submit_e

Re: [Devel] [PATCH rh7 3/3] ext4: fix mmap data corruption when blocksize < pagesize

2015-07-01 Thread Dmitry Monakhov
Cyrill Gorcunov writes: > From: Jan Kara > > Use truncate_isize_extended() when hole is being created in a file so that > ->page_mkwrite() will get called for the partial tail page if it is > mmaped (see the first patch in the series for details). > > gorcunov@: > - ML d6320cbfc92910a3e5f10c42d

[Devel] [RH7 PATCH] ext4: ext4_ext_drop_refs ignode null path

2015-07-02 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- fs/ext4/extents.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 37d04d3..8b4a7fc 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -584,9 +584,12 @@ static void ext4_ext_show_move(

[Devel] [PATCH] cfq-iosched: Fix wrong children_weight calculation

2015-07-17 Thread Dmitry Monakhov
g Signed-off-by: Jens Axboe Signed-off-by: Dmitry Monakhov --- block/cfq-iosched.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index cadc378..d749463 100644 --- a/block/cfq-iosched.c +++ b/block

[Devel] [RH7 PATCH] ext4: move ext4_truncate_data_csum out of transaction

2015-07-20 Thread Dmitry Monakhov
->update_time ->ext4_dirty_inode ->ext4_journal_start_sb -> start journal on another FS ->BUGON Signed-off-by: Dmitry Monakhov --- fs/ext4/inode.c |2 ++ fs/ext4/pfcache.c |3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/ext4/inode.c b/fs/e

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

2015-07-21 Thread Dmitry Monakhov
ext4_flush_unwritten_io was removed in rh7-3.10.0-229.7.2 https://jira.sw.ru/browse/PSBM-34909 Signed-off-by: Dmitry Monakhov --- fs/ext4/fsync.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index 99582b8..8235438 100644 --- a/fs

[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

  1   2   >