Re: [PATCH 2/3] ext4: remove incorrect check for inode journal mode in ext4_writepages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Actually what you do only hides the real problem - that ext4_writepages()
> in non-journalled mode can be still running for an inode which is already
> switched to journalled mode. In theory if we manage to dirty some pages
> after the switch, non-journalled writepages *can* see them an try to write
> them back which will break spectacularly. So to fix this we need something
> like a writeback barrier for the inode - make sure all ext4_writepages()
> calls have completed before switching aops. Now I'd hate to grow struct
> ext4_inode_info only for this extra rare case so we could probably
> implement the barrier on per-filesystem basis - a fs-wide per-cpu rw
> semaphore acquired for reading while ext4_writepages() runs and acquired
> for writing when we switch aops for some inode.

Yes, there is another issue that newly dirtied pages after the switch can be
shown in ext4_writepages() in non-journalled mode. I overlooked that point.
According to your comment, I will modify this patch.

Thank you, again.
��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux