lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 17 Apr 2014 21:01:25 +0900 From: Namjae Jeon <namjae.jeon@...sung.com> To: 'Lukáš Czerner' <lczerner@...hat.com> Cc: 'Theodore Ts'o' <tytso@....edu>, 'linux-ext4' <linux-ext4@...r.kernel.org> Subject: RE: [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling mode > > On Thu, 17 Apr 2014, Namjae Jeon wrote: > > > Date: Thu, 17 Apr 2014 19:52:09 +0900 > > From: Namjae Jeon <namjae.jeon@...sung.com> > > To: 'Lukáš Czerner' <lczerner@...hat.com> > > Cc: 'Theodore Ts'o' <tytso@....edu>, 'linux-ext4' <linux-ext4@...r.kernel.org> > > Subject: RE: [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling > > mode > > > > > > > > On Thu, 17 Apr 2014, Namjae Jeon wrote: > > > > > > > Date: Thu, 17 Apr 2014 07:29:18 +0900 > > > > From: Namjae Jeon <namjae.jeon@...sung.com> > > > > To: Theodore Ts'o <tytso@....edu> > > > > Cc: linux-ext4 <linux-ext4@...r.kernel.org>, > > > > Lukáš Czerner <lczerner@...hat.com> > > > > Subject: [PATCH 2/3] ext4: fix ZERO_RANGE test failure in data journalling > > > > mode > > > > > > > > From: Namjae Jeon <namjae.jeon@...sung.com> > > > > > > > > xfstests generic/091 is failing when mounting ext4 with data=journal. > > > > I think that this regression is same problem that occurred prior to collapse > > > > range issue. So ZERO RANGE also need to call ext4_force_commit as > > > > collapse range. > > > > > > > > Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com> > > > > Signed-off-by: Ashish Sangwan <a.sangwan@...sung.com> > > > > --- > > > > fs/ext4/extents.c | 7 +++++++ > > > > 1 file changed, 7 insertions(+) > > > > > > > > diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c > > > > index f386dd6..a64242f 100644 > > > > --- a/fs/ext4/extents.c > > > > +++ b/fs/ext4/extents.c > > > > @@ -4742,6 +4742,13 @@ static long ext4_zero_range(struct file *file, loff_t offset, > > > > > > > > trace_ext4_zero_range(inode, offset, len, mode); > > > > > > > > + /* Call ext4_force_commit to flush all data in case of data=journal. */ > > > > + if (ext4_should_journal_data(inode)) { > > > > + ret = ext4_force_commit(inode->i_sb); > > > > + if (ret) > > > > + return ret; > > > > + } > > > > > > Hi, > > Hi Lukas. > > > > > > it makes sense. But I have a question, maybe I do not understand it > > > correctly but what protect us from other writes coming in after we > > > force the commit ? > > Yes, Currently new write can come between ext4_force_commit and till > > we acquire mutex_lock. But this window is already present even > > without patch. Its just that in case of data=journal mode, this > > window will become slightly bigger. one possible solution coming to > > my mind is one more time calling ext4_force_commit followed by a call > > to filemap_write_and_wait_range inside mutex_lock which would sync > > data that has dirtied after 1st call. > > Can we really call ext4_force_commit() inside mutex_lock ? Yes, I can see ext4_force_commit inside mutex_lock in ext4_sync_file(). > > -Lukas > > > > > Thanks! > > > > > > -Lukas > > > > > > > + > > > > /* > > > > * Write out all dirty pages to avoid race conditions > > > > * Then release them. > > > > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists