Hi Pierpaolo.

On Wed, Aug 05, 2009 at 12:19:20PM +0000, pierpaolo giacomin ([email protected]) 
wrote:
> in attachment you can find a patch for pohmelfs module
> (pohmelfs_kernel_y.patch) and a patch for the cfg tool
> (pohmelfs_cfg_y.patch).
> These patches enables two new commands in the cfg tool.
> dump (syntax cfg -A dump)
> this command is equivalent to the show command but for all active indexes.
> 
> and flush (syntax cfg -A flush or cfg -A flush -i index)
> this command is equivalent to del but allow you to delete all entries, or
> in the case of the -i parameter all entries for a given index.
> the reply of the command is the same for dump.
> 
> In order to enable the first one without messing with the choice of an
> unsigned int for idx I choose arbitrary a POHMELFS_NULL_IDX (defined in
> netfs.h). If you try to use directly in the cfg tool such an index you are
> warned and stopped.
> 
> Moreover I've a couple of questions. 
> 1. For the flush command I followed the same policy of the action "del" in
> pohmelfs_cn_ctl (config.c): i delete each entry and i don't check if the
> config_group is empty nor i delete it in the case. Is it be the right
> behaviour? In this case where a config_group is deleted if empty?

It will be flushed on umount. It could be a good idea to free it at
deletion time if it is empty.

> 2. Isn't passing all arguments even for delete a bit... unconvenient?
> Woulnd't be better to have two levels of indexes?

Well, hard to tell. Usually the more indexes we have the more we want
since there will be something we did not use in the previous ones.
Having a full parameter list simplifies searching, but may look not
that conveneint though.

Thanks for the patches. They look good, but are reversed and do not
match some codying style issues used to be used in kernel like space and
braces placement.

Please also provide signed-off line as described in
Documentation/SubmittingPatches

> Finally... thank you for pohmelfs :)

Thanks for giving it a try :)

-- 
        Evgeniy Polyakov
_______________________________________________
Pohmelfs mailing list
[email protected]
http://www.ioremap.net/cgi-bin/mailman/listinfo/pohmelfs

Reply via email to