| /linux/fs/gfs2/ |
| H A D | glock.c | 57 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, 65 static void request_demote(struct gfs2_glock *gl, unsigned int state, 120 static void wake_up_glock(struct gfs2_glock *gl) in wake_up_glock() argument 122 wait_queue_head_t *wq = glock_waitqueue(&gl->gl_name); in wake_up_glock() 125 __wake_up(wq, TASK_NORMAL, 1, &gl->gl_name); in wake_up_glock() 130 struct gfs2_glock *gl = container_of(rcu, struct gfs2_glock, gl_rcu); in gfs2_glock_dealloc() local 132 kfree(gl->gl_lksb.sb_lvbptr); in gfs2_glock_dealloc() 133 if (gl->gl_ops->go_flags & GLOF_ASPACE) { in gfs2_glock_dealloc() [all …]
|
| H A D | glops.c | 33 static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh) in gfs2_ail_error() argument 35 struct gfs2_sbd *sdp = glock_sbd(gl); in gfs2_ail_error() 43 glock_type(gl), glock_number(gl), in gfs2_ail_error() 44 gfs2_glock2aspace(gl)); in gfs2_ail_error() 58 static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync, in __gfs2_ail_flush() argument 61 struct gfs2_sbd *sdp = glock_sbd(gl); in __gfs2_ail_flush() 62 struct list_head *head = &gl->gl_ail_list; in __gfs2_ail_flush() 76 gfs2_ail_error(gl, bh); in __gfs2_ail_flush() 81 GLOCK_BUG_ON(gl, !fsync && atomic_read(&gl->gl_ail_count)); in __gfs2_ail_flush() 87 static int gfs2_ail_empty_gl(struct gfs2_glock *gl) in gfs2_ail_empty_gl() argument [all …]
|
| H A D | glock.h | 141 void (*lm_put_lock) (struct gfs2_glock *gl); 142 int (*lm_lock) (struct gfs2_glock *gl, unsigned int req_state, 144 void (*lm_cancel) (struct gfs2_glock *gl); 153 static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) in gfs2_glock_is_locked_by_me() argument 159 spin_lock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me() 161 list_for_each_entry(gh, &gl->gl_holders, gh_list) { in gfs2_glock_is_locked_by_me() 169 spin_unlock(&gl->gl_lockref.lock); in gfs2_glock_is_locked_by_me() 174 static inline struct address_space *gfs2_glock2aspace(struct gfs2_glock *gl) in gfs2_glock2aspace() argument 176 if (gl->gl_ops->go_flags & GLOF_ASPACE) { in gfs2_glock2aspace() 178 container_of(gl, struct gfs2_glock_aspace, glock); in gfs2_glock2aspace() [all …]
|
| H A D | lock_dlm.c | 74 static inline void gfs2_update_reply_times(struct gfs2_glock *gl, in gfs2_update_reply_times() argument 78 const unsigned gltype = glock_type(gl); in gfs2_update_reply_times() 83 rtt = ktime_to_ns(ktime_sub(ktime_get_real(), gl->gl_dstamp)); in gfs2_update_reply_times() 84 lks = this_cpu_ptr(glock_sbd(gl)->sd_lkstats); in gfs2_update_reply_times() 85 gfs2_update_stats(&gl->gl_stats, index, rtt); /* Local */ in gfs2_update_reply_times() 89 trace_gfs2_glock_lock_time(gl, rtt); in gfs2_update_reply_times() 101 static inline void gfs2_update_request_times(struct gfs2_glock *gl) in gfs2_update_request_times() argument 104 const unsigned gltype = glock_type(gl); in gfs2_update_request_times() 109 dstamp = gl->gl_dstamp; in gfs2_update_request_times() 110 gl->gl_dstamp = ktime_get_real(); in gfs2_update_request_times() [all …]
|
| H A D | trace_gfs2.h | 98 TP_PROTO(const struct gfs2_glock *gl, unsigned int new_state), 100 TP_ARGS(gl, new_state), 114 __entry->dev = glock_sbd(gl)->sd_vfs->s_dev; 115 __entry->glnum = glock_number(gl); 116 __entry->gltype = glock_type(gl); 117 __entry->cur_state = glock_trace_state(gl->gl_state); 119 __entry->tgt_state = glock_trace_state(gl->gl_target); 120 __entry->dmt_state = glock_trace_state(gl->gl_demote_state); 121 __entry->flags = gl->gl_flags | (gl->gl_object ? (1UL<<GLF_OBJECT) : 0); 137 TP_PROTO(const struct gfs2_glock *gl), [all …]
|
| H A D | incore.h | 38 typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret); 218 int (*go_sync) (struct gfs2_glock *gl); 219 int (*go_xmote_bh)(struct gfs2_glock *gl); 220 void (*go_inval) (struct gfs2_glock *gl, int flags); 221 int (*go_instantiate) (struct gfs2_glock *gl); 223 void (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl, 225 void (*go_callback)(struct gfs2_glock *gl, bool remote); 372 static inline unsigned int glock_type(const struct gfs2_glock *gl) in glock_type() argument 374 return gl->gl_name.ln_type; in glock_type() 377 static inline u64 glock_number(const struct gfs2_glock *gl) in glock_number() argument [all …]
|
| H A D | meta_io.c | 126 struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) in gfs2_getbuf() argument 128 struct address_space *mapping = gfs2_glock2aspace(gl); in gfs2_getbuf() 129 struct gfs2_sbd *sdp = glock_sbd(gl); in gfs2_getbuf() 193 struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno) in gfs2_meta_new() argument 196 bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_new() 259 int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, in gfs2_meta_read() argument 262 struct gfs2_sbd *sdp = glock_sbd(gl); in gfs2_meta_read() 271 *bhp = bh = gfs2_getbuf(gl, blkno, CREATE); in gfs2_meta_read() 284 bh = gfs2_getbuf(gl, blkno + 1, CREATE); in gfs2_meta_read() 487 struct gfs2_glock *gl = ip->i_gl; in gfs2_meta_buffer() local [all …]
|
| H A D | trans.c | 168 static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, in gfs2_alloc_bufdata() argument 175 bd->bd_gl = gl; in gfs2_alloc_bufdata() 197 void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_data() argument 200 struct gfs2_sbd *sdp = glock_sbd(gl); in gfs2_trans_add_data() 214 bd = gfs2_alloc_bufdata(gl, bh); in gfs2_trans_add_data() 220 gfs2_assert(sdp, bd->bd_gl == gl); in gfs2_trans_add_data() 234 void gfs2_trans_add_databufs(struct gfs2_glock *gl, struct folio *folio, in gfs2_trans_add_databufs() argument 251 gfs2_trans_add_data(gl, bh); in gfs2_trans_add_databufs() 255 void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_meta() argument 258 struct gfs2_sbd *sdp = glock_sbd(gl); in gfs2_trans_add_meta() [all …]
|
| H A D | main.c | 52 struct gfs2_glock *gl = foo; in gfs2_init_glock_once() local 54 INIT_LIST_HEAD(&gl->gl_holders); in gfs2_init_glock_once() 55 INIT_LIST_HEAD(&gl->gl_lru); in gfs2_init_glock_once() 56 INIT_LIST_HEAD(&gl->gl_ail_list); in gfs2_init_glock_once() 57 atomic_set(&gl->gl_ail_count, 0); in gfs2_init_glock_once() 58 atomic_set(&gl->gl_revokes, 0); in gfs2_init_glock_once()
|
| H A D | meta_io.h | 51 struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno); 52 int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, 55 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);
|
| H A D | trans.h | 44 void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh); 45 void gfs2_trans_add_databufs(struct gfs2_glock *gl, struct folio *folio, 47 void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh);
|
| H A D | lops.c | 73 struct gfs2_glock *gl = bd->bd_gl; in maybe_release_space() local 74 struct gfs2_sbd *sdp = glock_sbd(gl); 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 - glock_number(gl); in maybe_release_space() 122 struct gfs2_glock *gl = bd->bd_gl; in gfs2_unpin() local 123 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); in gfs2_unpin() 124 atomic_inc(&gl->gl_ail_count); in gfs2_unpin() 780 struct gfs2_glock *gl = ip->i_gl; in buf_lo_scan_elements() local 803 bh_ip = gfs2_meta_new(gl, blkno); in buf_lo_scan_elements() 890 struct gfs2_glock *gl; in gfs2_drain_revokes() local [all …]
|
| H A D | rgrp.c | 720 struct gfs2_glock *gl; in gfs2_clear_rgrpd() local 724 gl = rgd->rd_gl; in gfs2_clear_rgrpd() 728 if (gl) { in gfs2_clear_rgrpd() 729 if (gl->gl_state != LM_ST_UNLOCKED) { in gfs2_clear_rgrpd() 730 gfs2_glock_cb(gl, LM_ST_UNLOCKED); in gfs2_clear_rgrpd() 731 flush_delayed_work(&gl->gl_work); in gfs2_clear_rgrpd() 734 glock_clear_object(gl, rgd); in gfs2_clear_rgrpd() 735 gfs2_glock_put(gl); in gfs2_clear_rgrpd() 1037 struct gfs2_glock *gl = ip->i_gl; in gfs2_rindex_update() local 1044 if (!gfs2_glock_is_locked_by_me(gl)) { in gfs2_rindex_update() [all …]
|
| H A D | log.c | 98 struct gfs2_glock *gl = NULL; in gfs2_ail1_start_one() local 125 if (gl == bd->bd_gl) in gfs2_ail1_start_one() 127 gl = bd->bd_gl; in gfs2_ail1_start_one() 765 struct gfs2_glock *gl = bd->bd_gl; in gfs2_add_revoke() local 768 if (atomic_inc_return(&gl->gl_revokes) == 1) in gfs2_add_revoke() 769 gfs2_glock_hold(gl); in gfs2_add_revoke() 774 set_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_add_revoke() 778 void gfs2_glock_remove_revoke(struct gfs2_glock *gl) in gfs2_glock_remove_revoke() argument 780 if (atomic_dec_return(&gl->gl_revokes) == 0) { in gfs2_glock_remove_revoke() 781 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_glock_remove_revoke() [all …]
|
| H A D | glops.h | 25 int gfs2_inode_metasync(struct gfs2_glock *gl); 26 void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync);
|
| H A D | super.c | 1012 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local 1013 if (glock_needs_demote(gl)) in gfs2_drop_inode() 1025 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_drop_inode() local 1027 gfs2_glock_hold(gl); in gfs2_drop_inode() 1028 if (!gfs2_queue_verify_delete(gl, true)) in gfs2_drop_inode() 1029 gfs2_glock_put_async(gl); in gfs2_drop_inode() 1167 static void gfs2_glock_put_eventually(struct gfs2_glock *gl) in gfs2_glock_put_eventually() argument 1170 gfs2_glock_put_async(gl); in gfs2_glock_put_eventually() 1172 gfs2_glock_put(gl); in gfs2_glock_put_eventually() 1436 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; in gfs2_evict_inode() local [all …]
|
| H A D | log.h | 75 void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, 83 void gfs2_glock_remove_revoke(struct gfs2_glock *gl);
|
| H A D | inode.c | 459 struct gfs2_glock *gl = ip->i_gl; in gfs2_final_release_pages() local 462 if (unlikely(!gl)) in gfs2_final_release_pages() 465 truncate_inode_pages(gfs2_glock2aspace(gl), 0); in gfs2_final_release_pages() 468 if (atomic_read(&gl->gl_revokes) == 0) { in gfs2_final_release_pages() 469 clear_bit(GLF_LFLUSH, &gl->gl_flags); in gfs2_final_release_pages() 470 clear_bit(GLF_DIRTY, &gl->gl_flags); in gfs2_final_release_pages() 987 struct gfs2_glock *gl; in __gfs2_lookup() local 998 gl = GFS2_I(inode)->i_gl; in __gfs2_lookup() 999 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in __gfs2_lookup() 1971 struct gfs2_glock *gl; in gfs2_permission() local [all …]
|
| /linux/drivers/target/iscsi/cxgbit/ |
| H A D | cxgbit_main.c | 219 cxgbit_copy_frags(struct sk_buff *skb, const struct pkt_gl *gl, in cxgbit_copy_frags() argument 226 __skb_fill_page_desc(skb, skb_frag_idx, gl->frags[0].page, in cxgbit_copy_frags() 227 gl->frags[0].offset + offset, in cxgbit_copy_frags() 228 gl->frags[0].size - offset); in cxgbit_copy_frags() 229 for (i = 1; i < gl->nfrags; i++) in cxgbit_copy_frags() 231 gl->frags[i].page, in cxgbit_copy_frags() 232 gl->frags[i].offset, in cxgbit_copy_frags() 233 gl->frags[i].size); in cxgbit_copy_frags() 235 skb_shinfo(skb)->nr_frags += gl->nfrags; in cxgbit_copy_frags() 238 get_page(gl->frags[gl->nfrags - 1].page); in cxgbit_copy_frags() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4vf/ |
| H A D | sge.c | 1470 const struct pkt_gl *gl, in copy_frags() argument 1476 __skb_fill_page_desc(skb, 0, gl->frags[0].page, in copy_frags() 1477 gl->frags[0].offset + offset, in copy_frags() 1478 gl->frags[0].size - offset); in copy_frags() 1479 skb_shinfo(skb)->nr_frags = gl->nfrags; in copy_frags() 1480 for (i = 1; i < gl->nfrags; i++) in copy_frags() 1481 __skb_fill_page_desc(skb, i, gl->frags[i].page, in copy_frags() 1482 gl->frags[i].offset, in copy_frags() 1483 gl->frags[i].size); in copy_frags() 1486 get_page(gl->frags[gl->nfrags - 1].page); in copy_frags() [all …]
|
| /linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/ |
| H A D | chtls_main.c | 339 static struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl, in copy_gl_to_skb_pkt() argument 349 skb = alloc_skb(size_add(gl->tot_len, in copy_gl_to_skb_pkt() 354 __skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req) in copy_gl_to_skb_pkt() 359 , gl->va + pktshift, in copy_gl_to_skb_pkt() 360 gl->tot_len - pktshift); in copy_gl_to_skb_pkt() 366 const struct pkt_gl *gl, const __be64 *rsp) in chtls_recv_packet() argument 372 skb = copy_gl_to_skb_pkt(gl, rsp, cdev->lldi->sge_pktshift); in chtls_recv_packet() 440 const struct pkt_gl *gl) in chtls_uld_rx_handler() argument 449 if (chtls_recv_packet(cdev, gl, rsp) < 0) in chtls_uld_rx_handler() 454 if (!gl) in chtls_uld_rx_handler() [all …]
|
| /linux/drivers/infiniband/hw/cxgb4/ |
| H A D | device.c | 1102 static inline struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl, in copy_gl_to_skb_pkt() argument 1115 skb = alloc_skb(size_add(gl->tot_len, in copy_gl_to_skb_pkt() 1122 __skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req) + in copy_gl_to_skb_pkt() 1137 gl->va + pktshift, in copy_gl_to_skb_pkt() 1138 gl->tot_len - pktshift); in copy_gl_to_skb_pkt() 1142 static inline int recv_rx_pkt(struct c4iw_dev *dev, const struct pkt_gl *gl, in recv_rx_pkt() argument 1151 skb = copy_gl_to_skb_pkt(gl , rsp, dev->rdev.lldi.sge_pktshift); in recv_rx_pkt() 1167 const struct pkt_gl *gl) in c4iw_uld_rx_handler() argument 1174 if (gl == NULL) { in c4iw_uld_rx_handler() 1183 } else if (gl == CXGB4_MSG_AN) { in c4iw_uld_rx_handler() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4/ |
| H A D | sge.c | 3306 const struct pkt_gl *gl, unsigned int offset) in copy_frags() argument 3311 __skb_fill_page_desc(skb, 0, gl->frags[0].page, in copy_frags() 3312 gl->frags[0].offset + offset, in copy_frags() 3313 gl->frags[0].size - offset); in copy_frags() 3314 skb_shinfo(skb)->nr_frags = gl->nfrags; in copy_frags() 3315 for (i = 1; i < gl->nfrags; i++) in copy_frags() 3316 __skb_fill_page_desc(skb, i, gl->frags[i].page, in copy_frags() 3317 gl->frags[i].offset, in copy_frags() 3318 gl->frags[i].size); in copy_frags() 3321 get_page(gl->frags[gl->nfrags - 1].page); in copy_frags() [all …]
|
| H A D | cxgb4_uld.h | 483 const struct pkt_gl *gl); 487 const struct pkt_gl *gl, 521 struct sk_buff *cxgb4_pktgl_to_skb(const struct pkt_gl *gl,
|
| H A D | cxgb4_uld.c | 75 const struct pkt_gl *gl) in uldrx_handler() argument 88 rsp, gl, &q->lro_mgr, in uldrx_handler() 92 rsp, gl); in uldrx_handler() 99 if (!gl) in uldrx_handler() 101 else if (gl == CXGB4_MSG_AN) in uldrx_handler()
|