Re: ext4_orphan_del() sleeps in non-journal mode

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

 



D'oh, sorry.

I did not realize that it is our local modification that calls
ext4_orphan_del(NULL) from ext4_end_io_dio. So please ignore the issue
"ext4_orphan_del sleeps in softirq context".

But the other more general issue "ext4_orphan_del sleeps in no-journal
mode" still applies. As Dmitry mentioned in this commit 3d287de3b828
such sleep might degrade performance. In no-journal mode we do not
need to manipulate with i_orphan list and no reason to take the mutex.

I checked all ext4_orphan_del(NULL,...) usages and some of them look
good for me, e.g.

		handle = ext4_journal_start(inode, 2);
		if (IS_ERR(handle)) {
			if (inode->i_nlink)
				ext4_orphan_del(NULL, inode);

In this example we take handle and important thing to note here is
that IS_ERR(handle) can be true only in journal mode when starting
journal failed. In non-journal mode ext4_journal_start() *always*
returns a fake handle that is non-error (see ext4_get_nojournal). So
the example above never sleeps in ext4_orphan_del().

But there are other examples where sleep might happen (at current HEAD
3f0c3c8fe):

inode.c:281
inode.c:956
inode.c:1069
inode.c:1111
inode.c:1177

I think we need to fix these 5 places. In all other cases we check
IS_ERR(handle) and thus do not call ext4_orphan_del() in no-journal
mode.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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