/fs/gfs2/ |
D | glock.c | 54 struct gfs2_glock *gl; /* current glock struct */ member 58 typedef void (*glock_examiner) (struct gfs2_glock * gl); 60 static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target); 116 static void wake_up_glock(struct gfs2_glock *gl) in wake_up_glock() argument 118 wait_queue_head_t *wq = glock_waitqueue(&gl->gl_name); in wake_up_glock() 121 __wake_up(wq, TASK_NORMAL, 1, &gl->gl_name); in wake_up_glock() 126 struct gfs2_glock *gl = container_of(rcu, struct gfs2_glock, gl_rcu); in gfs2_glock_dealloc() local 128 if (gl->gl_ops->go_flags & GLOF_ASPACE) { in gfs2_glock_dealloc() 129 kmem_cache_free(gfs2_glock_aspace_cachep, gl); in gfs2_glock_dealloc() 131 kfree(gl->gl_lksb.sb_lvbptr); in gfs2_glock_dealloc() [all …]
|
D | glops.c | 32 static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh) in gfs2_ail_error() argument 34 fs_err(gl->gl_name.ln_sbd, in gfs2_ail_error() 39 fs_err(gl->gl_name.ln_sbd, "AIL glock %u:%llu mapping %p\n", in gfs2_ail_error() 40 gl->gl_name.ln_type, gl->gl_name.ln_number, in gfs2_ail_error() 41 gfs2_glock2aspace(gl)); in gfs2_ail_error() 42 gfs2_lm_withdraw(gl->gl_name.ln_sbd, "AIL error\n"); in gfs2_ail_error() 53 static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync, in __gfs2_ail_flush() argument 56 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in __gfs2_ail_flush() 57 struct list_head *head = &gl->gl_ail_list; in __gfs2_ail_flush() 71 gfs2_ail_error(gl, bh); in __gfs2_ail_flush() [all …]
|
D | glock.h | 128 void (*lm_put_lock) (struct gfs2_glock *gl); 129 int (*lm_lock) (struct gfs2_glock *gl, unsigned int req_state, 131 void (*lm_cancel) (struct gfs2_glock *gl); 136 static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) in gfs2_glock_is_locked_by_me() argument 142 spin_lock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me() 144 list_for_each_entry(gh, &gl->gl_holders, gh_list) { in gfs2_glock_is_locked_by_me() 152 spin_unlock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me() 157 static inline int gfs2_glock_is_held_excl(struct gfs2_glock *gl) in gfs2_glock_is_held_excl() argument 159 return gl->gl_state == LM_ST_EXCLUSIVE; in gfs2_glock_is_held_excl() 162 static inline int gfs2_glock_is_held_dfrd(struct gfs2_glock *gl) in gfs2_glock_is_held_dfrd() argument [all …]
|
D | lock_dlm.c | 70 static inline void gfs2_update_reply_times(struct gfs2_glock *gl) in gfs2_update_reply_times() argument 73 const unsigned gltype = gl->gl_name.ln_type; in gfs2_update_reply_times() 74 unsigned index = test_bit(GLF_BLOCKING, &gl->gl_flags) ? in gfs2_update_reply_times() 79 rtt = ktime_to_ns(ktime_sub(ktime_get_real(), gl->gl_dstamp)); in gfs2_update_reply_times() 80 lks = this_cpu_ptr(gl->gl_name.ln_sbd->sd_lkstats); in gfs2_update_reply_times() 81 gfs2_update_stats(&gl->gl_stats, index, rtt); /* Local */ in gfs2_update_reply_times() 85 trace_gfs2_glock_lock_time(gl, rtt); in gfs2_update_reply_times() 97 static inline void gfs2_update_request_times(struct gfs2_glock *gl) in gfs2_update_request_times() argument 100 const unsigned gltype = gl->gl_name.ln_type; in gfs2_update_request_times() 105 dstamp = gl->gl_dstamp; in gfs2_update_request_times() [all …]
|
D | trace_gfs2.h | 93 TP_PROTO(const struct gfs2_glock *gl, unsigned int new_state), 95 TP_ARGS(gl, new_state), 109 __entry->dev = gl->gl_name.ln_sbd->sd_vfs->s_dev; 110 __entry->glnum = gl->gl_name.ln_number; 111 __entry->gltype = gl->gl_name.ln_type; 112 __entry->cur_state = glock_trace_state(gl->gl_state); 114 __entry->tgt_state = glock_trace_state(gl->gl_target); 115 __entry->dmt_state = glock_trace_state(gl->gl_demote_state); 116 __entry->flags = gl->gl_flags | (gl->gl_object ? (1UL<<GLF_OBJECT) : 0); 132 TP_PROTO(const struct gfs2_glock *gl), [all …]
|
D | main.c | 52 struct gfs2_glock *gl = foo; in gfs2_init_glock_once() local 54 spin_lock_init(&gl->gl_lockref.lock); in gfs2_init_glock_once() 55 INIT_LIST_HEAD(&gl->gl_holders); in gfs2_init_glock_once() 56 INIT_LIST_HEAD(&gl->gl_lru); in gfs2_init_glock_once() 57 INIT_LIST_HEAD(&gl->gl_ail_list); in gfs2_init_glock_once() 58 atomic_set(&gl->gl_ail_count, 0); in gfs2_init_glock_once() 59 atomic_set(&gl->gl_revokes, 0); in gfs2_init_glock_once() 64 struct gfs2_glock *gl = foo; in gfs2_init_gl_aspace_once() local 65 struct address_space *mapping = (struct address_space *)(gl + 1); in gfs2_init_gl_aspace_once() 67 gfs2_init_glock_once(gl); in gfs2_init_gl_aspace_once()
|
D | meta_io.c | 110 struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) in gfs2_getbuf() argument 112 struct address_space *mapping = gfs2_glock2aspace(gl); in gfs2_getbuf() 113 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_getbuf() 178 struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno) in gfs2_meta_new() argument 181 bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_new() 247 int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, in gfs2_meta_read() argument 250 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_meta_read() 259 *bhp = bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_read() 272 bh = gfs2_getbuf(gl, blkno + 1, CREATE); in gfs2_meta_read() 406 struct gfs2_glock *gl = ip->i_gl; in gfs2_meta_indirect_buffer() local [all …]
|
D | trans.c | 125 static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, in gfs2_alloc_bufdata() argument 132 bd->bd_gl = gl; in gfs2_alloc_bufdata() 152 void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_data() argument 155 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_trans_add_data() 169 bd = gfs2_alloc_bufdata(gl, bh); in gfs2_trans_add_data() 175 gfs2_assert(sdp, bd->bd_gl == gl); in gfs2_trans_add_data() 189 void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_meta() argument 192 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_trans_add_meta() 210 bd = gfs2_alloc_bufdata(gl, bh); in gfs2_trans_add_meta() 217 gfs2_assert(sdp, bd->bd_gl == gl); in gfs2_trans_add_meta()
|
D | incore.h | 37 typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret); 237 void (*go_sync) (struct gfs2_glock *gl); 238 int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh); 239 void (*go_inval) (struct gfs2_glock *gl, int flags); 240 int (*go_demote_ok) (const struct gfs2_glock *gl); 243 void (*go_dump)(struct seq_file *seq, struct gfs2_glock *gl, 245 void (*go_callback)(struct gfs2_glock *gl, bool remote); 858 static inline void gfs2_glstats_inc(struct gfs2_glock *gl, int which) in gfs2_glstats_inc() argument 860 gl->gl_stats.stats[which]++; in gfs2_glstats_inc() 863 static inline void gfs2_sbstats_inc(const struct gfs2_glock *gl, int which) in gfs2_sbstats_inc() argument [all …]
|
D | lops.c | 72 struct gfs2_glock *gl = bd->bd_gl; in maybe_release_space() local 73 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in maybe_release_space() 74 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(gl); in maybe_release_space() 75 unsigned int index = bd->bd_bh->b_blocknr - gl->gl_name.ln_number; in maybe_release_space() 118 struct gfs2_glock *gl = bd->bd_gl; in gfs2_unpin() local 119 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); in gfs2_unpin() 120 atomic_inc(&gl->gl_ail_count); in gfs2_unpin() 754 struct gfs2_glock *gl = ip->i_gl; in buf_lo_scan_elements() local 777 bh_ip = gfs2_meta_new(gl, blkno); in buf_lo_scan_elements() 821 static void gfs2_meta_sync(struct gfs2_glock *gl) in gfs2_meta_sync() argument [all …]
|
D | meta_io.h | 51 extern struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno); 52 extern int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, 55 extern struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, 73 struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
|
D | super.c | 1003 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local 1004 if (test_bit(GLF_DEMOTE, &gl->gl_flags)) in gfs2_drop_inode() 1016 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local 1018 gfs2_glock_hold(gl); in gfs2_drop_inode() 1019 if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0) in gfs2_drop_inode() 1020 gfs2_glock_queue_put(gl); in gfs2_drop_inode() 1151 struct gfs2_glock *gl = ip->i_gl; in gfs2_final_release_pages() local 1156 if (atomic_read(&gl->gl_revokes) == 0) { in gfs2_final_release_pages() 1157 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_final_release_pages() 1158 clear_bit(GLF_DIRTY, &gl->gl_flags); in gfs2_final_release_pages() [all …]
|
D | log.c | 97 struct gfs2_glock *gl = NULL; in gfs2_ail1_start_one() local 120 if (gl == bd->bd_gl) in gfs2_ail1_start_one() 122 gl = bd->bd_gl; in gfs2_ail1_start_one() 599 struct gfs2_glock *gl = bd->bd_gl; in gfs2_add_revoke() local 602 if (atomic_inc_return(&gl->gl_revokes) == 1) in gfs2_add_revoke() 603 gfs2_glock_hold(gl); in gfs2_add_revoke() 608 set_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_add_revoke() 612 void gfs2_glock_remove_revoke(struct gfs2_glock *gl) in gfs2_glock_remove_revoke() argument 614 if (atomic_dec_return(&gl->gl_revokes) == 0) { in gfs2_glock_remove_revoke() 615 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_glock_remove_revoke() [all …]
|
D | rgrp.c | 724 struct gfs2_glock *gl; in gfs2_clear_rgrpd() local 728 gl = rgd->rd_gl; in gfs2_clear_rgrpd() 732 if (gl) { in gfs2_clear_rgrpd() 733 glock_clear_object(gl, rgd); in gfs2_clear_rgrpd() 735 gfs2_glock_put(gl); in gfs2_clear_rgrpd() 1042 struct gfs2_glock *gl = ip->i_gl; in gfs2_rindex_update() local 1049 if (!gfs2_glock_is_locked_by_me(gl)) { in gfs2_rindex_update() 1050 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); in gfs2_rindex_update() 1190 struct gfs2_glock *gl = rgd->rd_gl; in gfs2_rgrp_bh_get() local 1201 error = gfs2_meta_read(gl, rgd->rd_addr + x, 0, 0, &bi->bi_bh); in gfs2_rgrp_bh_get() [all …]
|
D | trans.h | 41 extern void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh); 42 extern void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh);
|
D | log.h | 72 extern void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, 81 extern void gfs2_glock_remove_revoke(struct gfs2_glock *gl);
|
D | glops.h | 25 extern void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync);
|
D | sys.c | 228 struct gfs2_glock *gl; in demote_rq_store() local 263 rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl); in demote_rq_store() 266 gfs2_glock_cb(gl, glmode); in demote_rq_store() 267 gfs2_glock_put(gl); in demote_rq_store()
|
D | rgrp.h | 72 extern void gfs2_rgrp_dump(struct seq_file *seq, struct gfs2_glock *gl,
|
D | recovery.c | 36 struct gfs2_glock *gl = ip->i_gl; in gfs2_replay_read_block() local 50 *bh = gfs2_meta_ra(gl, dblock, extlen); in gfs2_replay_read_block()
|
D | file.c | 1221 struct gfs2_glock *gl; in do_flock() local 1244 &gfs2_flock_glops, CREATE, &gl); in do_flock() 1247 gfs2_holder_init(gl, state, flags, fl_gh); in do_flock() 1248 gfs2_glock_put(gl); in do_flock()
|
D | bmap.c | 296 static void gfs2_metapath_ra(struct gfs2_glock *gl, __be64 *start, __be64 *end) in gfs2_metapath_ra() argument 306 rabh = gfs2_getbuf(gl, be64_to_cpu(*t), CREATE); in gfs2_metapath_ra() 607 struct gfs2_glock *gl, unsigned int i, in gfs2_indirect_init() argument 615 mp->mp_bh[i] = gfs2_meta_new(gl, bn); in gfs2_indirect_init() 616 gfs2_trans_add_meta(gl, mp->mp_bh[i]); in gfs2_indirect_init()
|
D | inode.c | 842 struct gfs2_glock *gl; in __gfs2_lookup() local 853 gl = GFS2_I(inode)->i_gl; in __gfs2_lookup() 854 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in __gfs2_lookup()
|
D | dir.c | 1484 struct gfs2_glock *gl = ip->i_gl; in gfs2_dir_readahead() local 1504 bh = gfs2_getbuf(gl, blocknr, 1); in gfs2_dir_readahead()
|