OSDN Git Service

Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Sep 2015 19:23:51 +0000 (12:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Sep 2015 19:23:51 +0000 (12:23 -0700)
Pull GFS2 updates from Bob Peterson:
 "Here is a list of patches we've accumulated for GFS2 for the current
  upstream merge window.  This time we've only got six patches, many of
  which are very small:

   - three cleanups from Andreas Gruenbacher, including a nice cleanup
     of the sequence file code for the sbstats debugfs file.

   - a patch from Ben Hutchings that changes statistics variables from
     signed to unsigned.

   - two patches from me that increase GFS2's glock scalability by
     switching from a conventional hash table to rhashtable"

* tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: A minor "sbstats" cleanup
  gfs2: Fix a typo in a comment
  gfs2: Make statistics unsigned, suitable for use with do_div()
  GFS2: Use resizable hash table for glocks
  GFS2: Move glock superblock pointer to field gl_name
  gfs2: Simplify the seq file code for "sbstats"

1  2 
fs/gfs2/lops.c

diff --combined fs/gfs2/lops.c
@@@ -70,7 -70,7 +70,7 @@@ static bool buffer_is_rgrp(const struc
  static void maybe_release_space(struct gfs2_bufdata *bd)
  {
        struct gfs2_glock *gl = bd->bd_gl;
-       struct gfs2_sbd *sdp = gl->gl_sbd;
+       struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
        struct gfs2_rgrpd *rgd = gl->gl_object;
        unsigned int index = bd->bd_bh->b_blocknr - gl->gl_name.ln_number;
        struct gfs2_bitmap *bi = rgd->rd_bits + index;
@@@ -202,22 -202,22 +202,22 @@@ static void gfs2_end_log_write_bh(struc
   *
   */
  
 -static void gfs2_end_log_write(struct bio *bio, int error)
 +static void gfs2_end_log_write(struct bio *bio)
  {
        struct gfs2_sbd *sdp = bio->bi_private;
        struct bio_vec *bvec;
        struct page *page;
        int i;
  
 -      if (error) {
 -              sdp->sd_log_error = error;
 -              fs_err(sdp, "Error %d writing to log\n", error);
 +      if (bio->bi_error) {
 +              sdp->sd_log_error = bio->bi_error;
 +              fs_err(sdp, "Error %d writing to log\n", bio->bi_error);
        }
  
        bio_for_each_segment_all(bvec, bio, i) {
                page = bvec->bv_page;
                if (page_has_buffers(page))
 -                      gfs2_end_log_write_bh(sdp, bvec, error);
 +                      gfs2_end_log_write_bh(sdp, bvec, bio->bi_error);
                else
                        mempool_free(page, gfs2_page_pool);
        }
@@@ -261,11 -261,18 +261,11 @@@ void gfs2_log_flush_bio(struct gfs2_sb
  static struct bio *gfs2_log_alloc_bio(struct gfs2_sbd *sdp, u64 blkno)
  {
        struct super_block *sb = sdp->sd_vfs;
 -      unsigned nrvecs = bio_get_nr_vecs(sb->s_bdev);
        struct bio *bio;
  
        BUG_ON(sdp->sd_log_bio);
  
 -      while (1) {
 -              bio = bio_alloc(GFP_NOIO, nrvecs);
 -              if (likely(bio))
 -                      break;
 -              nrvecs = max(nrvecs/2, 1U);
 -      }
 -
 +      bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES);
        bio->bi_iter.bi_sector = blkno * (sb->s_blocksize >> 9);
        bio->bi_bdev = sb->s_bdev;
        bio->bi_end_io = gfs2_end_log_write;
@@@ -578,7 -585,7 +578,7 @@@ static int buf_lo_scan_elements(struct 
  static void gfs2_meta_sync(struct gfs2_glock *gl)
  {
        struct address_space *mapping = gfs2_glock2aspace(gl);
-       struct gfs2_sbd *sdp = gl->gl_sbd;
+       struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
        int error;
  
        if (mapping == NULL)
        error = filemap_fdatawait(mapping);
  
        if (error)
-               gfs2_io_error(gl->gl_sbd);
+               gfs2_io_error(gl->gl_name.ln_sbd);
  }
  
  static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)