• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/gfs2/

Lines Matching defs:sdp

49 	struct gfs2_sbd *sdp;         /* incore superblock         */
58 static int gfs2_dump_lockstate(struct gfs2_sbd *sdp);
154 static unsigned int gl_hash(const struct gfs2_sbd *sdp,
161 h = jhash(&sdp, sizeof(struct gfs2_sbd *), h);
177 struct gfs2_sbd *sdp = gl->gl_sbd;
180 gfs2_lm_put_lock(sdp, gl->gl_lock);
208 struct gfs2_sbd *sdp = gl->gl_sbd;
215 gfs2_assert(sdp, gl->gl_state == LM_ST_UNLOCKED);
216 gfs2_assert(sdp, list_empty(&gl->gl_reclaim));
217 gfs2_assert(sdp, list_empty(&gl->gl_holders));
218 gfs2_assert(sdp, list_empty(&gl->gl_waiters1));
219 gfs2_assert(sdp, list_empty(&gl->gl_waiters3));
238 const struct gfs2_sbd *sdp,
247 if (gl->gl_sbd != sdp)
260 * @sdp: The GFS2 superblock
266 static struct gfs2_glock *gfs2_glock_find(const struct gfs2_sbd *sdp,
269 unsigned int hash = gl_hash(sdp, name);
273 gl = search_bucket(hash, sdp, name);
281 * @sdp: The GFS2 superblock
292 int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
298 unsigned int hash = gl_hash(sdp, &name);
302 gl = search_bucket(hash, sdp, &name);
327 gl->gl_sbd = sdp;
334 gl->gl_aspace = gfs2_aspace_get(sdp);
341 error = gfs2_lm_get_lock(sdp, &name, &gl->gl_lock);
346 tmp = search_bucket(hash, sdp, &name);
474 struct gfs2_sbd *sdp = gl->gl_sbd;
482 if (atomic_read(&sdp->sd_reclaim_count) >
483 gfs2_tune_get(sdp, gt_reclaim_limit) &&
485 gfs2_reclaim_glock(sdp);
486 gfs2_reclaim_glock(sdp);
714 struct gfs2_sbd *sdp = gl->gl_sbd;
720 gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags));
721 gfs2_assert_warn(sdp, list_empty(&gl->gl_holders));
722 gfs2_assert_warn(sdp, !(ret & LM_OUT_ASYNC));
748 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
765 if (gfs2_assert_withdraw(sdp, 0) == -1)
766 fs_err(sdp, "ret = 0x%.8X\n", ret);
799 struct gfs2_sbd *sdp = gl->gl_sbd;
811 gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags));
812 gfs2_assert_warn(sdp, list_empty(&gl->gl_holders));
813 gfs2_assert_warn(sdp, state != LM_ST_UNLOCKED);
814 gfs2_assert_warn(sdp, state != gl->gl_state);
819 lck_ret = gfs2_lm_lock(sdp, gl->gl_lock, gl->gl_state, state, lck_flags);
821 if (gfs2_assert_withdraw(sdp, !(lck_ret & LM_OUT_ERROR)))
825 gfs2_assert_warn(sdp, lck_ret == LM_OUT_ASYNC);
842 struct gfs2_sbd *sdp = gl->gl_sbd;
846 gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags));
847 gfs2_assert_warn(sdp, list_empty(&gl->gl_holders));
848 gfs2_assert_warn(sdp, !ret);
884 struct gfs2_sbd *sdp = gl->gl_sbd;
891 gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags));
892 gfs2_assert_warn(sdp, list_empty(&gl->gl_holders));
893 gfs2_assert_warn(sdp, gl->gl_state != LM_ST_UNLOCKED);
898 ret = gfs2_lm_unlock(sdp, gl->gl_lock, gl->gl_state);
900 if (gfs2_assert_withdraw(sdp, !(ret & LM_OUT_ERROR)))
906 gfs2_assert_warn(sdp, ret == LM_OUT_ASYNC);
951 struct gfs2_sbd *sdp = gl->gl_sbd;
978 gfs2_assert_withdraw(sdp, test_bit(HIF_HOLDER, &gh->gh_iflags));
979 gfs2_assert_withdraw(sdp, relaxed_state_ok(gl->gl_state, gh->gh_state,
983 gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags));
1085 struct gfs2_sbd *sdp = gl->gl_sbd;
1089 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
1213 * @sdp: the filesystem
1223 int gfs2_glock_nq_num(struct gfs2_sbd *sdp, u64 number,
1230 error = gfs2_glock_get(sdp, number, glops, CREATE, &gl);
1450 static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name,
1455 gl = gfs2_glock_find(sdp, name);
1470 * @sdp: Pointer to the superblock
1481 struct gfs2_sbd *sdp = cb_data;
1485 blocking_cb(sdp, data, LM_ST_UNLOCKED);
1489 blocking_cb(sdp, data, LM_ST_DEFERRED);
1493 blocking_cb(sdp, data, LM_ST_SHARED);
1501 gl = gfs2_glock_find(sdp, &async->lc_name);
1502 if (gfs2_assert_warn(sdp, gl))
1504 if (!gfs2_assert_warn(sdp, gl->gl_req_bh))
1512 gfs2_jdesc_make_dirty(sdp, *(unsigned int *)data);
1513 if (sdp->sd_recoverd_process)
1514 wake_up_process(sdp->sd_recoverd_process);
1518 gfs2_gl_hash_clear(sdp, NO_WAIT);
1519 gfs2_quota_scan(sdp);
1523 gfs2_assert_warn(sdp, 0);
1556 struct gfs2_sbd *sdp = gl->gl_sbd;
1558 spin_lock(&sdp->sd_reclaim_lock);
1561 list_add(&gl->gl_reclaim, &sdp->sd_reclaim_list);
1562 atomic_inc(&sdp->sd_reclaim_count);
1564 spin_unlock(&sdp->sd_reclaim_lock);
1566 wake_up(&sdp->sd_reclaim_wq);
1571 * @sdp: the filesystem
1579 void gfs2_reclaim_glock(struct gfs2_sbd *sdp)
1583 spin_lock(&sdp->sd_reclaim_lock);
1584 if (list_empty(&sdp->sd_reclaim_list)) {
1585 spin_unlock(&sdp->sd_reclaim_lock);
1588 gl = list_entry(sdp->sd_reclaim_list.next,
1591 spin_unlock(&sdp->sd_reclaim_lock);
1593 atomic_dec(&sdp->sd_reclaim_count);
1594 atomic_inc(&sdp->sd_reclaimed);
1609 * @sdp: the filesystem
1615 static int examine_bucket(glock_examiner examiner, struct gfs2_sbd *sdp,
1628 if (gl->gl_sbd == sdp) {
1675 * @sdp: the filesystem
1679 void gfs2_scand_internal(struct gfs2_sbd *sdp)
1684 examine_bucket(scan_glock, sdp, x);
1695 struct gfs2_sbd *sdp = gl->gl_sbd;
1698 spin_lock(&sdp->sd_reclaim_lock);
1701 atomic_dec(&sdp->sd_reclaim_count);
1702 spin_unlock(&sdp->sd_reclaim_lock);
1704 gfs2_assert(sdp, !released);
1706 spin_unlock(&sdp->sd_reclaim_lock);
1719 * @sdp: the filesystem
1726 void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait)
1737 if (examine_bucket(clear_glock, sdp, x))
1745 t + gfs2_tune_get(sdp, gt_stall_secs) * HZ)) {
1746 fs_warn(sdp, "Unmount seems to be stalled. "
1748 gfs2_dump_lockstate(sdp);
1753 invalidate_inodes(sdp->sd_vfs);
1936 * @sdp: the filesystem
1943 static int gfs2_dump_lockstate(struct gfs2_sbd *sdp)
1955 if (gl->gl_sbd != sdp)
2033 static struct glock_iter *gfs2_glock_iter_init(struct gfs2_sbd *sdp)
2041 gi->sdp = sdp;
2135 int gfs2_create_debugfs_file(struct gfs2_sbd *sdp)
2137 sdp->debugfs_dir = debugfs_create_dir(sdp->sd_table_name, gfs2_root);
2138 if (!sdp->debugfs_dir)
2140 sdp->debugfs_dentry_glocks = debugfs_create_file("glocks",
2142 sdp->debugfs_dir, sdp,
2144 if (!sdp->debugfs_dentry_glocks)
2150 void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp)
2152 if (sdp && sdp->debugfs_dir) {
2153 if (sdp->debugfs_dentry_glocks) {
2154 debugfs_remove(sdp->debugfs_dentry_glocks);
2155 sdp->debugfs_dentry_glocks = NULL;
2157 debugfs_remove(sdp->debugfs_dir);
2158 sdp->debugfs_dir = NULL;