Skip to content

Commit 654a6d2

Browse files
committed
GFS2: Reduce struct gfs2_trans in size
A couple of "int" fields were being used as boolean values so we can make them bitfields of one bit, and put them in what might otherwise be a hole in the structure with 64 bit alignment. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent ad78197 commit 654a6d2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/gfs2/incore.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,11 @@ struct gfs2_trans {
462462
unsigned int tr_blocks;
463463
unsigned int tr_revokes;
464464
unsigned int tr_reserved;
465+
unsigned int tr_touched:1;
466+
unsigned int tr_attached:1;
465467

466468
struct gfs2_holder tr_t_gh;
467469

468-
int tr_touched;
469-
int tr_attached;
470470

471471
unsigned int tr_num_buf_new;
472472
unsigned int tr_num_databuf_new;

‎fs/gfs2/trans.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void gfs2_print_trans(const struct gfs2_trans *tr)
9898
{
9999
printk(KERN_WARNING "GFS2: Transaction created at: %pSR\n",
100100
(void *)tr->tr_ip);
101-
printk(KERN_WARNING "GFS2: blocks=%u revokes=%u reserved=%u touched=%d\n",
101+
printk(KERN_WARNING "GFS2: blocks=%u revokes=%u reserved=%u touched=%u\n",
102102
tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched);
103103
printk(KERN_WARNING "GFS2: Buf %u/%u Databuf %u/%u Revoke %u/%u\n",
104104
tr->tr_num_buf_new, tr->tr_num_buf_rm,

0 commit comments

Comments
 (0)