[Ocfs2-tools-devel] [PATCH 0/5] Add "sparse" feature change in tunefs.ocfs2, take 2

Tao Ma tao.ma at oracle.com
Thu Oct 25 00:25:10 PDT 2007


Change from V1 to V2:
1. Change the original extent list to ocfs2_get_cluster based file
   iteration, so that it is simple and easy for future improvement.
2. Use ocfs2_dir_iterate instead of ocfs2_block_iterate since the block
   iteration function will be deprecated soon.
3. Abstract truncating process in ocfs2-tools so that "set sparse" can
   use it to empty the tail of the file.
4. Add more check in "feature_check" so other feature modification will
   will be found and return error.

The disk layout for ocfs2 volume will be changed for sparse files in 1.4,
so for some boxes which have ocfs2-1.2.* installed, it is impossible for
them to access the new-formatted devices. On the other hand, for some
old-formatted volume, we could turn on this feature so that the future
cluster allocation can use it to save space.

Another new usage for tunefs.ocfs2 is to list all the sparse files in a
volume. This is useful before a user want to disable "sparse_files".
It will provide the user a quick way to list all such files. So he might
just decide that some files are not worth it, like coredumps. And he may
choose to remove them to save spaces.

So add "--list-sparse" "--fs-features=[no]sparse" to tunefs.ocfs2, so
that user can use them to do the feature modification work.



More information about the Ocfs2-tools-devel mailing list