Skip to content

Commit

Permalink
GFS2: Reduce struct gfs2_trans in size
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
swhiteho committed Feb 21, 2014
1 parent ad78197 commit 654a6d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,11 @@ struct gfs2_trans {
unsigned int tr_blocks;
unsigned int tr_revokes;
unsigned int tr_reserved;
unsigned int tr_touched:1;
unsigned int tr_attached:1;

struct gfs2_holder tr_t_gh;

int tr_touched;
int tr_attached;

unsigned int tr_num_buf_new;
unsigned int tr_num_databuf_new;
Expand Down
2 changes: 1 addition & 1 deletion fs/gfs2/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void gfs2_print_trans(const struct gfs2_trans *tr)
{
printk(KERN_WARNING "GFS2: Transaction created at: %pSR\n",
(void *)tr->tr_ip);
printk(KERN_WARNING "GFS2: blocks=%u revokes=%u reserved=%u touched=%d\n",
printk(KERN_WARNING "GFS2: blocks=%u revokes=%u reserved=%u touched=%u\n",
tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, tr->tr_touched);
printk(KERN_WARNING "GFS2: Buf %u/%u Databuf %u/%u Revoke %u/%u\n",
tr->tr_num_buf_new, tr->tr_num_buf_rm,
Expand Down

0 comments on commit 654a6d2

Please sign in to comment.