2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2006 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 #include <linux/sched.h>
11 #include <linux/slab.h>
12 #include <linux/spinlock.h>
13 #include <linux/completion.h>
14 #include <linux/buffer_head.h>
15 #include <linux/gfs2_ondisk.h>
16 #include <linux/lm_interface.h>
31 * gfs2_pin - Pin a buffer in memory
32 * @sdp: The superblock
33 * @bh: The buffer to be pinned
35 * The log lock must be held when calling this function
37 static void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh)
39 struct gfs2_bufdata *bd;
41 gfs2_assert_withdraw(sdp, test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags));
43 clear_buffer_dirty(bh);
44 if (test_set_buffer_pinned(bh))
45 gfs2_assert_withdraw(sdp, 0);
46 if (!buffer_uptodate(bh))
47 gfs2_io_error_bh(sdp, bh);
49 /* If this buffer is in the AIL and it has already been written
50 * to in-place disk block, remove it from the AIL.
53 list_move(&bd->bd_ail_st_list, &bd->bd_ail->ai_ail2_list);
58 * gfs2_unpin - Unpin a buffer
59 * @sdp: the filesystem the buffer belongs to
60 * @bh: The buffer to unpin
65 static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
68 struct gfs2_bufdata *bd = bh->b_private;
70 gfs2_assert_withdraw(sdp, buffer_uptodate(bh));
72 if (!buffer_pinned(bh))
73 gfs2_assert_withdraw(sdp, 0);
76 mark_buffer_dirty(bh);
77 clear_buffer_pinned(bh);
81 list_del(&bd->bd_ail_st_list);
84 struct gfs2_glock *gl = bd->bd_gl;
85 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list);
86 atomic_inc(&gl->gl_ail_count);
89 list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list);
94 static void __glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
96 struct gfs2_glock *gl;
97 struct gfs2_trans *tr = current->journal_info;
101 gl = container_of(le, struct gfs2_glock, gl_le);
102 if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(gl)))
105 if (!list_empty(&le->le_list))
109 set_bit(GLF_DIRTY, &gl->gl_flags);
110 sdp->sd_log_num_gl++;
111 list_add(&le->le_list, &sdp->sd_log_le_gl);
114 static void glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
117 __glock_lo_add(sdp, le);
118 gfs2_log_unlock(sdp);
121 static void glock_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
123 struct list_head *head = &sdp->sd_log_le_gl;
124 struct gfs2_glock *gl;
126 while (!list_empty(head)) {
127 gl = list_entry(head->next, struct gfs2_glock, gl_le.le_list);
128 list_del_init(&gl->gl_le.le_list);
129 sdp->sd_log_num_gl--;
131 gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(gl));
134 gfs2_assert_warn(sdp, !sdp->sd_log_num_gl);
137 static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
139 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le);
140 struct gfs2_trans *tr;
142 lock_buffer(bd->bd_bh);
144 if (!list_empty(&bd->bd_list_tr))
146 tr = current->journal_info;
149 list_add(&bd->bd_list_tr, &tr->tr_list_buf);
150 if (!list_empty(&le->le_list))
152 __glock_lo_add(sdp, &bd->bd_gl->gl_le);
153 gfs2_meta_check(sdp, bd->bd_bh);
154 gfs2_pin(sdp, bd->bd_bh);
155 sdp->sd_log_num_buf++;
156 list_add(&le->le_list, &sdp->sd_log_le_buf);
157 tr->tr_num_buf_new++;
159 gfs2_log_unlock(sdp);
160 unlock_buffer(bd->bd_bh);
163 static void buf_lo_incore_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
165 struct list_head *head = &tr->tr_list_buf;
166 struct gfs2_bufdata *bd;
169 while (!list_empty(head)) {
170 bd = list_entry(head->next, struct gfs2_bufdata, bd_list_tr);
171 list_del_init(&bd->bd_list_tr);
174 gfs2_log_unlock(sdp);
175 gfs2_assert_warn(sdp, !tr->tr_num_buf);
178 static void buf_lo_before_commit(struct gfs2_sbd *sdp)
180 struct buffer_head *bh;
181 struct gfs2_log_descriptor *ld;
182 struct gfs2_bufdata *bd1 = NULL, *bd2;
184 unsigned int offset = BUF_OFFSET;
190 limit = buf_limit(sdp);
191 /* for 4k blocks, limit = 503 */
194 total = sdp->sd_log_num_buf;
195 bd1 = bd2 = list_prepare_entry(bd1, &sdp->sd_log_le_buf, bd_le.le_list);
200 gfs2_log_unlock(sdp);
201 bh = gfs2_log_get_buf(sdp);
203 ld = (struct gfs2_log_descriptor *)bh->b_data;
204 ptr = (__be64 *)(bh->b_data + offset);
205 ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
206 ld->ld_header.mh_type = cpu_to_be32(GFS2_METATYPE_LD);
207 ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD);
208 ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_METADATA);
209 ld->ld_length = cpu_to_be32(num + 1);
210 ld->ld_data1 = cpu_to_be32(num);
211 ld->ld_data2 = cpu_to_be32(0);
212 memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved));
215 list_for_each_entry_continue(bd1, &sdp->sd_log_le_buf,
217 *ptr++ = cpu_to_be64(bd1->bd_bh->b_blocknr);
222 gfs2_log_unlock(sdp);
223 set_buffer_dirty(bh);
224 ll_rw_block(WRITE, 1, &bh);
228 list_for_each_entry_continue(bd2, &sdp->sd_log_le_buf,
230 gfs2_log_unlock(sdp);
231 bh = gfs2_log_fake_buf(sdp, bd2->bd_bh);
232 set_buffer_dirty(bh);
233 ll_rw_block(WRITE, 1, &bh);
242 gfs2_log_unlock(sdp);
245 static void buf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
247 struct list_head *head = &sdp->sd_log_le_buf;
248 struct gfs2_bufdata *bd;
250 while (!list_empty(head)) {
251 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list);
252 list_del_init(&bd->bd_le.le_list);
253 sdp->sd_log_num_buf--;
255 gfs2_unpin(sdp, bd->bd_bh, ai);
257 gfs2_assert_warn(sdp, !sdp->sd_log_num_buf);
260 static void buf_lo_before_scan(struct gfs2_jdesc *jd,
261 struct gfs2_log_header_host *head, int pass)
263 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
268 sdp->sd_found_blocks = 0;
269 sdp->sd_replayed_blocks = 0;
272 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
273 struct gfs2_log_descriptor *ld, __be64 *ptr,
276 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
277 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
278 struct gfs2_glock *gl = ip->i_gl;
279 unsigned int blks = be32_to_cpu(ld->ld_data1);
280 struct buffer_head *bh_log, *bh_ip;
284 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_METADATA)
287 gfs2_replay_incr_blk(sdp, &start);
289 for (; blks; gfs2_replay_incr_blk(sdp, &start), blks--) {
290 blkno = be64_to_cpu(*ptr++);
292 sdp->sd_found_blocks++;
294 if (gfs2_revoke_check(sdp, blkno, start))
297 error = gfs2_replay_read_block(jd, start, &bh_log);
301 bh_ip = gfs2_meta_new(gl, blkno);
302 memcpy(bh_ip->b_data, bh_log->b_data, bh_log->b_size);
304 if (gfs2_meta_check(sdp, bh_ip))
307 mark_buffer_dirty(bh_ip);
315 sdp->sd_replayed_blocks++;
321 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
323 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
324 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
327 gfs2_meta_sync(ip->i_gl);
333 gfs2_meta_sync(ip->i_gl);
335 fs_info(sdp, "jid=%u: Replayed %u of %u blocks\n",
336 jd->jd_jid, sdp->sd_replayed_blocks, sdp->sd_found_blocks);
339 static void revoke_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
341 struct gfs2_trans *tr;
343 tr = current->journal_info;
346 sdp->sd_log_num_revoke++;
347 list_add(&le->le_list, &sdp->sd_log_le_revoke);
350 static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
352 struct gfs2_log_descriptor *ld;
353 struct gfs2_meta_header *mh;
354 struct buffer_head *bh;
356 struct list_head *head = &sdp->sd_log_le_revoke;
357 struct gfs2_bufdata *bd;
359 if (!sdp->sd_log_num_revoke)
362 bh = gfs2_log_get_buf(sdp);
363 ld = (struct gfs2_log_descriptor *)bh->b_data;
364 ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
365 ld->ld_header.mh_type = cpu_to_be32(GFS2_METATYPE_LD);
366 ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD);
367 ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE);
368 ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke,
370 ld->ld_data1 = cpu_to_be32(sdp->sd_log_num_revoke);
371 ld->ld_data2 = cpu_to_be32(0);
372 memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved));
373 offset = sizeof(struct gfs2_log_descriptor);
375 while (!list_empty(head)) {
376 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list);
377 list_del_init(&bd->bd_le.le_list);
378 sdp->sd_log_num_revoke--;
380 if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) {
381 set_buffer_dirty(bh);
382 ll_rw_block(WRITE, 1, &bh);
384 bh = gfs2_log_get_buf(sdp);
385 mh = (struct gfs2_meta_header *)bh->b_data;
386 mh->mh_magic = cpu_to_be32(GFS2_MAGIC);
387 mh->mh_type = cpu_to_be32(GFS2_METATYPE_LB);
388 mh->mh_format = cpu_to_be32(GFS2_FORMAT_LB);
389 offset = sizeof(struct gfs2_meta_header);
392 *(__be64 *)(bh->b_data + offset) = cpu_to_be64(bd->bd_blkno);
393 kmem_cache_free(gfs2_bufdata_cachep, bd);
395 offset += sizeof(u64);
397 gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke);
399 set_buffer_dirty(bh);
400 ll_rw_block(WRITE, 1, &bh);
403 static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
404 struct gfs2_log_header_host *head, int pass)
406 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
411 sdp->sd_found_revokes = 0;
412 sdp->sd_replay_tail = head->lh_tail;
415 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
416 struct gfs2_log_descriptor *ld, __be64 *ptr,
419 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
420 unsigned int blks = be32_to_cpu(ld->ld_length);
421 unsigned int revokes = be32_to_cpu(ld->ld_data1);
422 struct buffer_head *bh;
428 if (pass != 0 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_REVOKE)
431 offset = sizeof(struct gfs2_log_descriptor);
433 for (; blks; gfs2_replay_incr_blk(sdp, &start), blks--) {
434 error = gfs2_replay_read_block(jd, start, &bh);
439 gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LB);
441 while (offset + sizeof(u64) <= sdp->sd_sb.sb_bsize) {
442 blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset));
444 error = gfs2_revoke_add(sdp, blkno, start);
448 sdp->sd_found_revokes++;
452 offset += sizeof(u64);
456 offset = sizeof(struct gfs2_meta_header);
463 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
465 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
468 gfs2_revoke_clean(sdp);
474 fs_info(sdp, "jid=%u: Found %u revoke tags\n",
475 jd->jd_jid, sdp->sd_found_revokes);
477 gfs2_revoke_clean(sdp);
480 static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
482 struct gfs2_rgrpd *rgd;
483 struct gfs2_trans *tr = current->journal_info;
487 rgd = container_of(le, struct gfs2_rgrpd, rd_le);
490 if (!list_empty(&le->le_list)){
491 gfs2_log_unlock(sdp);
494 gfs2_rgrp_bh_hold(rgd);
495 sdp->sd_log_num_rg++;
496 list_add(&le->le_list, &sdp->sd_log_le_rg);
497 gfs2_log_unlock(sdp);
500 static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
502 struct list_head *head = &sdp->sd_log_le_rg;
503 struct gfs2_rgrpd *rgd;
505 while (!list_empty(head)) {
506 rgd = list_entry(head->next, struct gfs2_rgrpd, rd_le.le_list);
507 list_del_init(&rgd->rd_le.le_list);
508 sdp->sd_log_num_rg--;
510 gfs2_rgrp_repolish_clones(rgd);
511 gfs2_rgrp_bh_put(rgd);
513 gfs2_assert_warn(sdp, !sdp->sd_log_num_rg);
517 * databuf_lo_add - Add a databuf to the transaction.
519 * This is used in two distinct cases:
520 * i) In ordered write mode
521 * We put the data buffer on a list so that we can ensure that its
522 * synced to disk at the right time
523 * ii) In journaled data mode
524 * We need to journal the data block in the same way as metadata in
525 * the functions above. The difference is that here we have a tag
526 * which is two __be64's being the block number (as per meta data)
527 * and a flag which says whether the data block needs escaping or
528 * not. This means we need a new log entry for each 251 or so data
529 * blocks, which isn't an enormous overhead but twice as much as
530 * for normal metadata blocks.
532 static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
534 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le);
535 struct gfs2_trans *tr = current->journal_info;
536 struct address_space *mapping = bd->bd_bh->b_page->mapping;
537 struct gfs2_inode *ip = GFS2_I(mapping->host);
539 lock_buffer(bd->bd_bh);
541 if (!list_empty(&bd->bd_list_tr))
544 if (gfs2_is_jdata(ip)) {
546 list_add(&bd->bd_list_tr, &tr->tr_list_buf);
548 if (!list_empty(&le->le_list))
551 __glock_lo_add(sdp, &bd->bd_gl->gl_le);
552 if (gfs2_is_jdata(ip)) {
553 gfs2_pin(sdp, bd->bd_bh);
554 tr->tr_num_databuf_new++;
555 sdp->sd_log_num_databuf++;
556 list_add(&le->le_list, &sdp->sd_log_le_databuf);
558 list_add(&le->le_list, &sdp->sd_log_le_ordered);
561 gfs2_log_unlock(sdp);
562 unlock_buffer(bd->bd_bh);
565 static int gfs2_check_magic(struct buffer_head *bh)
567 struct page *page = bh->b_page;
572 kaddr = kmap_atomic(page, KM_USER0);
573 ptr = kaddr + bh_offset(bh);
574 if (*ptr == cpu_to_be32(GFS2_MAGIC))
576 kunmap_atomic(kaddr, KM_USER0);
582 * databuf_lo_before_commit - Scan the data buffers, writing as we go
586 static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
588 struct gfs2_bufdata *bd1 = NULL, *bd2;
589 struct buffer_head *bh = NULL,*bh1 = NULL;
590 struct gfs2_log_descriptor *ld;
598 limit = databuf_limit(sdp);
601 total = sdp->sd_log_num_databuf;
602 bd2 = bd1 = list_prepare_entry(bd1, &sdp->sd_log_le_databuf,
609 gfs2_log_unlock(sdp);
610 bh = gfs2_log_get_buf(sdp);
613 ld = (struct gfs2_log_descriptor *)bh->b_data;
614 ptr = (__be64 *)(bh->b_data + DATABUF_OFFSET);
615 ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
616 ld->ld_header.mh_type = cpu_to_be32(GFS2_METATYPE_LD);
617 ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD);
618 ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_JDATA);
619 ld->ld_length = cpu_to_be32(num + 1);
620 ld->ld_data1 = cpu_to_be32(num);
621 ld->ld_data2 = cpu_to_be32(0);
622 memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved));
625 list_for_each_entry_continue(bd1, &sdp->sd_log_le_databuf,
629 magic = gfs2_check_magic(bh1);
630 *ptr++ = cpu_to_be64(bh1->b_blocknr);
631 *ptr++ = cpu_to_be64((__u64)magic);
632 clear_buffer_escaped(bh1);
633 if (unlikely(magic != 0))
634 set_buffer_escaped(bh1);
638 gfs2_log_unlock(sdp);
640 set_buffer_dirty(bh);
641 ll_rw_block(WRITE, 1, &bh);
647 list_for_each_entry_continue(bd2, &sdp->sd_log_le_databuf,
651 /* copy buffer if it needs escaping */
652 gfs2_log_unlock(sdp);
653 if (unlikely(buffer_escaped(bd2->bd_bh))) {
655 struct page *page = bd2->bd_bh->b_page;
656 bh = gfs2_log_get_buf(sdp);
657 kaddr = kmap_atomic(page, KM_USER0);
659 kaddr + bh_offset(bd2->bd_bh),
660 sdp->sd_sb.sb_bsize);
661 kunmap_atomic(kaddr, KM_USER0);
662 *(__be32 *)bh->b_data = 0;
664 bh = gfs2_log_fake_buf(sdp, bd2->bd_bh);
666 set_buffer_dirty(bh);
667 ll_rw_block(WRITE, 1, &bh);
676 gfs2_log_unlock(sdp);
679 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
680 struct gfs2_log_descriptor *ld,
681 __be64 *ptr, int pass)
683 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
684 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
685 struct gfs2_glock *gl = ip->i_gl;
686 unsigned int blks = be32_to_cpu(ld->ld_data1);
687 struct buffer_head *bh_log, *bh_ip;
692 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_JDATA)
695 gfs2_replay_incr_blk(sdp, &start);
696 for (; blks; gfs2_replay_incr_blk(sdp, &start), blks--) {
697 blkno = be64_to_cpu(*ptr++);
698 esc = be64_to_cpu(*ptr++);
700 sdp->sd_found_blocks++;
702 if (gfs2_revoke_check(sdp, blkno, start))
705 error = gfs2_replay_read_block(jd, start, &bh_log);
709 bh_ip = gfs2_meta_new(gl, blkno);
710 memcpy(bh_ip->b_data, bh_log->b_data, bh_log->b_size);
714 __be32 *eptr = (__be32 *)bh_ip->b_data;
715 *eptr = cpu_to_be32(GFS2_MAGIC);
717 mark_buffer_dirty(bh_ip);
724 sdp->sd_replayed_blocks++;
730 /* FIXME: sort out accounting for log blocks etc. */
732 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
734 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
735 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
738 gfs2_meta_sync(ip->i_gl);
745 gfs2_meta_sync(ip->i_gl);
747 fs_info(sdp, "jid=%u: Replayed %u of %u data blocks\n",
748 jd->jd_jid, sdp->sd_replayed_blocks, sdp->sd_found_blocks);
751 static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
753 struct list_head *head = &sdp->sd_log_le_databuf;
754 struct gfs2_bufdata *bd;
756 while (!list_empty(head)) {
757 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list);
758 list_del_init(&bd->bd_le.le_list);
759 sdp->sd_log_num_databuf--;
760 gfs2_unpin(sdp, bd->bd_bh, ai);
762 gfs2_assert_warn(sdp, !sdp->sd_log_num_databuf);
766 const struct gfs2_log_operations gfs2_glock_lops = {
767 .lo_add = glock_lo_add,
768 .lo_after_commit = glock_lo_after_commit,
772 const struct gfs2_log_operations gfs2_buf_lops = {
773 .lo_add = buf_lo_add,
774 .lo_incore_commit = buf_lo_incore_commit,
775 .lo_before_commit = buf_lo_before_commit,
776 .lo_after_commit = buf_lo_after_commit,
777 .lo_before_scan = buf_lo_before_scan,
778 .lo_scan_elements = buf_lo_scan_elements,
779 .lo_after_scan = buf_lo_after_scan,
783 const struct gfs2_log_operations gfs2_revoke_lops = {
784 .lo_add = revoke_lo_add,
785 .lo_before_commit = revoke_lo_before_commit,
786 .lo_before_scan = revoke_lo_before_scan,
787 .lo_scan_elements = revoke_lo_scan_elements,
788 .lo_after_scan = revoke_lo_after_scan,
792 const struct gfs2_log_operations gfs2_rg_lops = {
794 .lo_after_commit = rg_lo_after_commit,
798 const struct gfs2_log_operations gfs2_databuf_lops = {
799 .lo_add = databuf_lo_add,
800 .lo_incore_commit = buf_lo_incore_commit,
801 .lo_before_commit = databuf_lo_before_commit,
802 .lo_after_commit = databuf_lo_after_commit,
803 .lo_scan_elements = databuf_lo_scan_elements,
804 .lo_after_scan = databuf_lo_after_scan,
805 .lo_name = "databuf",
808 const struct gfs2_log_operations *gfs2_log_ops[] = {