glops.c 15 KB

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