On Wed, 8 Mar 2000, Alexander Viro wrote:
> > 1. What purposes has the list s_files ?
> 
> It's the list where all opened files on this filesystem end up. Keeping them
> all on global list didn't scale - we had to traverse the animal in quite
> a few places. 
  ~~~~~~~~~~~~

I just wanted to point out a classical example of using s_files to
determine whether a given filesystem can be remounted readonly (i.e. if
there are no files open for write or with pending unlink) in
fs/file_table.c: fs_may_remount_ro(), which also shows that you need to
take file_list_lock(). Btw, this is the example given in
Neil Brown's VFS Internals paper.

Regards,
Tigran.

Reply via email to