[prev in list] [next in list] [prev in thread] [next in thread] 

List:       reiserfs-devel
Subject:    Re: tail policy question
From:       Alex Zarochentsev <zam () namesys ! com>
Date:       2003-11-14 17:27:17
[Download RAW message or body]

On Thu, Nov 13, 2003 at 09:12:04PM -0800, Hans Reiser wrote:
> Alex Zarochentsev wrote:
> 
> >On Thu, Nov 13, 2003 at 01:34:07PM -0500, Zhihui Zhang wrote:
> > 
> >
> >>Thanks for your and Alex's reply.  I poke around a little bit more and
> >>find out that the mkfs.c does use ITEM_TAIL40_ID, which happens to have
> >>the same value as TAIL_ID (0x6) in the kernel file. 
> >>   
> >>
> >
> >they are from different name spaces.
> > 
> >
> 
> > 
> >
> >>However, I am confused
> >>when I see the following in plugin.h:
> >>
> >>PLUGIN_BY_ID(item_plugin, REISER4_ITEM_PLUGIN_TYPE, item);
> >>PLUGIN_BY_ID(tail_plugin, REISER4_TAIL_PLUGIN_TYPE, tail);
> >>   
> >>
> >
> >IFAIK above defines service functions for plugins of different types, 
> >it does not define concrete plugins. tail_plugin_type should be named
> >as tail_policy_plugin for better understanding.
> >
> > 
> >
> >>The item plugin has TAIL_ID if the item is of tail type. So what is the
> >>use of a separate tail_plugin?  Plus, the tail_plugin has three IDs
> >>defined: NEVER, ALWAYS, and DEFAULT, none of which has a value of 0x6. My
> >>guess is that the item plugin for tails are used to manage tails (merge,
> >>split, read, write?), 
> >>   
> >>
> >
> >yes
> >
> > 
> >
> >>while the tail_plugin is used to decide if a
> >>conversion between tail format and extent format is needed.  If so, the
> >>reiser4.h file should have:
> >>
> >>#define REISER4_TAIL_PLUGIN       (DEFAULT_TAIL_ID)
> >>
> >>instead of
> >>
> >>#define REISER4_TAIL_PLUGIN       (ALWAYS_TAIL_ID)
> >>
> >>Does this make sense? Please clarify this for me.  Thanks.
> >>   
> >>
> >
> >what i would like to see:
> >rename *_TAIL_ID to *_TAIL_POLICY_ID
> >DEFAULT_TAIL_POLICY__ID renamed to SMART_TAIL_POLICY_ID
> > 
> >
> 16K_TAIL_POLICY is more informative....

I think digits cannot be at the first place.

> 
> >#define REISER4_TAIL_POLICY_PLUGIN (one of SMART_TAIL_POLICY_ID 
> >ALWAYS_TAIL_POLICY_ID,
> >NEVER_TAIL_POLICY_ID)
> >
> >Does it make things more clear?
> >
> >Thanks.
> > 
> >
> 
> 
> -- 
> Hans
> 
> 

-- 
Alex.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic