#define dblk(__bl) container_of(__bl, struct datablock, b)
enum {
+ /* First flags that are meaningful for both Data and Index blocks
+ * Currently 23 */
B_Phase1 = 0, /* phase when pinned - must be '1' - used for indexing */
B_Dirty, /* block has changes which haven't been committed */
B_Index, /* This is an index block, not a data block */
* cleaning purposes and so should be written to the
* cleaner segment.
*/
- B_Valid , /* block contains valid data */
- B_PinPending, /* set on data blocks while checkpoint_locked if we might
- * want to mark them dirty
- */
-
+ B_Valid, /* block contains valid data */
B_Uninc, /* on ->unincorporated list for next phase, so we
* cannot free it just yet.*/
B_InoIdx, /* is the index block for an inode */
- B_Prealloc, /* This data block has physaddr==0 and has been counted
- * in various ablock counters.
- */
B_Pinned, /* B_Phase1 is meaningful and block must be written
* (if dirty) in this phase
*/
- B_Orphan, /* ->orphan_slot is valid */
B_Async, /* An async IO is pending on this block */
B_Root, /* data or index block for root. ->parent is NULL */
B_NICredit, /* ICredit for next phase */
B_UnincCredit, /* Uninc carries a credit */
- B_OnFree, /* index block on the free list */
B_IOLock, /* Block is undergoing IO */
B_Writeback, /* Block is in a cluster */
B_IOLockLock, /* lock while testing IOLock on a page */
+ B_WriteError, /* Got a write error while writing (when else?) */
+ B_PhysValid, /* ->physaddr is correct */
+
+ /* Flags that are only relevant for Data Block
+ * currently 6 */
+
+ B_PinPending, /* set on data blocks while checkpoint_locked if we might
+ * want to mark them dirty
+ */
+ B_Prealloc, /* This data block has physaddr==0 and has been counted
+ * in various ablock counters.
+ */
+ B_Orphan, /* ->orphan_slot is valid */
+
B_HaveLock, /* We own the page lock and when all blocks are unlocked,
* the page should be unlocked */
B_HaveWriteback,/* We own the page writeback flag and when all blocks
* are unlocked we should clear it. */
- B_WriteError, /* Got a write error while writing (when else?) */
B_Claimed, /* Used for exclusive allocation of inodes */
- B_PhysValid, /* ->physaddr is correct */
+ /* Flags that are only relevant for Index Blocks
+ * currently 1 */
+ B_OnFree, /* index block on the free list */
};
/* indexing info stays in the block, not in the inode */
struct lafs_inode {