Home
last modified time | relevance | path

Searched refs:gl (Results 1 – 25 of 25) sorted by relevance

/linux-4.19.296/fs/gfs2/
Dglock.c57 struct gfs2_glock *gl; /* current glock struct */ member
61 typedef void (*glock_examiner) (struct gfs2_glock * gl);
63 static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target);
119 static void wake_up_glock(struct gfs2_glock *gl) in wake_up_glock() argument
121 wait_queue_head_t *wq = glock_waitqueue(&gl->gl_name); in wake_up_glock()
124 __wake_up(wq, TASK_NORMAL, 1, &gl->gl_name); in wake_up_glock()
129 struct gfs2_glock *gl = container_of(rcu, struct gfs2_glock, gl_rcu); in gfs2_glock_dealloc() local
131 if (gl->gl_ops->go_flags & GLOF_ASPACE) { in gfs2_glock_dealloc()
132 kmem_cache_free(gfs2_glock_aspace_cachep, gl); in gfs2_glock_dealloc()
134 kfree(gl->gl_lksb.sb_lvbptr); in gfs2_glock_dealloc()
[all …]
Dglock.h131 void (*lm_put_lock) (struct gfs2_glock *gl);
132 int (*lm_lock) (struct gfs2_glock *gl, unsigned int req_state,
134 void (*lm_cancel) (struct gfs2_glock *gl);
139 static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) in gfs2_glock_is_locked_by_me() argument
145 spin_lock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me()
147 list_for_each_entry(gh, &gl->gl_holders, gh_list) { in gfs2_glock_is_locked_by_me()
155 spin_unlock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me()
160 static inline int gfs2_glock_is_held_excl(struct gfs2_glock *gl) in gfs2_glock_is_held_excl() argument
162 return gl->gl_state == LM_ST_EXCLUSIVE; in gfs2_glock_is_held_excl()
165 static inline int gfs2_glock_is_held_dfrd(struct gfs2_glock *gl) in gfs2_glock_is_held_dfrd() argument
[all …]
Dglops.c34 static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh) in gfs2_ail_error() argument
36 fs_err(gl->gl_name.ln_sbd, in gfs2_ail_error()
41 fs_err(gl->gl_name.ln_sbd, "AIL glock %u:%llu mapping %p\n", in gfs2_ail_error()
42 gl->gl_name.ln_type, gl->gl_name.ln_number, in gfs2_ail_error()
43 gfs2_glock2aspace(gl)); in gfs2_ail_error()
44 gfs2_lm_withdraw(gl->gl_name.ln_sbd, "AIL error\n"); in gfs2_ail_error()
55 static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync, in __gfs2_ail_flush() argument
58 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in __gfs2_ail_flush()
59 struct list_head *head = &gl->gl_ail_list; in __gfs2_ail_flush()
73 gfs2_ail_error(gl, bh); in __gfs2_ail_flush()
[all …]
Dlock_dlm.c73 static inline void gfs2_update_reply_times(struct gfs2_glock *gl) in gfs2_update_reply_times() argument
76 const unsigned gltype = gl->gl_name.ln_type; in gfs2_update_reply_times()
77 unsigned index = test_bit(GLF_BLOCKING, &gl->gl_flags) ? in gfs2_update_reply_times()
82 rtt = ktime_to_ns(ktime_sub(ktime_get_real(), gl->gl_dstamp)); in gfs2_update_reply_times()
83 lks = this_cpu_ptr(gl->gl_name.ln_sbd->sd_lkstats); in gfs2_update_reply_times()
84 gfs2_update_stats(&gl->gl_stats, index, rtt); /* Local */ in gfs2_update_reply_times()
88 trace_gfs2_glock_lock_time(gl, rtt); in gfs2_update_reply_times()
100 static inline void gfs2_update_request_times(struct gfs2_glock *gl) in gfs2_update_request_times() argument
103 const unsigned gltype = gl->gl_name.ln_type; in gfs2_update_request_times()
108 dstamp = gl->gl_dstamp; in gfs2_update_request_times()
[all …]
Dtrace_gfs2.h93 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 …]
Dmain.c53 struct gfs2_glock *gl = foo; in gfs2_init_glock_once() local
55 spin_lock_init(&gl->gl_lockref.lock); in gfs2_init_glock_once()
56 INIT_LIST_HEAD(&gl->gl_holders); in gfs2_init_glock_once()
57 INIT_LIST_HEAD(&gl->gl_lru); in gfs2_init_glock_once()
58 INIT_LIST_HEAD(&gl->gl_ail_list); in gfs2_init_glock_once()
59 atomic_set(&gl->gl_ail_count, 0); in gfs2_init_glock_once()
60 atomic_set(&gl->gl_revokes, 0); in gfs2_init_glock_once()
65 struct gfs2_glock *gl = foo; in gfs2_init_gl_aspace_once() local
66 struct address_space *mapping = (struct address_space *)(gl + 1); in gfs2_init_gl_aspace_once()
68 gfs2_init_glock_once(gl); in gfs2_init_gl_aspace_once()
Dmeta_io.c113 struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) in gfs2_getbuf() argument
115 struct address_space *mapping = gfs2_glock2aspace(gl); in gfs2_getbuf()
116 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_getbuf()
181 struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno) in gfs2_meta_new() argument
184 bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_new()
250 int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, in gfs2_meta_read() argument
253 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_meta_read()
262 *bhp = bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_read()
275 bh = gfs2_getbuf(gl, blkno + 1, CREATE); in gfs2_meta_read()
409 struct gfs2_glock *gl = ip->i_gl; in gfs2_meta_indirect_buffer() local
[all …]
Dtrans.c128 static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, in gfs2_alloc_bufdata() argument
136 bd->bd_gl = gl; in gfs2_alloc_bufdata()
157 void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_data() argument
160 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_trans_add_data()
174 bd = gfs2_alloc_bufdata(gl, bh, &gfs2_databuf_lops); in gfs2_trans_add_data()
180 gfs2_assert(sdp, bd->bd_gl == gl); in gfs2_trans_add_data()
194 void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_meta() argument
197 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_trans_add_meta()
215 bd = gfs2_alloc_bufdata(gl, bh, &gfs2_buf_lops); in gfs2_trans_add_meta()
222 gfs2_assert(sdp, bd->bd_gl == gl); in gfs2_trans_add_meta()
Dlops.c73 struct gfs2_glock *gl = bd->bd_gl; in maybe_release_space() local
74 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in maybe_release_space()
75 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(gl); in maybe_release_space()
76 unsigned int index = bd->bd_bh->b_blocknr - gl->gl_name.ln_number; in maybe_release_space()
119 struct gfs2_glock *gl = bd->bd_gl; in gfs2_unpin() local
120 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); in gfs2_unpin()
121 atomic_inc(&gl->gl_ail_count); in gfs2_unpin()
532 struct gfs2_glock *gl = ip->i_gl; in buf_lo_scan_elements() local
555 bh_ip = gfs2_meta_new(gl, blkno); in buf_lo_scan_elements()
581 static void gfs2_meta_sync(struct gfs2_glock *gl) in gfs2_meta_sync() argument
[all …]
Dmeta_io.h54 extern struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno);
55 extern int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
58 extern struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno,
76 struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
Dincore.h40 typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret);
241 void (*go_sync) (struct gfs2_glock *gl);
242 int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh);
243 void (*go_inval) (struct gfs2_glock *gl, int flags);
244 int (*go_demote_ok) (const struct gfs2_glock *gl);
247 void (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl);
248 void (*go_callback)(struct gfs2_glock *gl, bool remote);
864 static inline void gfs2_glstats_inc(struct gfs2_glock *gl, int which) in gfs2_glstats_inc() argument
866 gl->gl_stats.stats[which]++; in gfs2_glstats_inc()
869 static inline void gfs2_sbstats_inc(const struct gfs2_glock *gl, int which) in gfs2_sbstats_inc() argument
[all …]
Dtrans.h44 extern void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh);
45 extern void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh);
Dlog.c100 struct gfs2_glock *gl = NULL; in gfs2_ail1_start_one() local
123 if (gl == bd->bd_gl) in gfs2_ail1_start_one()
125 gl = bd->bd_gl; in gfs2_ail1_start_one()
602 struct gfs2_glock *gl = bd->bd_gl; in gfs2_add_revoke() local
610 if (atomic_inc_return(&gl->gl_revokes) == 1) in gfs2_add_revoke()
611 gfs2_glock_hold(gl); in gfs2_add_revoke()
612 set_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_add_revoke()
616 void gfs2_glock_remove_revoke(struct gfs2_glock *gl) in gfs2_glock_remove_revoke() argument
618 if (atomic_dec_return(&gl->gl_revokes) == 0) { in gfs2_glock_remove_revoke()
619 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_glock_remove_revoke()
[all …]
Dlog.h75 extern void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl,
83 extern void gfs2_glock_remove_revoke(struct gfs2_glock *gl);
Drgrp.c727 struct gfs2_glock *gl; in gfs2_clear_rgrpd() local
731 gl = rgd->rd_gl; in gfs2_clear_rgrpd()
735 if (gl) { in gfs2_clear_rgrpd()
736 glock_clear_object(gl, rgd); in gfs2_clear_rgrpd()
738 gfs2_glock_put(gl); in gfs2_clear_rgrpd()
1043 struct gfs2_glock *gl = ip->i_gl; in gfs2_rindex_update() local
1050 if (!gfs2_glock_is_locked_by_me(gl)) { in gfs2_rindex_update()
1051 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); in gfs2_rindex_update()
1167 struct gfs2_glock *gl = rgd->rd_gl; in gfs2_rgrp_bh_get() local
1178 error = gfs2_meta_read(gl, rgd->rd_addr + x, 0, 0, &bi->bi_bh); in gfs2_rgrp_bh_get()
[all …]
Dsuper.c1331 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local
1332 if (test_bit(GLF_DEMOTE, &gl->gl_flags)) in gfs2_drop_inode()
1344 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local
1346 gfs2_glock_hold(gl); in gfs2_drop_inode()
1347 if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0) in gfs2_drop_inode()
1348 gfs2_glock_queue_put(gl); in gfs2_drop_inode()
1479 struct gfs2_glock *gl = ip->i_gl; in gfs2_final_release_pages() local
1484 if (atomic_read(&gl->gl_revokes) == 0) { in gfs2_final_release_pages()
1485 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_final_release_pages()
1486 clear_bit(GLF_DIRTY, &gl->gl_flags); in gfs2_final_release_pages()
[all …]
Dglops.h28 extern void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync);
Dsys.c231 struct gfs2_glock *gl; in demote_rq_store() local
266 rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl); in demote_rq_store()
269 gfs2_glock_cb(gl, glmode); in demote_rq_store()
270 gfs2_glock_put(gl); in demote_rq_store()
Drgrp.h74 extern void gfs2_rgrp_dump(struct seq_file *seq, const struct gfs2_glock *gl);
Drecovery.c39 struct gfs2_glock *gl = ip->i_gl; in gfs2_replay_read_block() local
53 *bh = gfs2_meta_ra(gl, dblock, extlen); in gfs2_replay_read_block()
Dfile.c1169 struct gfs2_glock *gl; in do_flock() local
1192 &gfs2_flock_glops, CREATE, &gl); in do_flock()
1195 gfs2_holder_init(gl, state, flags, fl_gh); in do_flock()
1196 gfs2_glock_put(gl); in do_flock()
Dbmap.c298 static void gfs2_metapath_ra(struct gfs2_glock *gl, __be64 *start, __be64 *end) in gfs2_metapath_ra() argument
308 rabh = gfs2_getbuf(gl, be64_to_cpu(*t), CREATE); in gfs2_metapath_ra()
609 struct gfs2_glock *gl, unsigned int i, in gfs2_indirect_init() argument
617 mp->mp_bh[i] = gfs2_meta_new(gl, bn); in gfs2_indirect_init()
618 gfs2_trans_add_meta(gl, mp->mp_bh[i]); in gfs2_indirect_init()
Dinode.c845 struct gfs2_glock *gl; in __gfs2_lookup() local
856 gl = GFS2_I(inode)->i_gl; in __gfs2_lookup()
857 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in __gfs2_lookup()
Ddir.c1485 struct gfs2_glock *gl = ip->i_gl; in gfs2_dir_readahead() local
1505 bh = gfs2_getbuf(gl, blocknr, 1); in gfs2_dir_readahead()
/linux-4.19.296/include/linux/
Dintel-iommu.h302 #define QI_EIOTLB_GL(gl) (((u64)gl) << 7) argument