Re: help about ext3 read-only issue on ext3(2.6.16.30)
From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-12-04 20:45:14
Also in:
linux-ext4
From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-12-04 20:45:14
Also in:
linux-ext4
On Wed, Dec 05, 2012 at 12:16:50AM +0800, qixuan wu wrote:
Is there the possibility: one thread(A) is read_dir(directly read
from buffer head), and another thread(B) is creating item, and fill
this buffer header at the same time. During create item, first modify
the last item's rec_len(let it point to next item which initially is
zero), then fill this added new item.This should be handled by the VFS, which uses i_mutex to protect directories before calling the filesystem-specific lookup, rename, readdir, etc functions. So absent some bug where we are missing taking i_mutex (a quick check didn't show any obvious missing paths, although I didn't do an exhaustive code audit), we should be OK.... if we had a bug here, I would have expected that one of the fs stress tests that we run would have shown them up pretty quickly. Regards, - Ted