This shrinks the size of the gfs2_inode by 8 bytes by
replacing the version counter with a one bit valid/invalid
flag.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
int data = (flags & DIO_DATA);
if (meta) {
int data = (flags & DIO_DATA);
if (meta) {
+ struct gfs2_inode *ip = gl->gl_object;
+ set_bit(GIF_INVALID, &ip->i_flags);
}
if (data)
gfs2_page_inval(gl);
}
if (data)
gfs2_page_inval(gl);
- if (ip->i_vn != gl->gl_vn) {
+ if (test_bit(GIF_INVALID, &ip->i_flags)) {
error = gfs2_inode_refresh(ip);
if (error)
return error;
error = gfs2_inode_refresh(ip);
if (error)
return error;
GIF_QD_LOCKED = 1,
GIF_PAGED = 2,
GIF_SW_PAGED = 3,
GIF_QD_LOCKED = 1,
GIF_PAGED = 2,
GIF_SW_PAGED = 3,
unsigned long i_flags; /* GIF_... */
unsigned long i_flags; /* GIF_... */
struct gfs2_dinode_host i_di; /* To be replaced by ref to block */
struct gfs2_glock *i_gl; /* Move into i_gh? */
struct gfs2_dinode_host i_di; /* To be replaced by ref to block */
struct gfs2_glock *i_gl; /* Move into i_gh? */
if (unlikely(error))
goto fail_put;
if (unlikely(error))
goto fail_put;
- ip->i_vn = ip->i_gl->gl_vn - 1;
+ set_bit(GIF_INVALID, &ip->i_flags);
error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh);
if (unlikely(error))
goto fail_iopen;
error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh);
if (unlikely(error))
goto fail_iopen;
error = gfs2_dinode_in(ip, dibh->b_data);
brelse(dibh);
error = gfs2_dinode_in(ip, dibh->b_data);
brelse(dibh);
- ip->i_vn = ip->i_gl->gl_vn;
+ clear_bit(GIF_INVALID, &ip->i_flags);
struct gfs2_holder i_gh;
int error;
struct gfs2_holder i_gh;
int error;
- if (ip->i_vn == ip->i_gl->gl_vn)
+ if (!test_bit(GIF_INVALID, &ip->i_flags))
return generic_permission(inode, mask, gfs2_check_acl);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
return generic_permission(inode, mask, gfs2_check_acl);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);