Cleancache support in XFS

James Dingwall james.dingwall at zynstra.com
Wed May 1 07:39:09 CDT 2013


In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html

$ grep -r cleancache fs/xfs
on the 3.9 kernel source suggests that no patch was submitted to enable 
cleancache for the XFS filesystem.  Since it was suggested that this 
could be a one liner I've had a go and my first effort is inline below.  
While this seems to compile OK I have no experience in filesystems so I 
would appreciate it if anyone can point out that it is obviously wrong 
and likely to eat my data before I try booting the kernel.

If it seems a reasonable attempt what would be the best way to check 
that it isn't doing nasty things?

Thanks,
James

--- xfs_super.c 2013-04-29 10:28:22.000000000 +0100
+++ xfs_super.cleancache.c      2013-05-01 13:22:44.367763564 +0100
@@ -61,6 +61,7 @@
  #include <linux/kthread.h>
  #include <linux/freezer.h>
  #include <linux/parser.h>
+#include <linux/cleancache.h>

  static const struct super_operations xfs_super_operations;
  static kmem_zone_t *xfs_ioend_zone;
@@ -1489,6 +1490,8 @@
                 goto out_unmount;
         }

+       cleancache_init_fs(sb);
+
         return 0;

   out_filestream_unmount:



More information about the xfs mailing list