commit 8aca8a97e899ceca552593d63a43588d801a10b3
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Wed May 23 18:53:56 2007 -0400
cleanup thread to clean odf/sr as well on mount if odfforce is not set
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index c6ef2b2..b8cf4bf 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -542,7 +542,7 @@ out:
* MULTIPLIED BY 100
* Modes :
* ODF_CLEAN_ALL: cleans all the dir caches and odf/reclaim
- * ODF_CLEAN_CACHE: cleans all the dir caches
+ * ODF_CLEAN_CACHE: cleans all the dir caches and odf/sr
* ODF_CLEAN_BLOCKS: clean until size blocks are freed
* ODF_CLEAN_INODES: clean until size inodes are freed
* Returns 1 if it manages to bring inodes/block below requested,
@@ -614,12 +614,13 @@ cleanup_loop:
fput(file);
if (!err && reclaim) {
- /* remove all directories in odf/reclaim
+ /* remove all directories in odf/reclaim or odf/sr
* This assumes that the odf/reclaim dir structure
* is entirely flat, ie only odf/reclaim contains
* subdirectories
*/
- if (dentry != odf->odi_rc->dentry) {
+ if (dentry != odf->odi_rc->dentry &&
+ dentry != odf->odi_sr->dentry) {
blocks = dentry->d_inode->i_blocks;
bytes = blocks * dentry->d_sb->s_blocksize;
isize = i_size_read(dentry->d_inode);
@@ -645,7 +646,15 @@ cleanup_loop:
if (err < 0)
goto out;
- if (mode == ODF_CLEAN_CACHE)
+ if (mode == ODF_CLEAN_CACHE && !reclaim) {
+ /* cleanup odf/sr as well */
+ reclaim = 1;
+ buf->reclaim = 1;
+ dget(odf->odi_sr->dentry);
+ stack.item[stack.n++] = odf->odi_sr->dentry;
+ goto cleanup_loop;
+ }
+ else if (mode == ODF_CLEAN_CACHE && reclaim)
success = 1;
if (!success) {
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs