aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAbhi Das <adas@redhat.com>2019-05-02 15:17:40 -0400
committerAndreas Gruenbacher <agruenba@redhat.com>2019-05-07 17:39:15 -0400
commitf4686c26ecc34e8e458b8235f0af5198c9b13bfd (patch)
tree6768f35e9f263165a70e22b3f5d164e0b400e856 /fs/gfs2
parentd0a22a4b03b8475b7aa3fa41243c26c291407844 (diff)
gfs2: read journal in large chunks
Use bios to read in the journal into the address space of the journal inode (jd_inode), sequentially and in large chunks. This is faster for locating the journal head that the previous binary search approach. When performing recovery, we keep the journal in the address space until recovery is done, which further speeds up things. Signed-off-by: Abhi Das <adas@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glops.c3
-rw-r--r--fs/gfs2/log.c4
-rw-r--r--fs/gfs2/lops.c212
-rw-r--r--fs/gfs2/lops.h4
-rw-r--r--fs/gfs2/ops_fstype.c3
-rw-r--r--fs/gfs2/recovery.c125
-rw-r--r--fs/gfs2/recovery.h2
-rw-r--r--fs/gfs2/super.c5
8 files changed, 219 insertions, 139 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 78510ab91835..24ada3ccc525 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -28,6 +28,7 @@
28#include "util.h" 28#include "util.h"
29#include "trans.h" 29#include "trans.h"
30#include "dir.h" 30#include "dir.h"
31#include "lops.h"
31 32
32struct workqueue_struct *gfs2_freeze_wq; 33struct workqueue_struct *gfs2_freeze_wq;
33 34
@@ -531,7 +532,7 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh)
531 if (test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { 532 if (test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) {
532 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); 533 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
533 534
534 error = gfs2_find_jhead(sdp->sd_jdesc, &head); 535 error = gfs2_find_jhead(sdp->sd_jdesc, &head, false);
535 if (error) 536 if (error)
536 gfs2_consist(sdp); 537 gfs2_consist(sdp);
537 if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) 538 if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT))
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index a7febb4bd400..a2e1df488df0 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -744,7 +744,7 @@ void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
744 lh->lh_crc = cpu_to_be32(crc); 744 lh->lh_crc = cpu_to_be32(crc);
745 745
746 gfs2_log_write(sdp, page, sb->s_blocksize, 0, dblock); 746 gfs2_log_write(sdp, page, sb->s_blocksize, 0, dblock);
747 gfs2_log_submit_bio(&sdp->sd_log_bio, REQ_OP_WRITE, op_flags); 747 gfs2_log_submit_bio(&sdp->sd_log_bio, REQ_OP_WRITE | op_flags);
748 log_flush_wait(sdp); 748 log_flush_wait(sdp);
749} 749}
750 750
@@ -821,7 +821,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, u32 flags)
821 821
822 gfs2_ordered_write(sdp); 822 gfs2_ordered_write(sdp);
823 lops_before_commit(sdp, tr); 823 lops_before_commit(sdp, tr);
824 gfs2_log_submit_bio(&sdp->sd_log_bio, REQ_OP_WRITE, 0); 824 gfs2_log_submit_bio(&sdp->sd_log_bio, REQ_OP_WRITE);
825 825
826 if (sdp->sd_log_head != sdp->sd_log_flush_head) { 826 if (sdp->sd_log_head != sdp->sd_log_flush_head) {
827 log_flush_wait(sdp); 827 log_flush_wait(sdp);
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 6af6a3cea967..ce048a9e058d 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -17,7 +17,9 @@
17#include <linux/bio.h> 17#include <linux/bio.h>
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/list_sort.h> 19#include <linux/list_sort.h>
20#include <linux/blkdev.h>
20 21
22#include "bmap.h"
21#include "dir.h" 23#include "dir.h"
22#include "gfs2.h" 24#include "gfs2.h"
23#include "incore.h" 25#include "incore.h"
@@ -194,7 +196,6 @@ static void gfs2_end_log_write_bh(struct gfs2_sbd *sdp,
194/** 196/**
195 * gfs2_end_log_write - end of i/o to the log 197 * gfs2_end_log_write - end of i/o to the log
196 * @bio: The bio 198 * @bio: The bio
197 * @error: Status of i/o request
198 * 199 *
199 * Each bio_vec contains either data from the pagecache or data 200 * Each bio_vec contains either data from the pagecache or data
200 * relating to the log itself. Here we iterate over the bio_vec 201 * relating to the log itself. Here we iterate over the bio_vec
@@ -232,20 +233,19 @@ static void gfs2_end_log_write(struct bio *bio)
232/** 233/**
233 * gfs2_log_submit_bio - Submit any pending log bio 234 * gfs2_log_submit_bio - Submit any pending log bio
234 * @biop: Address of the bio pointer 235 * @biop: Address of the bio pointer
235 * @op: REQ_OP 236 * @opf: REQ_OP | op_flags
236 * @op_flags: req_flag_bits
237 * 237 *
238 * Submit any pending part-built or full bio to the block device. If 238 * Submit any pending part-built or full bio to the block device. If
239 * there is no pending bio, then this is a no-op. 239 * there is no pending bio, then this is a no-op.
240 */ 240 */
241 241
242void gfs2_log_submit_bio(struct bio **biop, int op, int op_flags) 242void gfs2_log_submit_bio(struct bio **biop, int opf)
243{ 243{
244 struct bio *bio = *biop; 244 struct bio *bio = *biop;
245 if (bio) { 245 if (bio) {
246 struct gfs2_sbd *sdp = bio->bi_private; 246 struct gfs2_sbd *sdp = bio->bi_private;
247 atomic_inc(&sdp->sd_log_in_flight); 247 atomic_inc(&sdp->sd_log_in_flight);
248 bio_set_op_attrs(bio, op, op_flags); 248 bio->bi_opf = opf;
249 submit_bio(bio); 249 submit_bio(bio);
250 *biop = NULL; 250 *biop = NULL;
251 } 251 }
@@ -306,7 +306,7 @@ static struct bio *gfs2_log_get_bio(struct gfs2_sbd *sdp, u64 blkno,
306 nblk >>= sdp->sd_fsb2bb_shift; 306 nblk >>= sdp->sd_fsb2bb_shift;
307 if (blkno == nblk && !flush) 307 if (blkno == nblk && !flush)
308 return bio; 308 return bio;
309 gfs2_log_submit_bio(biop, op, 0); 309 gfs2_log_submit_bio(biop, op);
310 } 310 }
311 311
312 *biop = gfs2_log_alloc_bio(sdp, blkno, end_io); 312 *biop = gfs2_log_alloc_bio(sdp, blkno, end_io);
@@ -377,6 +377,206 @@ void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page)
377 gfs2_log_bmap(sdp)); 377 gfs2_log_bmap(sdp));
378} 378}
379 379
380/**
381 * gfs2_end_log_read - end I/O callback for reads from the log
382 * @bio: The bio
383 *
384 * Simply unlock the pages in the bio. The main thread will wait on them and
385 * process them in order as necessary.
386 */
387
388static void gfs2_end_log_read(struct bio *bio)
389{
390 struct page *page;
391 struct bio_vec *bvec;
392 int i;
393 struct bvec_iter_all iter_all;
394
395 bio_for_each_segment_all(bvec, bio, i, iter_all) {
396 page = bvec->bv_page;
397 if (bio->bi_status) {
398 int err = blk_status_to_errno(bio->bi_status);
399
400 SetPageError(page);
401 mapping_set_error(page->mapping, err);
402 }
403 unlock_page(page);
404 }
405
406 bio_put(bio);
407}
408
409/**
410 * gfs2_jhead_pg_srch - Look for the journal head in a given page.
411 * @jd: The journal descriptor
412 * @page: The page to look in
413 *
414 * Returns: 1 if found, 0 otherwise.
415 */
416
417static bool gfs2_jhead_pg_srch(struct gfs2_jdesc *jd,
418 struct gfs2_log_header_host *head,
419 struct page *page)
420{
421 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
422 struct gfs2_log_header_host uninitialized_var(lh);
423 void *kaddr = kmap_atomic(page);
424 unsigned int offset;
425 bool ret = false;
426
427 for (offset = 0; offset < PAGE_SIZE; offset += sdp->sd_sb.sb_bsize) {
428 if (!__get_log_header(sdp, kaddr + offset, 0, &lh)) {
429 if (lh.lh_sequence > head->lh_sequence)
430 *head = lh;
431 else {
432 ret = true;
433 break;
434 }
435 }
436 }
437 kunmap_atomic(kaddr);
438 return ret;
439}
440
441/**
442 * gfs2_jhead_process_page - Search/cleanup a page
443 * @jd: The journal descriptor
444 * @index: Index of the page to look into
445 * @done: If set, perform only cleanup, else search and set if found.
446 *
447 * Find the page with 'index' in the journal's mapping. Search the page for
448 * the journal head if requested (cleanup == false). Release refs on the
449 * page so the page cache can reclaim it (put_page() twice). We grabbed a
450 * reference on this page two times, first when we did a find_or_create_page()
451 * to obtain the page to add it to the bio and second when we do a
452 * find_get_page() here to get the page to wait on while I/O on it is being
453 * completed.
454 * This function is also used to free up a page we might've grabbed but not
455 * used. Maybe we added it to a bio, but not submitted it for I/O. Or we
456 * submitted the I/O, but we already found the jhead so we only need to drop
457 * our references to the page.
458 */
459
460static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index,
461 struct gfs2_log_header_host *head,
462 bool *done)
463{
464 struct page *page;
465
466 page = find_get_page(jd->jd_inode->i_mapping, index);
467 wait_on_page_locked(page);
468
469 if (PageError(page))
470 *done = true;
471
472 if (!*done)
473 *done = gfs2_jhead_pg_srch(jd, head, page);
474
475 put_page(page); /* Once for find_get_page */
476 put_page(page); /* Once more for find_or_create_page */
477}
478
479/**
480 * gfs2_find_jhead - find the head of a log
481 * @jd: The journal descriptor
482 * @head: The log descriptor for the head of the log is returned here
483 *
484 * Do a search of a journal by reading it in large chunks using bios and find
485 * the valid log entry with the highest sequence number. (i.e. the log head)
486 *
487 * Returns: 0 on success, errno otherwise
488 */
489int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head,
490 bool keep_cache)
491{
492 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
493 struct address_space *mapping = jd->jd_inode->i_mapping;
494 unsigned int block = 0, blocks_submitted = 0, blocks_read = 0;
495 unsigned int bsize = sdp->sd_sb.sb_bsize;
496 unsigned int bsize_shift = sdp->sd_sb.sb_bsize_shift;
497 unsigned int shift = PAGE_SHIFT - bsize_shift;
498 unsigned int readhead_blocks = BIO_MAX_PAGES << shift;
499 struct gfs2_journal_extent *je;
500 int sz, ret = 0;
501 struct bio *bio = NULL;
502 struct page *page = NULL;
503 bool done = false;
504 errseq_t since;
505
506 memset(head, 0, sizeof(*head));
507 if (list_empty(&jd->extent_list))
508 gfs2_map_journal_extents(sdp, jd);
509
510 since = filemap_sample_wb_err(mapping);
511 list_for_each_entry(je, &jd->extent_list, list) {
512 for (; block < je->lblock + je->blocks; block++) {
513 u64 dblock;
514
515 if (!page) {
516 page = find_or_create_page(mapping,
517 block >> shift, GFP_NOFS);
518 if (!page) {
519 ret = -ENOMEM;
520 done = true;
521 goto out;
522 }
523 }
524
525 if (bio) {
526 unsigned int off;
527
528 off = (block << bsize_shift) & ~PAGE_MASK;
529 sz = bio_add_page(bio, page, bsize, off);
530 if (sz == bsize) { /* block added */
531 if (off + bsize == PAGE_SIZE) {
532 page = NULL;
533 goto page_added;
534 }
535 continue;
536 }
537 blocks_submitted = block + 1;
538 submit_bio(bio);
539 bio = NULL;
540 }
541
542 dblock = je->dblock + (block - je->lblock);
543 bio = gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read);
544 bio->bi_opf = REQ_OP_READ;
545 sz = bio_add_page(bio, page, bsize, 0);
546 gfs2_assert_warn(sdp, sz == bsize);
547 if (bsize == PAGE_SIZE)
548 page = NULL;
549
550page_added:
551 if (blocks_submitted < blocks_read + readhead_blocks) {
552 /* Keep at least one bio in flight */
553 continue;
554 }
555
556 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
557 blocks_read += PAGE_SIZE >> bsize_shift;
558 if (done)
559 goto out; /* found */
560 }
561 }
562
563out:
564 if (bio)
565 submit_bio(bio);
566 while (blocks_read < block) {
567 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
568 blocks_read += PAGE_SIZE >> bsize_shift;
569 }
570
571 if (!ret)
572 ret = filemap_check_wb_err(mapping, since);
573
574 if (!keep_cache)
575 truncate_inode_pages(mapping, 0);
576
577 return ret;
578}
579
380static struct page *gfs2_get_log_desc(struct gfs2_sbd *sdp, u32 ld_type, 580static struct page *gfs2_get_log_desc(struct gfs2_sbd *sdp, u32 ld_type,
381 u32 ld_length, u32 ld_data1) 581 u32 ld_length, u32 ld_data1)
382{ 582{
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h
index 320fbf28d2fb..f195ffb435ac 100644
--- a/fs/gfs2/lops.h
+++ b/fs/gfs2/lops.h
@@ -25,8 +25,10 @@ extern u64 gfs2_log_bmap(struct gfs2_sbd *sdp);
25extern void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page, 25extern void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page,
26 unsigned size, unsigned offset, u64 blkno); 26 unsigned size, unsigned offset, u64 blkno);
27extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page); 27extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page);
28extern void gfs2_log_submit_bio(struct bio **biop, int op, int op_flags); 28extern void gfs2_log_submit_bio(struct bio **biop, int opf);
29extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); 29extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
30extern int gfs2_find_jhead(struct gfs2_jdesc *jd,
31 struct gfs2_log_header_host *head, bool keep_cache);
30 32
31static inline unsigned int buf_limit(struct gfs2_sbd *sdp) 33static inline unsigned int buf_limit(struct gfs2_sbd *sdp)
32{ 34{
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index abfaecde0e3d..46f6615eaf12 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -41,6 +41,7 @@
41#include "dir.h" 41#include "dir.h"
42#include "meta_io.h" 42#include "meta_io.h"
43#include "trace_gfs2.h" 43#include "trace_gfs2.h"
44#include "lops.h"
44 45
45#define DO 0 46#define DO 0
46#define UNDO 1 47#define UNDO 1
@@ -616,7 +617,7 @@ static int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
616 fs_err(sdp, "Error checking journal for spectator mount.\n"); 617 fs_err(sdp, "Error checking journal for spectator mount.\n");
617 goto out_unlock; 618 goto out_unlock;
618 } 619 }
619 error = gfs2_find_jhead(jd, &head); 620 error = gfs2_find_jhead(jd, &head, false);
620 if (error) { 621 if (error) {
621 fs_err(sdp, "Error parsing journal for spectator mount.\n"); 622 fs_err(sdp, "Error parsing journal for spectator mount.\n");
622 goto out_unlock; 623 goto out_unlock;
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index fa575d1676b9..389b3ef77e20 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -182,129 +182,6 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
182} 182}
183 183
184/** 184/**
185 * find_good_lh - find a good log header
186 * @jd: the journal
187 * @blk: the segment to start searching from
188 * @lh: the log header to fill in
189 * @forward: if true search forward in the log, else search backward
190 *
191 * Call get_log_header() to get a log header for a segment, but if the
192 * segment is bad, either scan forward or backward until we find a good one.
193 *
194 * Returns: errno
195 */
196
197static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
198 struct gfs2_log_header_host *head)
199{
200 unsigned int orig_blk = *blk;
201 int error;
202
203 for (;;) {
204 error = get_log_header(jd, *blk, head);
205 if (error <= 0)
206 return error;
207
208 if (++*blk == jd->jd_blocks)
209 *blk = 0;
210
211 if (*blk == orig_blk) {
212 gfs2_consist_inode(GFS2_I(jd->jd_inode));
213 return -EIO;
214 }
215 }
216}
217
218/**
219 * jhead_scan - make sure we've found the head of the log
220 * @jd: the journal
221 * @head: this is filled in with the log descriptor of the head
222 *
223 * At this point, seg and lh should be either the head of the log or just
224 * before. Scan forward until we find the head.
225 *
226 * Returns: errno
227 */
228
229static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
230{
231 unsigned int blk = head->lh_blkno;
232 struct gfs2_log_header_host lh;
233 int error;
234
235 for (;;) {
236 if (++blk == jd->jd_blocks)
237 blk = 0;
238
239 error = get_log_header(jd, blk, &lh);
240 if (error < 0)
241 return error;
242 if (error == 1)
243 continue;
244
245 if (lh.lh_sequence == head->lh_sequence) {
246 gfs2_consist_inode(GFS2_I(jd->jd_inode));
247 return -EIO;
248 }
249 if (lh.lh_sequence < head->lh_sequence)
250 break;
251
252 *head = lh;
253 }
254
255 return 0;
256}
257
258/**
259 * gfs2_find_jhead - find the head of a log
260 * @jd: the journal
261 * @head: the log descriptor for the head of the log is returned here
262 *
263 * Do a binary search of a journal and find the valid log entry with the
264 * highest sequence number. (i.e. the log head)
265 *
266 * Returns: errno
267 */
268
269int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
270{
271 struct gfs2_log_header_host lh_1, lh_m;
272 u32 blk_1, blk_2, blk_m;
273 int error;
274
275 blk_1 = 0;
276 blk_2 = jd->jd_blocks - 1;
277
278 for (;;) {
279 blk_m = (blk_1 + blk_2) / 2;
280
281 error = find_good_lh(jd, &blk_1, &lh_1);
282 if (error)
283 return error;
284
285 error = find_good_lh(jd, &blk_m, &lh_m);
286 if (error)
287 return error;
288
289 if (blk_1 == blk_m || blk_m == blk_2)
290 break;
291
292 if (lh_1.lh_sequence <= lh_m.lh_sequence)
293 blk_1 = blk_m;
294 else
295 blk_2 = blk_m;
296 }
297
298 error = jhead_scan(jd, &lh_1);
299 if (error)
300 return error;
301
302 *head = lh_1;
303
304 return error;
305}
306
307/**
308 * foreach_descriptor - go through the active part of the log 185 * foreach_descriptor - go through the active part of the log
309 * @jd: the journal 186 * @jd: the journal
310 * @start: the first log header in the active region 187 * @start: the first log header in the active region
@@ -469,7 +346,7 @@ void gfs2_recover_func(struct work_struct *work)
469 if (error) 346 if (error)
470 goto fail_gunlock_ji; 347 goto fail_gunlock_ji;
471 348
472 error = gfs2_find_jhead(jd, &head); 349 error = gfs2_find_jhead(jd, &head, true);
473 if (error) 350 if (error)
474 goto fail_gunlock_ji; 351 goto fail_gunlock_ji;
475 t_jhd = ktime_get(); 352 t_jhd = ktime_get();
diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h
index 5932d4b6f43e..1831a1974c8c 100644
--- a/fs/gfs2/recovery.h
+++ b/fs/gfs2/recovery.h
@@ -27,8 +27,6 @@ extern int gfs2_revoke_add(struct gfs2_jdesc *jd, u64 blkno, unsigned int where)
27extern int gfs2_revoke_check(struct gfs2_jdesc *jd, u64 blkno, unsigned int where); 27extern int gfs2_revoke_check(struct gfs2_jdesc *jd, u64 blkno, unsigned int where);
28extern void gfs2_revoke_clean(struct gfs2_jdesc *jd); 28extern void gfs2_revoke_clean(struct gfs2_jdesc *jd);
29 29
30extern int gfs2_find_jhead(struct gfs2_jdesc *jd,
31 struct gfs2_log_header_host *head);
32extern int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd, bool wait); 30extern int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd, bool wait);
33extern void gfs2_recover_func(struct work_struct *work); 31extern void gfs2_recover_func(struct work_struct *work);
34extern int __get_log_header(struct gfs2_sbd *sdp, 32extern int __get_log_header(struct gfs2_sbd *sdp,
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 5b148cf03293..fbf6b1fd330b 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -45,6 +45,7 @@
45#include "util.h" 45#include "util.h"
46#include "sys.h" 46#include "sys.h"
47#include "xattr.h" 47#include "xattr.h"
48#include "lops.h"
48 49
49#define args_neq(a1, a2, x) ((a1)->ar_##x != (a2)->ar_##x) 50#define args_neq(a1, a2, x) ((a1)->ar_##x != (a2)->ar_##x)
50 51
@@ -425,7 +426,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
425 426
426 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); 427 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
427 428
428 error = gfs2_find_jhead(sdp->sd_jdesc, &head); 429 error = gfs2_find_jhead(sdp->sd_jdesc, &head, false);
429 if (error) 430 if (error)
430 goto fail; 431 goto fail;
431 432
@@ -680,7 +681,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp,
680 error = gfs2_jdesc_check(jd); 681 error = gfs2_jdesc_check(jd);
681 if (error) 682 if (error)
682 break; 683 break;
683 error = gfs2_find_jhead(jd, &lh); 684 error = gfs2_find_jhead(jd, &lh, false);
684 if (error) 685 if (error)
685 break; 686 break;
686 if (!(lh.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) { 687 if (!(lh.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) {