Actions
Bug #3411
openWe can save 4 bytes in the rfs4_dbe struct
Start date:
2012-12-11
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:
Description
The rfs4_dbe structure is defined as follows:
63struct rfs4_dbe { 64 kmutex_t lock[1]; /* Exclusive lock for entry */ 65 uint32_t refcnt; /* # of references */ 66 unsigned skipsearch:1; /* skip search */ 67 unsigned invalid:1; /* invalid/"freed" entry */ 68 unsigned reserved:31; 69 time_t time_rele; /* Time of last rele */ 70 id_t id; /* unique identifier */ 71 kcondvar_t cv[1]; 72 rfs4_entry_t data; 73 rfs4_table_t *table; 74 rfs4_link indices[1]; /* Array of indices for entry */ 75};
By changing reserved:31 to reserved:30 we would save 4 bytes.
Related issues
Updated by Dan McDonald over 2 years ago
I think this will actually save 8 bytes:
> ::print -ath rfs4_dbe_t 0 rfs4_dbe_t { 0 kmutex_t [1] dbe_lock 8 uint32_t dbe_refcnt c unsigned int:1 dbe_skipsearch :1 c.1 unsigned int:1 dbe_invalid :1 c.2 unsigned <<HOLE>> :30 <====== /* XXX KEBE SAYS THIS SHOULD BE THE ONLY HOLE! */ 10 unsigned int:31 dbe_reserved :31 13.7 unsigned <<HOLE>> :33 18 time_t dbe_time_rele <===== THIS should start at offset 0x10 20 id_t dbe_id 24 kcondvar_t [1] dbe_cv 26 uint16_t <<HOLE>> 28 rfs4_entry_t dbe_data 30 rfs4_table_t *dbe_table 38 rfs4_link_t [1] dbe_indices } >
Snagging it as a candidate for my student...
Updated by Dan McDonald over 2 years ago
- Assignee changed from Marcel Telka to Dan McDonald
Actions