Home
last modified time | relevance | path

Searched refs:gh (Results 1 – 13 of 13) sorted by relevance

/fs/gfs2/
Dglock.c62 static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target);
199 static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holder *gh) in may_grant() argument
202 if ((gh->gh_state == LM_ST_EXCLUSIVE || in may_grant()
203 gh_head->gh_state == LM_ST_EXCLUSIVE) && gh != gh_head) in may_grant()
205 if (gl->gl_state == gh->gh_state) in may_grant()
207 if (gh->gh_flags & GL_EXACT) in may_grant()
210 if (gh->gh_state == LM_ST_SHARED && gh_head->gh_state == LM_ST_SHARED) in may_grant()
212 if (gh->gh_state == LM_ST_DEFERRED && gh_head->gh_state == LM_ST_DEFERRED) in may_grant()
215 if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY)) in may_grant()
220 static void gfs2_holder_wake(struct gfs2_holder *gh) in gfs2_holder_wake() argument
[all …]
Dglock.h140 struct gfs2_holder *gh; in gfs2_glock_is_locked_by_me() local
146 list_for_each_entry(gh, &gl->gl_holders, gh_list) { in gfs2_glock_is_locked_by_me()
147 if (!test_bit(HIF_HOLDER, &gh->gh_iflags)) in gfs2_glock_is_locked_by_me()
149 if (gh->gh_owner_pid == pid) in gfs2_glock_is_locked_by_me()
152 gh = NULL; in gfs2_glock_is_locked_by_me()
156 return gh; in gfs2_glock_is_locked_by_me()
186 unsigned flags, struct gfs2_holder *gh);
188 struct gfs2_holder *gh);
189 extern void gfs2_holder_uninit(struct gfs2_holder *gh);
190 extern int gfs2_glock_nq(struct gfs2_holder *gh);
[all …]
Dsuper.c476 struct gfs2_holder gh; in gfs2_statfs_init() local
480 &gh); in gfs2_statfs_init()
511 gfs2_glock_dq_uninit(&gh); in gfs2_statfs_init()
580 struct gfs2_holder gh; in gfs2_statfs_sync() local
586 &gh); in gfs2_statfs_sync()
621 gfs2_glock_dq_uninit(&gh); in gfs2_statfs_sync()
629 struct gfs2_holder gh; member
659 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &lfcc->gh); in gfs2_lock_fs_check_clean()
690 gfs2_glock_dq_uninit(&lfcc->gh); in gfs2_lock_fs_check_clean()
780 struct gfs2_holder gh; in gfs2_dirty_inode() local
[all …]
Dfile.c156 struct gfs2_holder gh; in gfs2_get_flags() local
160 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_get_flags()
161 error = gfs2_glock_nq(&gh); in gfs2_get_flags()
171 gfs2_glock_dq(&gh); in gfs2_get_flags()
172 gfs2_holder_uninit(&gh); in gfs2_get_flags()
218 struct gfs2_holder gh; in do_gfs2_set_flags() local
226 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in do_gfs2_set_flags()
284 gfs2_glock_dq_uninit(&gh); in do_gfs2_set_flags()
393 struct gfs2_holder gh; in gfs2_page_mkwrite() local
412 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_page_mkwrite()
[all …]
Dtrace_gfs2.h199 TP_PROTO(const struct gfs2_holder *gh, int first),
201 TP_ARGS(gh, first),
212 __entry->dev = gh->gh_gl->gl_name.ln_sbd->sd_vfs->s_dev;
213 __entry->glnum = gh->gh_gl->gl_name.ln_number;
214 __entry->gltype = gh->gh_gl->gl_name.ln_type;
216 __entry->state = glock_trace_state(gh->gh_state);
229 TP_PROTO(const struct gfs2_holder *gh, int queue),
231 TP_ARGS(gh, queue),
242 __entry->dev = gh->gh_gl->gl_name.ln_sbd->sd_vfs->s_dev;
243 __entry->glnum = gh->gh_gl->gl_name.ln_number;
[all …]
Daops.c528 struct gfs2_holder gh; in gfs2_readpage() local
532 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_readpage()
533 error = gfs2_glock_nq(&gh); in gfs2_readpage()
542 gfs2_glock_dq(&gh); in gfs2_readpage()
544 gfs2_holder_uninit(&gh); in gfs2_readpage()
613 struct gfs2_holder gh; in gfs2_readpages() local
616 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_readpages()
617 ret = gfs2_glock_nq(&gh); in gfs2_readpages()
622 gfs2_glock_dq(&gh); in gfs2_readpages()
624 gfs2_holder_uninit(&gh); in gfs2_readpages()
[all …]
Dglops.c287 struct gfs2_holder *gh; in inode_go_demote_ok() local
293 gh = list_entry(gl->gl_holders.next, struct gfs2_holder, gh_list); in inode_go_demote_ok()
294 if (gh->gh_list.next != &gl->gl_holders) in inode_go_demote_ok()
418 static int inode_go_lock(struct gfs2_holder *gh) in inode_go_lock() argument
420 struct gfs2_glock *gl = gh->gh_gl; in inode_go_lock()
425 if (!ip || (gh->gh_flags & GL_SKIP)) in inode_go_lock()
434 if (gh->gh_state != LM_ST_DEFERRED) in inode_go_lock()
439 (gh->gh_state == LM_ST_EXCLUSIVE)) { in inode_go_lock()
503 static int freeze_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh) in freeze_go_xmote_bh() argument
Dinode.c833 struct gfs2_holder gh; in __gfs2_lookup() local
846 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in __gfs2_lookup()
854 gfs2_glock_dq_uninit(&gh); in __gfs2_lookup()
860 gfs2_glock_dq_uninit(&gh); in __gfs2_lookup()
1976 struct gfs2_holder gh; in gfs2_getattr() local
1981 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in gfs2_getattr()
1989 gfs2_glock_dq_uninit(&gh); in gfs2_getattr()
1999 struct gfs2_holder gh; in gfs2_setxattr() local
2002 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_setxattr()
2003 ret = gfs2_glock_nq(&gh); in gfs2_setxattr()
[all …]
Dexport.c98 struct gfs2_holder gh; in gfs2_get_name() local
115 error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_get_name()
121 gfs2_glock_dq_uninit(&gh); in gfs2_get_name()
Drgrp.h38 extern int gfs2_rgrp_go_lock(struct gfs2_holder *gh);
40 extern void gfs2_rgrp_go_unlock(struct gfs2_holder *gh);
Drgrp.c1254 int gfs2_rgrp_go_lock(struct gfs2_holder *gh) in gfs2_rgrp_go_lock() argument
1256 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_lock()
1259 if (gh->gh_flags & GL_SKIP && sdp->sd_args.ar_rgrplvb) in gfs2_rgrp_go_lock()
1290 void gfs2_rgrp_go_unlock(struct gfs2_holder *gh) in gfs2_rgrp_go_unlock() argument
1292 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_unlock()
1293 int demote_requested = test_bit(GLF_DEMOTE, &gh->gh_gl->gl_flags) | in gfs2_rgrp_go_unlock()
1294 test_bit(GLF_PENDING_DEMOTE, &gh->gh_gl->gl_flags); in gfs2_rgrp_go_unlock()
1383 struct gfs2_holder gh; in gfs2_fitrim() local
1425 ret = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_fitrim()
1437 gfs2_glock_dq_uninit(&gh); in gfs2_fitrim()
[all …]
Dincore.h220 int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh);
223 int (*go_lock) (struct gfs2_holder *gh);
224 void (*go_unlock) (struct gfs2_holder *gh);
Dxattr.c1413 struct gfs2_holder gh; in ea_dealloc_block() local
1426 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1450 gfs2_glock_dq_uninit(&gh); in ea_dealloc_block()