Lines Matching +full:cache +full:- +full:block
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
5 * GRUB -- GRand Unified Bootloader
8 * (C) Copyright 2003 - 2004
31 /* This is the new super block of a journaling reiserfs system */
36 __u32 s_root_block; /* root block number */
37 __u32 s_journal_block; /* journal block number */
45 __u16 s_blocksize; /* block size */
51 __u16 s_bmap_nr; /* amount of bitmap blocks needed to address each block of file system */
57 #define sb_root_block(sbp) (__le32_to_cpu((sbp)->s_root_block))
58 #define sb_journal_block(sbp) (__le32_to_cpu((sbp)->s_journal_block))
59 #define set_sb_journal_block(sbp,v) ((sbp)->s_journal_block = __cpu_to_le32(v))
60 #define sb_journal_size(sbp) (__le32_to_cpu((sbp)->s_journal_size))
61 #define sb_blocksize(sbp) (__le16_to_cpu((sbp)->s_blocksize))
62 #define set_sb_blocksize(sbp,v) ((sbp)->s_blocksize = __cpu_to_le16(v))
63 #define sb_version(sbp) (__le16_to_cpu((sbp)->s_version))
64 #define set_sb_version(sbp,v) ((sbp)->s_version = __cpu_to_le16(v))
77 /* first block written in a commit. */
80 __u32 j_len; /* length of commit. len +1 is the commit block */
86 /* last block written in a commit */
88 __u32 j_trans_id; /* must match j_trans_id from the desc block */
94 /* this header block gets written whenever a transaction is considered
120 * body, contained in the object-item, as measured from the start of
136 * body, contained in the object-item, as measured from the start of
182 # define offset_v2_k_type(v2) ((v2)->k_type)
183 # define offset_v2_k_offset(v2) ((v2)->k_offset)
205 /* Header of a disk block. More precisely, header of a formatted leaf
209 __u16 blk_level; /* Level of a block in the tree. */
210 __u16 blk_nr_item; /* Number of keys/items in a block. */
211 __u16 blk_free_space; /* Block free space in bytes. */
212 …struct key blk_right_delim_key; /* Right delimiting key for this block (supported for leaf level …
237 * within the block */
250 #define ih_version(ih) (__le16_to_cpu((ih)->ih_version))
253 ? __le32_to_cpu((ih)->ih_key.u.v1.k_offset) \
254 : offset_v2_k_offset(&((ih)->ih_key.u.v2)))
257 ? __le32_to_cpu((ih)->ih_key.u.v1.k_uniqueness) == V1_##type \
258 : offset_v2_k_type(&((ih)->ih_key.u.v2)) == V2_##type)
266 __u32 dc_block_number; /* Disk child's block number. */
272 #define dc_block_number(dc_p) (__le32_to_cpu((dc_p)->dc_block_number))
301 policy. Someday. -Hans */
305 #define sd_v1_mode(sdp) ((sdp)->sd_mode)
306 #define sd_v1_nlink(sdp) (__le16_to_cpu((sdp)->sd_nlink))
307 #define sd_v1_uid(sdp) (__le16_to_cpu((sdp)->sd_uid))
308 #define sd_v1_gid(sdp) (__le16_to_cpu((sdp)->sd_gid))
309 #define sd_v1_size(sdp) (__le32_to_cpu((sdp)->sd_size))
310 #define sd_v1_mtime(sdp) (__le32_to_cpu((sdp)->sd_mtime))
341 #define sd_v2_mode(sdp) (__le16_to_cpu((sdp)->sd_mode))
342 #define sd_v2_nlink(sdp) (__le32_to_cpu((sdp)->sd_nlink))
343 #define sd_v2_size(sdp) (__le64_to_cpu((sdp)->sd_size))
344 #define sd_v2_uid(sdp) (__le32_to_cpu((sdp)->sd_uid))
345 #define sd_v2_gid(sdp) (__le32_to_cpu((sdp)->sd_gid))
346 #define sd_v2_mtime(sdp) (__le32_to_cpu((sdp)->sd_mtime))
348 #define sd_mode(sdp) (__le16_to_cpu((sdp)->sd_mode))
349 #define sd_size(sdp) (__le32_to_cpu((sdp)->sd_size))
350 #define sd_size_hi(sdp) (__le32_to_cpu((sdp)->sd_size_hi))
366 #define deh_offset(p_deh) (__le32_to_cpu((p_deh)->deh_offset))
367 #define deh_dir_id(p_deh) (__le32_to_cpu((p_deh)->deh_dir_id))
368 #define deh_objectid(p_deh) (__le32_to_cpu((p_deh)->deh_objectid))
369 #define deh_location(p_deh) (__le16_to_cpu((p_deh)->deh_location))
370 #define deh_state(p_deh) (__le16_to_cpu((p_deh)->deh_state))
394 /* the spot for the super in versions 3.5 - 3.5.11 (inclusive) */
405 /* The size of the node cache */
430 /* The first valid descriptor block in journal
442 /* The reiserfs block size (must be a power of 2) */
457 #define CACHE(i) (ROOT + ((i) << INFO->fullblocksize_shift)) macro
458 #define LEAF CACHE (DISK_LEAF_NODE_LEVEL)
460 #define BLOCKHEAD(cache) ((struct block_head *) cache) argument
462 #define KEY(cache) ((struct key *) ((int) cache + BLKH_SIZE)) argument
463 #define DC(cache) ((struct disk_child *) \ argument
464 ((int) cache + BLKH_SIZE + KEY_SIZE * nr_item))
465 /* The fsys_reiser_info block.
470 * The journal cache. For each transaction it contains the number of
471 * blocks followed by the real block numbers of this transaction.
473 * If the block numbers of some transaction won't fit in this space,
503 return (word & -word) == word; in is_power_of_two()