mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
ZIL: use a bitfield for LWB "slog" and "slim" state flags
I'm soon about to need another LWB flag, and boolean_t is just so big for only storing a single bit. Changing to a bitfield is far less wasteful. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17622
This commit is contained in:
committed by
Brian Behlendorf
parent
6b3333de2d
commit
508c546975
@@ -100,11 +100,15 @@ typedef enum {
|
||||
* holding the "zl_issuer_lock". After the lwb is issued, the zilog's
|
||||
* "zl_lock" is used to protect the lwb against concurrent access.
|
||||
*/
|
||||
typedef enum {
|
||||
LWB_FLAG_SLIM = (1<<0), /* log block has slim format */
|
||||
LWB_FLAG_SLOG = (1<<1), /* lwb_blk is on SLOG device */
|
||||
} lwb_flag_t;
|
||||
|
||||
typedef struct lwb {
|
||||
zilog_t *lwb_zilog; /* back pointer to log struct */
|
||||
blkptr_t lwb_blk; /* on disk address of this log blk */
|
||||
boolean_t lwb_slim; /* log block has slim format */
|
||||
boolean_t lwb_slog; /* lwb_blk is on SLOG device */
|
||||
lwb_flag_t lwb_flags; /* extra info about this lwb */
|
||||
int lwb_error; /* log block allocation error */
|
||||
int lwb_nmax; /* max bytes in the buffer */
|
||||
int lwb_nused; /* # used bytes in buffer */
|
||||
|
||||
Reference in New Issue
Block a user