2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License version 2.
10 #ifndef __INCORE_DOT_H__
11 #define __INCORE_DOT_H__
14 #include <linux/kobject.h>
15 #include <linux/workqueue.h>
16 #include <linux/dlm.h>
17 #include <linux/buffer_head.h>
18 #include <linux/rcupdate.h>
19 #include <linux/rculist_bl.h>
20 #include <linux/completion.h>
21 #include <linux/rbtree.h>
22 #include <linux/ktime.h>
23 #include <linux/percpu.h>
25 #define DIO_WAIT 0x00000010
26 #define DIO_METADATA 0x00000020
28 struct gfs2_log_operations
;
32 struct gfs2_quota_data
;
39 typedef void (*gfs2_glop_bh_t
) (struct gfs2_glock
*gl
, unsigned int ret
);
41 struct gfs2_log_header_host
{
42 u64 lh_sequence
; /* Sequence number of this transaction */
43 u32 lh_flags
; /* GFS2_LOG_HEAD_... */
44 u32 lh_tail
; /* Block number of log tail */
50 * Structure of operations that are associated with each
51 * type of element in the log.
54 struct gfs2_log_operations
{
55 void (*lo_add
) (struct gfs2_sbd
*sdp
, struct gfs2_bufdata
*bd
);
56 void (*lo_before_commit
) (struct gfs2_sbd
*sdp
);
57 void (*lo_after_commit
) (struct gfs2_sbd
*sdp
, struct gfs2_ail
*ai
);
58 void (*lo_before_scan
) (struct gfs2_jdesc
*jd
,
59 struct gfs2_log_header_host
*head
, int pass
);
60 int (*lo_scan_elements
) (struct gfs2_jdesc
*jd
, unsigned int start
,
61 struct gfs2_log_descriptor
*ld
, __be64
*ptr
,
63 void (*lo_after_scan
) (struct gfs2_jdesc
*jd
, int error
, int pass
);
70 struct buffer_head
*bi_bh
;
72 unsigned long bi_flags
;
79 struct rb_node rd_node
; /* Link with superblock */
80 struct gfs2_glock
*rd_gl
; /* Glock for this rgrp */
81 u64 rd_addr
; /* grp block disk address */
82 u64 rd_data0
; /* first data location */
83 u32 rd_length
; /* length of rgrp header in fs blocks */
84 u32 rd_data
; /* num of data blocks in rgrp */
85 u32 rd_bitbytes
; /* number of bytes in data bitmaps */
87 u32 rd_reserved
; /* number of blocks reserved */
91 struct gfs2_bitmap
*rd_bits
;
92 struct gfs2_sbd
*rd_sbd
;
93 struct gfs2_rgrp_lvb
*rd_rgl
;
96 #define GFS2_RDF_CHECK 0x10000000 /* check for unlinked inodes */
97 #define GFS2_RDF_UPTODATE 0x20000000 /* rg is up to date */
98 #define GFS2_RDF_ERROR 0x40000000 /* error in rg */
99 #define GFS2_RDF_MASK 0xf0000000 /* mask for internal flags */
100 spinlock_t rd_rsspin
; /* protects reservation related vars */
101 struct rb_root rd_rstree
; /* multi-block reservation tree */
102 u32 rd_rs_cnt
; /* count of current reservations */
106 struct gfs2_rgrpd
*rgd
;
107 struct gfs2_bitmap
*bi
; /* Bitmap must belong to the rgd */
108 u32 offset
; /* The offset is bitmap relative */
111 static inline u64
gfs2_rbm_to_block(const struct gfs2_rbm
*rbm
)
113 return rbm
->rgd
->rd_data0
+ (rbm
->bi
->bi_start
* GFS2_NBBY
) + rbm
->offset
;
116 enum gfs2_state_bits
{
117 BH_Pinned
= BH_PrivateStart
,
118 BH_Escaped
= BH_PrivateStart
+ 1,
119 BH_Zeronew
= BH_PrivateStart
+ 2,
122 BUFFER_FNS(Pinned
, pinned
)
123 TAS_BUFFER_FNS(Pinned
, pinned
)
124 BUFFER_FNS(Escaped
, escaped
)
125 TAS_BUFFER_FNS(Escaped
, escaped
)
126 BUFFER_FNS(Zeronew
, zeronew
)
127 TAS_BUFFER_FNS(Zeronew
, zeronew
)
129 struct gfs2_bufdata
{
130 struct buffer_head
*bd_bh
;
131 struct gfs2_glock
*bd_gl
;
134 struct list_head bd_list
;
135 const struct gfs2_log_operations
*bd_ops
;
137 struct gfs2_ail
*bd_ail
;
138 struct list_head bd_ail_st_list
;
139 struct list_head bd_ail_gl_list
;
143 * Internally, we prefix things with gdlm_ and GDLM_ (for gfs-dlm) since a
144 * prefix of lock_dlm_ gets awkward.
147 #define GDLM_STRNAME_BYTES 25
148 #define GDLM_LVB_SIZE 32
153 * DFL_BLOCK_LOCKS: dlm is in recovery and will grant locks that had been
154 * held by failed nodes whose journals need recovery. Those locks should
155 * only be used for journal recovery until the journal recovery is done.
156 * This is set by the dlm recover_prep callback and cleared by the
157 * gfs2_control thread when journal recovery is complete. To avoid
158 * races between recover_prep setting and gfs2_control clearing, recover_spin
159 * is held while changing this bit and reading/writing recover_block
162 * DFL_NO_DLM_OPS: dlm lockspace ops/callbacks are not being used.
164 * DFL_FIRST_MOUNT: this node is the first to mount this fs and is doing
165 * recovery of all journals before allowing other nodes to mount the fs.
166 * This is cleared when FIRST_MOUNT_DONE is set.
168 * DFL_FIRST_MOUNT_DONE: this node was the first mounter, and has finished
169 * recovery of all journals, and now allows other nodes to mount the fs.
171 * DFL_MOUNT_DONE: gdlm_mount has completed successfully and cleared
172 * BLOCK_LOCKS for the first time. The gfs2_control thread should now
173 * control clearing BLOCK_LOCKS for further recoveries.
175 * DFL_UNMOUNT: gdlm_unmount sets to keep sdp off gfs2_control_wq.
177 * DFL_DLM_RECOVERY: set while dlm is in recovery, between recover_prep()
178 * and recover_done(), i.e. set while recover_block == recover_start.
185 DFL_FIRST_MOUNT_DONE
= 3,
188 DFL_DLM_RECOVERY
= 6,
193 unsigned int ln_type
;
196 #define lm_name_equal(name1, name2) \
197 (((name1)->ln_number == (name2)->ln_number) && \
198 ((name1)->ln_type == (name2)->ln_type))
201 struct gfs2_glock_operations
{
202 void (*go_xmote_th
) (struct gfs2_glock
*gl
);
203 int (*go_xmote_bh
) (struct gfs2_glock
*gl
, struct gfs2_holder
*gh
);
204 void (*go_inval
) (struct gfs2_glock
*gl
, int flags
);
205 int (*go_demote_ok
) (const struct gfs2_glock
*gl
);
206 int (*go_lock
) (struct gfs2_holder
*gh
);
207 void (*go_unlock
) (struct gfs2_holder
*gh
);
208 int (*go_dump
)(struct seq_file
*seq
, const struct gfs2_glock
*gl
);
209 void (*go_callback
) (struct gfs2_glock
*gl
);
211 const unsigned long go_flags
;
212 #define GLOF_ASPACE 1
216 GFS2_LKS_SRTT
= 0, /* Non blocking smoothed round trip time */
217 GFS2_LKS_SRTTVAR
= 1, /* Non blocking smoothed variance */
218 GFS2_LKS_SRTTB
= 2, /* Blocking smoothed round trip time */
219 GFS2_LKS_SRTTVARB
= 3, /* Blocking smoothed variance */
220 GFS2_LKS_SIRT
= 4, /* Smoothed Inter-request time */
221 GFS2_LKS_SIRTVAR
= 5, /* Smoothed Inter-request variance */
222 GFS2_LKS_DCOUNT
= 6, /* Count of dlm requests */
223 GFS2_LKS_QCOUNT
= 7, /* Count of gfs2_holder queues */
227 struct gfs2_lkstats
{
228 s64 stats
[GFS2_NR_LKSTATS
];
233 HIF_HOLDER
= 6, /* Set for gh that "holds" the glock */
239 struct list_head gh_list
;
241 struct gfs2_glock
*gh_gl
;
242 struct pid
*gh_owner_pid
;
243 unsigned int gh_state
;
247 unsigned long gh_iflags
; /* HIF_... */
251 /* Resource group multi-block reservation, in order of appearance:
253 Step 1. Function prepares to write, allocates a mb, sets the size hint.
254 Step 2. User calls inplace_reserve to target an rgrp, sets the rgrp info
255 Step 3. Function get_local_rgrp locks the rgrp, determines which bits to use
256 Step 4. Bits are assigned from the rgrp based on either the reservation
260 struct gfs2_blkreserv
{
261 /* components used during write (step 1): */
262 atomic_t rs_sizehint
; /* hint of the write size */
264 /* components used during get_local_rgrp (step 3): */
265 struct gfs2_rbm rs_rbm
;
266 struct gfs2_holder rs_rgd_gh
; /* Filled in by get_local_rgrp */
267 struct rb_node rs_node
; /* link to other block reservations */
269 /* components used during block searches and assignments (step 4): */
270 u32 rs_free
; /* how many blocks are still free */
272 /* ancillary quota stuff */
273 struct gfs2_quota_data
*rs_qa_qd
[2 * MAXQUOTAS
];
274 struct gfs2_holder rs_qa_qd_ghs
[2 * MAXQUOTAS
];
275 unsigned int rs_qa_qd_num
;
281 GLF_PENDING_DEMOTE
= 4,
282 GLF_DEMOTE_IN_PROGRESS
= 5,
285 GLF_INVALIDATE_IN_PROGRESS
= 8,
286 GLF_REPLY_PENDING
= 9,
291 GLF_OBJECT
= 14, /* Used only for tracing */
296 struct hlist_bl_node gl_list
;
297 struct gfs2_sbd
*gl_sbd
;
298 unsigned long gl_flags
; /* GLF_... */
299 struct lm_lockname gl_name
;
304 /* State fields protected by gl_spin */
305 unsigned int gl_state
:2, /* Current state */
306 gl_target
:2, /* Target state */
307 gl_demote_state
:2, /* State requested by remote node */
308 gl_req
:2, /* State in last dlm request */
309 gl_reply
:8; /* Last reply from the dlm */
311 unsigned int gl_hash
;
312 unsigned long gl_demote_time
; /* time of first demote request */
314 struct list_head gl_holders
;
316 const struct gfs2_glock_operations
*gl_ops
;
318 struct gfs2_lkstats gl_stats
;
319 struct dlm_lksb gl_lksb
;
321 unsigned long gl_tchange
;
324 struct list_head gl_lru
;
325 struct list_head gl_ail_list
;
326 atomic_t gl_ail_count
;
328 struct delayed_work gl_work
;
329 struct work_struct gl_delete
;
330 struct rcu_head gl_rcu
;
333 #define GFS2_MIN_LVB_SIZE 32 /* Min size of LVB that gfs2 supports */
338 GIF_ALLOC_FAILED
= 2,
343 struct inode i_inode
;
348 unsigned long i_flags
; /* GIF_... */
349 struct gfs2_glock
*i_gl
; /* Move into i_gh? */
350 struct gfs2_holder i_iopen_gh
;
351 struct gfs2_holder i_gh
; /* for prepare/commit_write only */
352 struct gfs2_blkreserv
*i_res
; /* rgrp multi-block reservation */
353 struct gfs2_rgrpd
*i_rgd
;
354 u64 i_goal
; /* goal block for allocations */
355 struct rw_semaphore i_rw_mutex
;
356 struct list_head i_trunc_list
;
357 __be64
*i_hash_cache
;
365 * Since i_inode is the first element of struct gfs2_inode,
366 * this is effectively a cast.
368 static inline struct gfs2_inode
*GFS2_I(struct inode
*inode
)
370 return container_of(inode
, struct gfs2_inode
, i_inode
);
373 static inline struct gfs2_sbd
*GFS2_SB(const struct inode
*inode
)
375 return inode
->i_sb
->s_fs_info
;
379 struct mutex f_fl_mutex
;
380 struct gfs2_holder f_fl_gh
;
383 struct gfs2_revoke_replay
{
384 struct list_head rr_list
;
386 unsigned int rr_where
;
396 struct gfs2_quota_data
{
397 struct list_head qd_list
;
398 struct list_head qd_reclaim
;
403 unsigned long qd_flags
; /* QDF_... */
408 unsigned int qd_slot
;
409 unsigned int qd_slot_count
;
411 struct buffer_head
*qd_bh
;
412 struct gfs2_quota_change
*qd_bh_qc
;
413 unsigned int qd_bh_count
;
415 struct gfs2_glock
*qd_gl
;
416 struct gfs2_quota_lvb qd_qb
;
419 unsigned long qd_last_warn
;
425 unsigned int tr_blocks
;
426 unsigned int tr_revokes
;
427 unsigned int tr_reserved
;
429 struct gfs2_holder tr_t_gh
;
433 unsigned int tr_num_buf_new
;
434 unsigned int tr_num_databuf_new
;
435 unsigned int tr_num_buf_rm
;
436 unsigned int tr_num_databuf_rm
;
437 unsigned int tr_num_revoke
;
438 unsigned int tr_num_revoke_rm
;
442 struct list_head ai_list
;
444 unsigned int ai_first
;
445 struct list_head ai_ail1_list
;
446 struct list_head ai_ail2_list
;
449 struct gfs2_journal_extent
{
450 struct list_head extent_list
;
452 unsigned int lblock
; /* First logical block */
453 u64 dblock
; /* First disk block */
458 struct list_head jd_list
;
459 struct list_head extent_list
;
460 struct work_struct jd_work
;
461 struct inode
*jd_inode
;
462 unsigned long jd_flags
;
463 #define JDF_RECOVERY 1
465 unsigned int jd_blocks
;
466 int jd_recover_error
;
469 struct gfs2_statfs_change_host
{
475 #define GFS2_QUOTA_DEFAULT GFS2_QUOTA_OFF
476 #define GFS2_QUOTA_OFF 0
477 #define GFS2_QUOTA_ACCOUNT 1
478 #define GFS2_QUOTA_ON 2
480 #define GFS2_DATA_DEFAULT GFS2_DATA_ORDERED
481 #define GFS2_DATA_WRITEBACK 1
482 #define GFS2_DATA_ORDERED 2
484 #define GFS2_ERRORS_DEFAULT GFS2_ERRORS_WITHDRAW
485 #define GFS2_ERRORS_WITHDRAW 0
486 #define GFS2_ERRORS_CONTINUE 1 /* place holder for future feature */
487 #define GFS2_ERRORS_RO 2 /* place holder for future feature */
488 #define GFS2_ERRORS_PANIC 3
491 char ar_lockproto
[GFS2_LOCKNAME_LEN
]; /* Name of the Lock Protocol */
492 char ar_locktable
[GFS2_LOCKNAME_LEN
]; /* Name of the Lock Table */
493 char ar_hostdata
[GFS2_LOCKNAME_LEN
]; /* Host specific data */
494 unsigned int ar_spectator
:1; /* Don't get a journal */
495 unsigned int ar_localflocks
:1; /* Let the VFS do flock|fcntl */
496 unsigned int ar_debug
:1; /* Oops on errors */
497 unsigned int ar_posix_acl
:1; /* Enable posix acls */
498 unsigned int ar_quota
:2; /* off/account/on */
499 unsigned int ar_suiddir
:1; /* suiddir support */
500 unsigned int ar_data
:2; /* ordered/writeback */
501 unsigned int ar_meta
:1; /* mount metafs */
502 unsigned int ar_discard
:1; /* discard requests */
503 unsigned int ar_errors
:2; /* errors=withdraw | panic */
504 unsigned int ar_nobarrier
:1; /* do not send barriers */
505 unsigned int ar_rgrplvb
:1; /* use lvbs for rgrp info */
506 int ar_commit
; /* Commit interval */
507 int ar_statfs_quantum
; /* The fast statfs interval */
508 int ar_quota_quantum
; /* The quota interval */
509 int ar_statfs_percent
; /* The % change to force sync */
515 unsigned int gt_logd_secs
;
517 unsigned int gt_quota_simul_sync
; /* Max quotavals to sync at once */
518 unsigned int gt_quota_warn_period
; /* Secs between quota warn msgs */
519 unsigned int gt_quota_scale_num
; /* Numerator */
520 unsigned int gt_quota_scale_den
; /* Denominator */
521 unsigned int gt_quota_quantum
; /* Secs between syncs to quota file */
522 unsigned int gt_new_files_jdata
;
523 unsigned int gt_max_readahead
; /* Max bytes to read-ahead from disk */
524 unsigned int gt_complain_secs
;
525 unsigned int gt_statfs_quantum
;
526 unsigned int gt_statfs_slow
;
530 SDF_JOURNAL_CHECKED
= 0,
531 SDF_JOURNAL_LIVE
= 1,
537 SDF_RORECOVERY
= 7, /* read only recovery */
540 #define GFS2_FSNAME_LEN 256
542 struct gfs2_inum_host
{
547 struct gfs2_sb_host
{
553 u32 sb_multihost_format
;
557 struct gfs2_inum_host sb_master_dir
;
558 struct gfs2_inum_host sb_root_dir
;
560 char sb_lockproto
[GFS2_LOCKNAME_LEN
];
561 char sb_locktable
[GFS2_LOCKNAME_LEN
];
565 * lm_mount() return values
567 * ls_jid - the journal ID this node should use
568 * ls_first - this node is the first to mount the file system
569 * ls_lockspace - lock module's context for this file system
570 * ls_ops - lock module's functions
573 struct lm_lockstruct
{
575 unsigned int ls_first
;
576 const struct lm_lockops
*ls_ops
;
577 dlm_lockspace_t
*ls_dlm
;
579 int ls_recover_jid_done
; /* These two are deprecated, */
580 int ls_recover_jid_status
; /* used previously by gfs_controld */
582 struct dlm_lksb ls_mounted_lksb
; /* mounted_lock */
583 struct dlm_lksb ls_control_lksb
; /* control_lock */
584 char ls_control_lvb
[GDLM_LVB_SIZE
]; /* control_lock lvb */
585 struct completion ls_sync_wait
; /* {control,mounted}_{lock,unlock} */
587 spinlock_t ls_recover_spin
; /* protects following fields */
588 unsigned long ls_recover_flags
; /* DFL_ */
589 uint32_t ls_recover_mount
; /* gen in first recover_done cb */
590 uint32_t ls_recover_start
; /* gen in last recover_done cb */
591 uint32_t ls_recover_block
; /* copy recover_start in last recover_prep */
592 uint32_t ls_recover_size
; /* size of recover_submit, recover_result */
593 uint32_t *ls_recover_submit
; /* gen in last recover_slot cb per jid */
594 uint32_t *ls_recover_result
; /* result of last jid recovery */
597 struct gfs2_pcpu_lkstats
{
598 /* One struct for each glock type */
599 struct gfs2_lkstats lkstats
[10];
603 struct super_block
*sd_vfs
;
604 struct gfs2_pcpu_lkstats __percpu
*sd_lkstats
;
605 struct kobject sd_kobj
;
606 unsigned long sd_flags
; /* SDF_... */
607 struct gfs2_sb_host sd_sb
;
609 /* Constants computed on mount */
613 u32 sd_diptrs
; /* Number of pointers in a dinode */
614 u32 sd_inptrs
; /* Number of pointers in a indirect block */
615 u32 sd_jbsize
; /* Size of a journaled data block */
616 u32 sd_hash_bsize
; /* sizeof(exhash block) */
617 u32 sd_hash_bsize_shift
;
618 u32 sd_hash_ptrs
; /* Number of pointers in a hash block */
620 u32 sd_max_dirres
; /* Max blocks needed to add a directory entry */
621 u32 sd_max_height
; /* Max height of a file's metadata tree */
622 u64 sd_heightsize
[GFS2_MAX_META_HEIGHT
+ 1];
623 u32 sd_max_jheight
; /* Max height of journaled file's meta tree */
624 u64 sd_jheightsize
[GFS2_MAX_META_HEIGHT
+ 1];
626 struct gfs2_args sd_args
; /* Mount arguments */
627 struct gfs2_tune sd_tune
; /* Filesystem tuning structure */
631 struct lm_lockstruct sd_lockstruct
;
632 struct gfs2_holder sd_live_gh
;
633 struct gfs2_glock
*sd_rename_gl
;
634 struct gfs2_glock
*sd_trans_gl
;
635 wait_queue_head_t sd_glock_wait
;
636 atomic_t sd_glock_disposal
;
637 struct completion sd_locking_init
;
638 struct delayed_work sd_control_work
;
642 struct dentry
*sd_master_dir
;
643 struct dentry
*sd_root_dir
;
645 struct inode
*sd_jindex
;
646 struct inode
*sd_statfs_inode
;
647 struct inode
*sd_sc_inode
;
648 struct inode
*sd_qc_inode
;
649 struct inode
*sd_rindex
;
650 struct inode
*sd_quota_inode
;
654 spinlock_t sd_statfs_spin
;
655 struct gfs2_statfs_change_host sd_statfs_master
;
656 struct gfs2_statfs_change_host sd_statfs_local
;
657 int sd_statfs_force_sync
;
659 /* Resource group stuff */
661 int sd_rindex_uptodate
;
662 spinlock_t sd_rindex_spin
;
663 struct rb_root sd_rindex_tree
;
664 unsigned int sd_rgrps
;
665 unsigned int sd_max_rg_data
;
667 /* Journal index stuff */
669 struct list_head sd_jindex_list
;
670 spinlock_t sd_jindex_spin
;
671 struct mutex sd_jindex_mutex
;
672 unsigned int sd_journals
;
674 struct gfs2_jdesc
*sd_jdesc
;
675 struct gfs2_holder sd_journal_gh
;
676 struct gfs2_holder sd_jinode_gh
;
678 struct gfs2_holder sd_sc_gh
;
679 struct gfs2_holder sd_qc_gh
;
683 struct task_struct
*sd_logd_process
;
684 struct task_struct
*sd_quotad_process
;
688 struct list_head sd_quota_list
;
689 atomic_t sd_quota_count
;
690 struct mutex sd_quota_mutex
;
691 wait_queue_head_t sd_quota_wait
;
692 struct list_head sd_trunc_list
;
693 spinlock_t sd_trunc_lock
;
695 unsigned int sd_quota_slots
;
696 unsigned int sd_quota_chunks
;
697 unsigned char **sd_quota_bitmap
;
699 u64 sd_quota_sync_gen
;
703 spinlock_t sd_log_lock
;
705 unsigned int sd_log_blks_reserved
;
706 unsigned int sd_log_commited_buf
;
707 unsigned int sd_log_commited_databuf
;
708 int sd_log_commited_revoke
;
710 atomic_t sd_log_pinned
;
711 unsigned int sd_log_num_buf
;
712 unsigned int sd_log_num_revoke
;
713 unsigned int sd_log_num_rg
;
714 unsigned int sd_log_num_databuf
;
716 struct list_head sd_log_le_buf
;
717 struct list_head sd_log_le_revoke
;
718 struct list_head sd_log_le_databuf
;
719 struct list_head sd_log_le_ordered
;
721 atomic_t sd_log_thresh1
;
722 atomic_t sd_log_thresh2
;
723 atomic_t sd_log_blks_free
;
724 wait_queue_head_t sd_log_waitq
;
725 wait_queue_head_t sd_logd_waitq
;
728 unsigned int sd_log_head
;
729 unsigned int sd_log_tail
;
732 struct rw_semaphore sd_log_flush_lock
;
733 atomic_t sd_log_in_flight
;
734 struct bio
*sd_log_bio
;
735 wait_queue_head_t sd_log_flush_wait
;
738 unsigned int sd_log_flush_head
;
739 u64 sd_log_flush_wrapped
;
741 spinlock_t sd_ail_lock
;
742 struct list_head sd_ail1_list
;
743 struct list_head sd_ail2_list
;
747 struct list_head sd_revoke_list
;
748 unsigned int sd_replay_tail
;
750 unsigned int sd_found_blocks
;
751 unsigned int sd_found_revokes
;
752 unsigned int sd_replayed_blocks
;
754 /* For quiescing the filesystem */
756 struct gfs2_holder sd_freeze_gh
;
757 struct mutex sd_freeze_lock
;
758 unsigned int sd_freeze_count
;
760 char sd_fsname
[GFS2_FSNAME_LEN
];
761 char sd_table_name
[GFS2_FSNAME_LEN
];
762 char sd_proto_name
[GFS2_FSNAME_LEN
];
766 unsigned long sd_last_warning
;
767 struct dentry
*debugfs_dir
; /* debugfs directory */
768 struct dentry
*debugfs_dentry_glocks
;
769 struct dentry
*debugfs_dentry_glstats
;
770 struct dentry
*debugfs_dentry_sbstats
;
773 static inline void gfs2_glstats_inc(struct gfs2_glock
*gl
, int which
)
775 gl
->gl_stats
.stats
[which
]++;
778 static inline void gfs2_sbstats_inc(const struct gfs2_glock
*gl
, int which
)
780 const struct gfs2_sbd
*sdp
= gl
->gl_sbd
;
782 this_cpu_ptr(sdp
->sd_lkstats
)->lkstats
[gl
->gl_name
.ln_type
].stats
[which
]++;
786 #endif /* __INCORE_DOT_H__ */