glops.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. /*
  2. * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
  3. * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
  4. *
  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.
  8. */
  9. #include <linux/spinlock.h>
  10. #include <linux/completion.h>
  11. #include <linux/buffer_head.h>
  12. #include <linux/gfs2_ondisk.h>
  13. #include <linux/bio.h>
  14. #include <linux/posix_acl.h>
  15. #include "gfs2.h"
  16. #include "incore.h"
  17. #include "bmap.h"
  18. #include "glock.h"
  19. #include "glops.h"
  20. #include "inode.h"
  21. #include "log.h"
  22. #include "meta_io.h"
  23. #include "recovery.h"
  24. #include "rgrp.h"
  25. #include "util.h"
  26. #include "trans.h"
  27. #include "dir.h"
  28. static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh)
  29. {
  30. fs_err(gl->gl_sbd, "AIL buffer %p: blocknr %llu state 0x%08lx mapping %p page state 0x%lx\n",
  31. bh, (unsigned long long)bh->b_blocknr, bh->b_state,
  32. bh->b_page->mapping, bh->b_page->flags);
  33. fs_err(gl->gl_sbd, "AIL glock %u:%llu mapping %p\n",
  34. gl->gl_name.ln_type, gl->gl_name.ln_number,
  35. gfs2_glock2aspace(gl));
  36. gfs2_lm_withdraw(gl->gl_sbd, "AIL error\n");
  37. }
  38. /**
  39. * __gfs2_ail_flush - remove all buffers for a given lock from the AIL
  40. * @gl: the glock
  41. * @fsync: set when called from fsync (not all buffers will be clean)
  42. *
  43. * None of the buffers should be dirty, locked, or pinned.
  44. */
  45. static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
  46. {
  47. struct gfs2_sbd *sdp = gl->gl_sbd;
  48. struct list_head *head = &gl->gl_ail_list;
  49. struct gfs2_bufdata *bd, *tmp;
  50. struct buffer_head *bh;
  51. const unsigned long b_state = (1UL << BH_Dirty)|(1UL << BH_Pinned)|(1UL << BH_Lock);
  52. gfs2_log_lock(sdp);
  53. spin_lock(&sdp->sd_ail_lock);
  54. list_for_each_entry_safe(bd, tmp, head, bd_ail_gl_list) {
  55. bh = bd->bd_bh;
  56. if (bh->b_state & b_state) {
  57. if (fsync)
  58. continue;
  59. gfs2_ail_error(gl, bh);
  60. }
  61. gfs2_trans_add_revoke(sdp, bd);
  62. }
  63. GLOCK_BUG_ON(gl, !fsync && atomic_read(&gl->gl_ail_count));
  64. spin_unlock(&sdp->sd_ail_lock);
  65. gfs2_log_unlock(sdp);
  66. }
  67. static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
  68. {
  69. struct gfs2_sbd *sdp = gl->gl_sbd;
  70. struct gfs2_trans tr;
  71. memset(&tr, 0, sizeof(tr));
  72. tr.tr_revokes = atomic_read(&gl->gl_ail_count);
  73. if (!tr.tr_revokes)
  74. return;
  75. /* A shortened, inline version of gfs2_trans_begin() */
  76. tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes, sizeof(u64));
  77. tr.tr_ip = (unsigned long)__builtin_return_address(0);
  78. sb_start_intwrite(sdp->sd_vfs);
  79. gfs2_log_reserve(sdp, tr.tr_reserved);
  80. WARN_ON_ONCE(current->journal_info);
  81. current->journal_info = &tr;
  82. __gfs2_ail_flush(gl, 0);
  83. gfs2_trans_end(sdp);
  84. gfs2_log_flush(sdp, NULL);
  85. }
  86. void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
  87. {
  88. struct gfs2_sbd *sdp = gl->gl_sbd;
  89. unsigned int revokes = atomic_read(&gl->gl_ail_count);
  90. int ret;
  91. if (!revokes)
  92. return;
  93. ret = gfs2_trans_begin(sdp, 0, revokes);
  94. if (ret)
  95. return;
  96. __gfs2_ail_flush(gl, fsync);
  97. gfs2_trans_end(sdp);
  98. gfs2_log_flush(sdp, NULL);
  99. }
  100. /**
  101. * rgrp_go_sync - sync out the metadata for this glock
  102. * @gl: the glock
  103. *
  104. * Called when demoting or unlocking an EX glock. We must flush
  105. * to disk all dirty buffers/pages relating to this glock, and must not
  106. * not return to caller to demote/unlock the glock until I/O is complete.
  107. */
  108. static void rgrp_go_sync(struct gfs2_glock *gl)
  109. {
  110. struct address_space *metamapping = gfs2_glock2aspace(gl);
  111. struct gfs2_rgrpd *rgd;
  112. int error;
  113. if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
  114. return;
  115. GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
  116. gfs2_log_flush(gl->gl_sbd, gl);
  117. filemap_fdatawrite(metamapping);
  118. error = filemap_fdatawait(metamapping);
  119. mapping_set_error(metamapping, error);
  120. gfs2_ail_empty_gl(gl);
  121. spin_lock(&gl->gl_spin);
  122. rgd = gl->gl_object;
  123. if (rgd)
  124. gfs2_free_clones(rgd);
  125. spin_unlock(&gl->gl_spin);
  126. }
  127. /**
  128. * rgrp_go_inval - invalidate the metadata for this glock
  129. * @gl: the glock
  130. * @flags:
  131. *
  132. * We never used LM_ST_DEFERRED with resource groups, so that we
  133. * should always see the metadata flag set here.
  134. *
  135. */
  136. static void rgrp_go_inval(struct gfs2_glock *gl, int flags)
  137. {
  138. struct address_space *mapping = gfs2_glock2aspace(gl);
  139. WARN_ON_ONCE(!(flags & DIO_METADATA));
  140. gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count));
  141. truncate_inode_pages(mapping, 0);
  142. if (gl->gl_object) {
  143. struct gfs2_rgrpd *rgd = (struct gfs2_rgrpd *)gl->gl_object;
  144. rgd->rd_flags &= ~GFS2_RDF_UPTODATE;
  145. }
  146. }
  147. /**
  148. * inode_go_sync - Sync the dirty data and/or metadata for an inode glock
  149. * @gl: the glock protecting the inode
  150. *
  151. */
  152. static void inode_go_sync(struct gfs2_glock *gl)
  153. {
  154. struct gfs2_inode *ip = gl->gl_object;
  155. struct address_space *metamapping = gfs2_glock2aspace(gl);
  156. int error;
  157. if (ip && !S_ISREG(ip->i_inode.i_mode))
  158. ip = NULL;
  159. if (ip && test_and_clear_bit(GIF_SW_PAGED, &ip->i_flags))
  160. unmap_shared_mapping_range(ip->i_inode.i_mapping, 0, 0);
  161. if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
  162. return;
  163. GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
  164. gfs2_log_flush(gl->gl_sbd, gl);
  165. filemap_fdatawrite(metamapping);
  166. if (ip) {
  167. struct address_space *mapping = ip->i_inode.i_mapping;
  168. filemap_fdatawrite(mapping);
  169. error = filemap_fdatawait(mapping);
  170. mapping_set_error(mapping, error);
  171. }
  172. error = filemap_fdatawait(metamapping);
  173. mapping_set_error(metamapping, error);
  174. gfs2_ail_empty_gl(gl);
  175. /*
  176. * Writeback of the data mapping may cause the dirty flag to be set
  177. * so we have to clear it again here.
  178. */
  179. smp_mb__before_clear_bit();
  180. clear_bit(GLF_DIRTY, &gl->gl_flags);
  181. }
  182. /**
  183. * inode_go_inval - prepare a inode glock to be released
  184. * @gl: the glock
  185. * @flags:
  186. *
  187. * Normally we invlidate everything, but if we are moving into
  188. * LM_ST_DEFERRED from LM_ST_SHARED or LM_ST_EXCLUSIVE then we
  189. * can keep hold of the metadata, since it won't have changed.
  190. *
  191. */
  192. static void inode_go_inval(struct gfs2_glock *gl, int flags)
  193. {
  194. struct gfs2_inode *ip = gl->gl_object;
  195. gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count));
  196. if (flags & DIO_METADATA) {
  197. struct address_space *mapping = gfs2_glock2aspace(gl);
  198. truncate_inode_pages(mapping, 0);
  199. if (ip) {
  200. set_bit(GIF_INVALID, &ip->i_flags);
  201. forget_all_cached_acls(&ip->i_inode);
  202. gfs2_dir_hash_inval(ip);
  203. }
  204. }
  205. if (ip == GFS2_I(gl->gl_sbd->sd_rindex)) {
  206. gfs2_log_flush(gl->gl_sbd, NULL);
  207. gl->gl_sbd->sd_rindex_uptodate = 0;
  208. }
  209. if (ip && S_ISREG(ip->i_inode.i_mode))
  210. truncate_inode_pages(ip->i_inode.i_mapping, 0);
  211. }
  212. /**
  213. * inode_go_demote_ok - Check to see if it's ok to unlock an inode glock
  214. * @gl: the glock
  215. *
  216. * Returns: 1 if it's ok
  217. */
  218. static int inode_go_demote_ok(const struct gfs2_glock *gl)
  219. {
  220. struct gfs2_sbd *sdp = gl->gl_sbd;
  221. struct gfs2_holder *gh;
  222. if (sdp->sd_jindex == gl->gl_object || sdp->sd_rindex == gl->gl_object)
  223. return 0;
  224. if (!list_empty(&gl->gl_holders)) {
  225. gh = list_entry(gl->gl_holders.next, struct gfs2_holder, gh_list);
  226. if (gh->gh_list.next != &gl->gl_holders)
  227. return 0;
  228. }
  229. return 1;
  230. }
  231. /**
  232. * gfs2_set_nlink - Set the inode's link count based on on-disk info
  233. * @inode: The inode in question
  234. * @nlink: The link count
  235. *
  236. * If the link count has hit zero, it must never be raised, whatever the
  237. * on-disk inode might say. When new struct inodes are created the link
  238. * count is set to 1, so that we can safely use this test even when reading
  239. * in on disk information for the first time.
  240. */
  241. static void gfs2_set_nlink(struct inode *inode, u32 nlink)
  242. {
  243. /*
  244. * We will need to review setting the nlink count here in the
  245. * light of the forthcoming ro bind mount work. This is a reminder
  246. * to do that.
  247. */
  248. if ((inode->i_nlink != nlink) && (inode->i_nlink != 0)) {
  249. if (nlink == 0)
  250. clear_nlink(inode);
  251. else
  252. set_nlink(inode, nlink);
  253. }
  254. }
  255. static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
  256. {
  257. const struct gfs2_dinode *str = buf;
  258. struct timespec atime;
  259. u16 height, depth;
  260. if (unlikely(ip->i_no_addr != be64_to_cpu(str->di_num.no_addr)))
  261. goto corrupt;
  262. ip->i_no_formal_ino = be64_to_cpu(str->di_num.no_formal_ino);
  263. ip->i_inode.i_mode = be32_to_cpu(str->di_mode);
  264. ip->i_inode.i_rdev = 0;
  265. switch (ip->i_inode.i_mode & S_IFMT) {
  266. case S_IFBLK:
  267. case S_IFCHR:
  268. ip->i_inode.i_rdev = MKDEV(be32_to_cpu(str->di_major),
  269. be32_to_cpu(str->di_minor));
  270. break;
  271. };
  272. i_uid_write(&ip->i_inode, be32_to_cpu(str->di_uid));
  273. i_gid_write(&ip->i_inode, be32_to_cpu(str->di_gid));
  274. gfs2_set_nlink(&ip->i_inode, be32_to_cpu(str->di_nlink));
  275. i_size_write(&ip->i_inode, be64_to_cpu(str->di_size));
  276. gfs2_set_inode_blocks(&ip->i_inode, be64_to_cpu(str->di_blocks));
  277. atime.tv_sec = be64_to_cpu(str->di_atime);
  278. atime.tv_nsec = be32_to_cpu(str->di_atime_nsec);
  279. if (timespec_compare(&ip->i_inode.i_atime, &atime) < 0)
  280. ip->i_inode.i_atime = atime;
  281. ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime);
  282. ip->i_inode.i_mtime.tv_nsec = be32_to_cpu(str->di_mtime_nsec);
  283. ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime);
  284. ip->i_inode.i_ctime.tv_nsec = be32_to_cpu(str->di_ctime_nsec);
  285. ip->i_goal = be64_to_cpu(str->di_goal_meta);
  286. ip->i_generation = be64_to_cpu(str->di_generation);
  287. ip->i_diskflags = be32_to_cpu(str->di_flags);
  288. ip->i_eattr = be64_to_cpu(str->di_eattr);
  289. /* i_diskflags and i_eattr must be set before gfs2_set_inode_flags() */
  290. gfs2_set_inode_flags(&ip->i_inode);
  291. height = be16_to_cpu(str->di_height);
  292. if (unlikely(height > GFS2_MAX_META_HEIGHT))
  293. goto corrupt;
  294. ip->i_height = (u8)height;
  295. depth = be16_to_cpu(str->di_depth);
  296. if (unlikely(depth > GFS2_DIR_MAX_DEPTH))
  297. goto corrupt;
  298. ip->i_depth = (u8)depth;
  299. ip->i_entries = be32_to_cpu(str->di_entries);
  300. if (S_ISREG(ip->i_inode.i_mode))
  301. gfs2_set_aops(&ip->i_inode);
  302. return 0;
  303. corrupt:
  304. gfs2_consist_inode(ip);
  305. return -EIO;
  306. }
  307. /**
  308. * gfs2_inode_refresh - Refresh the incore copy of the dinode
  309. * @ip: The GFS2 inode
  310. *
  311. * Returns: errno
  312. */
  313. int gfs2_inode_refresh(struct gfs2_inode *ip)
  314. {
  315. struct buffer_head *dibh;
  316. int error;
  317. error = gfs2_meta_inode_buffer(ip, &dibh);
  318. if (error)
  319. return error;
  320. error = gfs2_dinode_in(ip, dibh->b_data);
  321. brelse(dibh);
  322. clear_bit(GIF_INVALID, &ip->i_flags);
  323. return error;
  324. }
  325. /**
  326. * inode_go_lock - operation done after an inode lock is locked by a process
  327. * @gl: the glock
  328. * @flags:
  329. *
  330. * Returns: errno
  331. */
  332. static int inode_go_lock(struct gfs2_holder *gh)
  333. {
  334. struct gfs2_glock *gl = gh->gh_gl;
  335. struct gfs2_sbd *sdp = gl->gl_sbd;
  336. struct gfs2_inode *ip = gl->gl_object;
  337. int error = 0;
  338. if (!ip || (gh->gh_flags & GL_SKIP))
  339. return 0;
  340. if (test_bit(GIF_INVALID, &ip->i_flags)) {
  341. error = gfs2_inode_refresh(ip);
  342. if (error)
  343. return error;
  344. }
  345. if ((ip->i_diskflags & GFS2_DIF_TRUNC_IN_PROG) &&
  346. (gl->gl_state == LM_ST_EXCLUSIVE) &&
  347. (gh->gh_state == LM_ST_EXCLUSIVE)) {
  348. spin_lock(&sdp->sd_trunc_lock);
  349. if (list_empty(&ip->i_trunc_list))
  350. list_add(&sdp->sd_trunc_list, &ip->i_trunc_list);
  351. spin_unlock(&sdp->sd_trunc_lock);
  352. wake_up(&sdp->sd_quota_wait);
  353. return 1;
  354. }
  355. return error;
  356. }
  357. /**
  358. * inode_go_dump - print information about an inode
  359. * @seq: The iterator
  360. * @ip: the inode
  361. *
  362. * Returns: 0 on success, -ENOBUFS when we run out of space
  363. */
  364. static int inode_go_dump(struct seq_file *seq, const struct gfs2_glock *gl)
  365. {
  366. const struct gfs2_inode *ip = gl->gl_object;
  367. if (ip == NULL)
  368. return 0;
  369. gfs2_print_dbg(seq, " I: n:%llu/%llu t:%u f:0x%02lx d:0x%08x s:%llu\n",
  370. (unsigned long long)ip->i_no_formal_ino,
  371. (unsigned long long)ip->i_no_addr,
  372. IF2DT(ip->i_inode.i_mode), ip->i_flags,
  373. (unsigned int)ip->i_diskflags,
  374. (unsigned long long)i_size_read(&ip->i_inode));
  375. return 0;
  376. }
  377. /**
  378. * trans_go_sync - promote/demote the transaction glock
  379. * @gl: the glock
  380. * @state: the requested state
  381. * @flags:
  382. *
  383. */
  384. static void trans_go_sync(struct gfs2_glock *gl)
  385. {
  386. struct gfs2_sbd *sdp = gl->gl_sbd;
  387. if (gl->gl_state != LM_ST_UNLOCKED &&
  388. test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) {
  389. gfs2_meta_syncfs(sdp);
  390. gfs2_log_shutdown(sdp);
  391. }
  392. }
  393. /**
  394. * trans_go_xmote_bh - After promoting/demoting the transaction glock
  395. * @gl: the glock
  396. *
  397. */
  398. static int trans_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh)
  399. {
  400. struct gfs2_sbd *sdp = gl->gl_sbd;
  401. struct gfs2_inode *ip = GFS2_I(sdp->sd_jdesc->jd_inode);
  402. struct gfs2_glock *j_gl = ip->i_gl;
  403. struct gfs2_log_header_host head;
  404. int error;
  405. if (test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) {
  406. j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
  407. error = gfs2_find_jhead(sdp->sd_jdesc, &head);
  408. if (error)
  409. gfs2_consist(sdp);
  410. if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT))
  411. gfs2_consist(sdp);
  412. /* Initialize some head of the log stuff */
  413. if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
  414. sdp->sd_log_sequence = head.lh_sequence + 1;
  415. gfs2_log_pointers_init(sdp, head.lh_blkno);
  416. }
  417. }
  418. return 0;
  419. }
  420. /**
  421. * trans_go_demote_ok
  422. * @gl: the glock
  423. *
  424. * Always returns 0
  425. */
  426. static int trans_go_demote_ok(const struct gfs2_glock *gl)
  427. {
  428. return 0;
  429. }
  430. /**
  431. * iopen_go_callback - schedule the dcache entry for the inode to be deleted
  432. * @gl: the glock
  433. *
  434. * gl_spin lock is held while calling this
  435. */
  436. static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
  437. {
  438. struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object;
  439. struct gfs2_sbd *sdp = gl->gl_sbd;
  440. if (!remote || (sdp->sd_vfs->s_flags & MS_RDONLY))
  441. return;
  442. if (gl->gl_demote_state == LM_ST_UNLOCKED &&
  443. gl->gl_state == LM_ST_SHARED && ip) {
  444. gfs2_glock_hold(gl);
  445. if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0)
  446. gfs2_glock_put_nolock(gl);
  447. }
  448. }
  449. const struct gfs2_glock_operations gfs2_meta_glops = {
  450. .go_type = LM_TYPE_META,
  451. };
  452. const struct gfs2_glock_operations gfs2_inode_glops = {
  453. .go_sync = inode_go_sync,
  454. .go_inval = inode_go_inval,
  455. .go_demote_ok = inode_go_demote_ok,
  456. .go_lock = inode_go_lock,
  457. .go_dump = inode_go_dump,
  458. .go_type = LM_TYPE_INODE,
  459. .go_flags = GLOF_ASPACE,
  460. };
  461. const struct gfs2_glock_operations gfs2_rgrp_glops = {
  462. .go_sync = rgrp_go_sync,
  463. .go_inval = rgrp_go_inval,
  464. .go_lock = gfs2_rgrp_go_lock,
  465. .go_unlock = gfs2_rgrp_go_unlock,
  466. .go_dump = gfs2_rgrp_dump,
  467. .go_type = LM_TYPE_RGRP,
  468. .go_flags = GLOF_ASPACE | GLOF_LVB,
  469. };
  470. const struct gfs2_glock_operations gfs2_trans_glops = {
  471. .go_sync = trans_go_sync,
  472. .go_xmote_bh = trans_go_xmote_bh,
  473. .go_demote_ok = trans_go_demote_ok,
  474. .go_type = LM_TYPE_NONDISK,
  475. };
  476. const struct gfs2_glock_operations gfs2_iopen_glops = {
  477. .go_type = LM_TYPE_IOPEN,
  478. .go_callback = iopen_go_callback,
  479. };
  480. const struct gfs2_glock_operations gfs2_flock_glops = {
  481. .go_type = LM_TYPE_FLOCK,
  482. };
  483. const struct gfs2_glock_operations gfs2_nondisk_glops = {
  484. .go_type = LM_TYPE_NONDISK,
  485. };
  486. const struct gfs2_glock_operations gfs2_quota_glops = {
  487. .go_type = LM_TYPE_QUOTA,
  488. .go_flags = GLOF_LVB,
  489. };
  490. const struct gfs2_glock_operations gfs2_journal_glops = {
  491. .go_type = LM_TYPE_JOURNAL,
  492. };
  493. const struct gfs2_glock_operations *gfs2_glops_list[] = {
  494. [LM_TYPE_META] = &gfs2_meta_glops,
  495. [LM_TYPE_INODE] = &gfs2_inode_glops,
  496. [LM_TYPE_RGRP] = &gfs2_rgrp_glops,
  497. [LM_TYPE_IOPEN] = &gfs2_iopen_glops,
  498. [LM_TYPE_FLOCK] = &gfs2_flock_glops,
  499. [LM_TYPE_NONDISK] = &gfs2_nondisk_glops,
  500. [LM_TYPE_QUOTA] = &gfs2_quota_glops,
  501. [LM_TYPE_JOURNAL] = &gfs2_journal_glops,
  502. };