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

Re: Suggestion: Read-Only mount - No gc

> Sorry, should I have been less terse? You can 'remount' filesystems
> read-write when they were previously read-only. If you do so with 
> patch in place, you'll find that you have no GC thread.

> It would be nice to make it start the GC thread (if it's not already
> running) when the filesystem is remounted read-write, and also to 
make it
> _stop_ the GC thread when the filesystem is remounted read-only. 

> Note that you only need to STOP the GC thread in the latter case, 
not kill
> it. And that restarting the GC thread upon 'mount -orw,remount' is 
> even then the filesystem was _already_ read-write, because you can 
> the GC thread directly by sending it the right signal.

> -- 
> dwmw2


I have added the remount support you requested; however, I went
the kill route rather than the stop route. It is more suitable
for my application.

Remounting from RO/RW to RW will start the GC thread if one is
not present. Remounting from RW to RO will kill the GC thread.

Here are the changes in a 'diff -u' format. My testing was
done with inode-v22.c. I have included what I think the
changes for inode-v23.c should be. It looks like the v22 and
v23 are bit out of step in the jffs_read_super() with respect to
lock_super() and module incrementing - so I guessed.

Dan McDonald
The Late Night Software Shop 
Sign up today for your Free E-mail at: http://www.canoe.ca/CanoeMail