<div dir="ltr">Hello everyone, <br><br>Here is my report for the second week. In my previous report I said that I was working on adding a new command to hammer2 utility. The command is called “setcmp” for now and what it does is setting the compression mode on a directory or file.<br>
<br>It works like this: “hammer2 setcmp [-r] comp_method directory”, where comp_method can be 0 (no compression), 1 (zero-checking, default) or 2 (LZ4 compression). By default the compression mode is only set on a specified directory (and will be set for any new subdirectories and files written in that directory). If you add the option “-r” it will set recursively the specified compression mode on all existing subdirectories and files (which may take a while in case of directories that have many files and subdirectories).<br>
<br>This command may change its syntax in the future for the sake of consistency with other commands; this is just a first approximation to it.<br><br>So, for now it looks like it’s working OK. I still have to perform more tests to ensure its correctness, and then there are some design issues to be solved, but right now it just works, so hopefully at least some part of the work related to it is done.<br>
<br>If you want to check it out, it is in my repository [1], branch “hammer2_utility”. The code is pretty dirty at this point and there are some minor changes to be done (like, for example, right now it always prints an error message, even though it shouldn’t and later it reports that the compression mode was set). I intend to clean up the code today.<br>
<br>During the following days I still want to work on that utility a bit and ensure that it really works correctly. If it seems that it indeed is correct, then the next week I’ll start working on actually adding the compression to HAMMER2 file system (right now it just sets the mode on inodes and blockrefs, nothing else).<br>
<br>I’ll appreciate any suggestions and feedback. Thank you.<br><br><br>Daniel<br><br>[1] git://<a href="http://leaf.dragonflybsd.org/~iostream/dragonfly.git">leaf.dragonflybsd.org/~iostream/dragonfly.git</a><br></div>