<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<br>
Re: KNOWN.<br>
<br>
These are on disk flags.  It’s a mask used to check for unknown flags.<br>
<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-devel <lustre-devel-bounces@lists.lustre.org> on behalf of NeilBrown <neilb@suse.com><br>
<b>Sent:</b> Monday, December 17, 2018 5:54:41 PM<br>
<b>To:</b> James Simmons; Andreas Dilger; Oleg Drokin; Bobi Jam; Jinshan Xiong<br>
<b>Cc:</b> Lustre Development List<br>
<b>Subject:</b> Re: [lustre-devel] [PATCH 01/28] lustre: pfl: Basic data structures for composite layout</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, Dec 17 2018, James Simmons wrote:<br>
<br>
> From: Niu Yawei <yawei.niu@intel.com><br>
><br>
> Added basic structures and magic numbers for composite layout.<br>
><br>
<br>
This would be a great place to (brief) explain what PFL does and what it<br>
is going to do with this data structures.<br>
What are the "components" and how do they form a "composite layout" ??<br>
<br>
> +<br>
> +enum lov_comp_md_entry_flags {<br>
> +     LCME_FL_PRIMARY         = 0x00000001,   /* Not used */<br>
> +     LCME_FL_STALE           = 0x00000002,   /* Not used */<br>
> +     LCME_FL_OFFLINE         = 0x00000004,   /* Not used */<br>
> +     LCME_FL_PREFERRED       = 0x00000008,   /* Not used */<br>
> +     LCME_FL_INIT            = 0x00000010,   /* instantiated */<br>
> +};<br>
> +<br>
> +#define LCME_KNOWN_FLAGS     LCME_FL_INIT<br>
<br>
What is a "KNOWN" flags?  What isn't known about the other ones?<br>
<br>
> +<br>
> +/* lcme_id can be specified as certain flags, and the the first<br>
                                                     ^^^^^^^<br>
Too many "the"s.                                                     <br>
<br>
> + * bit of lcme_id is used to indicate that the ID is representing<br>
> + * certain LCME_FL_* but not a real ID. Which implies we can have<br>
> + * at most 31 flags (see LCME_FL_XXX).<br>
> + */<br>
> +enum lcme_id {<br>
> +     LCME_ID_INVAL   = 0x0,<br>
> +     LCME_ID_MAX     = 0x7FFFFFFF,<br>
> +     LCME_ID_ALL     = 0xFFFFFFFF,<br>
> +     LCME_ID_NONE    = 0x80000000<br>
> +};<br>
> +<br>
> +#define LCME_ID_MASK LCME_ID_MAX<br>
<br>
Why is MASK a #define, but MAX an enum ??<br>
<br>
> +<br>
> +struct lov_comp_md_entry_v1 {<br>
> +     __u32                   lcme_id;        /* unique id of component */<br>
> +     __u32                   lcme_flags;     /* LCME_FL_XXX */<br>
> +     struct lu_extent        lcme_extent;    /* file extent for component */<br>
> +     __u32                   lcme_offset;    /* offset of component blob,<br>
> +                                              * start from lov_comp_md_v1<br>
> +                                              */<br>
> +     __u32                   lcme_size;      /* size of component blob */<br>
> +     __u64                   lcme_padding[2];<br>
> +} __packed;<br>
> +<br>
> +enum lov_comp_md_flags;<br>
<br>
This enum is empty, and never used.<br>
<br>
It eventually gets some LCM_FL_* names added... maybe it should wait<br>
until those are added??<br>
<br>
Thanks,<br>
NeilBrown<br>
</div>
</span></font></div>
</body>
</html>