1. 05 Jun, 2019 1 commit
  2. 07 May, 2019 1 commit
    • Bob Peterson's avatar
      gfs2: clean_journal improperly set sd_log_flush_head · 7c70b896
      Bob Peterson authored
      This patch fixes regressions in 588bff95.
      Due to that patch, function clean_journal was setting the value of
      sd_log_flush_head, but that's only valid if it is replaying the node's
      own journal. If it's replaying another node's journal, that's completely
      wrong and will lead to multiple problems. This patch tries to clean up
      the mess by passing the value of the logical journal block number into
      gfs2_write_log_header so the function can treat non-owned journals
      generically. For the local journal, the journal extent map is used for
      best performance. For other nodes from other journals, new function
      gfs2_lblk_to_dblk is called to figure it out using gfs2_iomap_get.
      
      This patch also tries to establish more consistency when passing journal
      block parameters by changing several unsigned int types to a consistent
      u32.
      
      Fixes: 588bff95 ("GFS2: Reduce code redundancy writing log headers")
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      7c70b896
  3. 04 Jun, 2018 1 commit
    • Andreas Gruenbacher's avatar
      gfs2: Iomap cleanups and improvements · 628e366d
      Andreas Gruenbacher authored
      Clean up gfs2_iomap_alloc and gfs2_iomap_get.  Document how
      gfs2_iomap_alloc works: it now needs to be called separately after
      gfs2_iomap_get where necessary; this will be used later by iomap write.
      Move gfs2_iomap_ops into bmap.c.
      
      Introduce a new gfs2_iomap_get_alloc helper and use it in
      fallocate_chunk: gfs2_iomap_begin will become unsuitable for fallocate
      with proper iomap write support.
      
      In gfs2_block_map and fallocate_chunk, zero-initialize struct iomap.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      628e366d
  4. 18 Jan, 2018 1 commit
  5. 31 Oct, 2017 1 commit
  6. 03 Mar, 2014 1 commit
    • Steven Whitehouse's avatar
      GFS2: Clean up journal extent mapping · b50f227b
      Steven Whitehouse authored
      This patch fixes a long standing issue in mapping the journal
      extents. Most journals will consist of only a single extent,
      and although the cache took account of that by merging extents,
      it did not actually map large extents, but instead was doing a
      block by block mapping. Since the journal was only being mapped
      on mount, this was not normally noticeable.
      
      With the updated code, it is now possible to use the same extent
      mapping system during journal recovery (which will be added in a
      later patch). This will allow checking of the integrity of the
      journal before any reply of the journal content is attempted. For
      this reason the code is moving to bmap.c, since it will be used
      more widely in due course.
      
      An exercise left for the reader is to compare the new function
      gfs2_map_journal_extents() with gfs2_write_alloc_required()
      
      Additionally, should there be a failure, the error reporting is
      also updated to show more detail about what went wrong.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b50f227b
  7. 20 Sep, 2010 1 commit
    • Steven Whitehouse's avatar
      GFS2: New truncate sequence · ff8f33c8
      Steven Whitehouse authored
      This updates GFS2's truncate code to use the new truncate
      sequence correctly. This is a stepping stone to being
      able to remove ip->i_disksize in favour of using i_size
      everywhere now that the two sizes are always identical.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      ff8f33c8
  8. 29 Jul, 2010 1 commit
  9. 05 Jan, 2009 1 commit
  10. 25 Jan, 2008 1 commit
  11. 20 Oct, 2006 1 commit
  12. 18 Sep, 2006 1 commit
    • Steven Whitehouse's avatar
      [GFS2] Map multiple blocks at once where possible · 7a6bbacb
      Steven Whitehouse authored
      This is a tidy up of the GFS2 bmap code. The main change is that the
      bh is passed to gfs2_block_map allowing the flags to be set directly
      rather than having to repeat that code several times in ops_address.c.
      
      At the same time, the extent mapping code from gfs2_extent_map has
      been moved into gfs2_block_map. This allows all calls to gfs2_block_map
      to map extents in the case that no allocation is taking place. As a
      result reads and non-allocating writes should be faster. A quick test
      with postmark appears to support this.
      
      There is a limit on the number of blocks mapped in a single bmap
      call in that it will only ever map blocks which are pointed to
      from a single pointer block. So in other words, it will never try
      to do additional i/o in order to satisfy read-ahead. The maximum
      number of blocks is thus somewhat less than 512 (the GFS2 4k block
      size minus the header divided by sizeof(u64)). I've further limited
      the mapping of "normal" blocks to 32 blocks (to avoid extra work)
      since readpages() will currently read a maximum of 32 blocks ahead (128k).
      
      Some further work will probably be needed to set a suitable value
      for DIO as well, but for now thats left at the maximum 512 (see
      ops_address.c:gfs2_get_block_direct).
      
      There is probably a lot more that can be done to improve bmap for GFS2,
      but this is a good first step.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      7a6bbacb
  13. 05 Sep, 2006 1 commit
  14. 04 Sep, 2006 1 commit
  15. 01 Sep, 2006 1 commit
    • Steven Whitehouse's avatar
      [GFS2] Update copyright, tidy up incore.h · e9fc2aa0
      Steven Whitehouse authored
      As per comments from Jan Engelhardt <jengelh@linux01.gwdg.de> this
      updates the copyright message to say "version" in full rather than
      "v.2". Also incore.h has been updated to remove forward structure
      declarations which are not required.
      
      The gfs2_quota_lvb structure has now had endianess annotations added
      to it. Also quota.c has been updated so that we now store the
      lvb data locally in endian independant format to avoid needing
      a structure in host endianess too. As a result the endianess
      conversions are done as required at various points and thus the
      conversion routines in lvb.[ch] are no longer required. I've
      moved the one remaining constant in lvb.h thats used into lm.h
      and removed the unused lvb.[ch].
      
      I have not changed the HIF_ constants. That is left to a later patch
      which I hope will unify the gh_flags and gh_iflags fields of the
      struct gfs2_holder.
      
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      e9fc2aa0
  16. 26 Jul, 2006 1 commit
  17. 18 May, 2006 1 commit
  18. 05 May, 2006 1 commit
    • Steven Whitehouse's avatar
      [GFS2] Readpages support · fd88de56
      Steven Whitehouse authored
      This adds readpages support (and also corrects a small bug in
      the readpage error path at the same time). Hopefully this will
      improve performance by allowing GFS to submit larger lumps of
      I/O at a time.
      
      In order to simplify the setting of BH_Boundary, it currently gets
      set when we hit the end of a indirect pointer block. There is
      always a boundary at this point with the current allocation code.
      It doesn't get all the boundaries right though, so there is still
      room for improvement in this.
      
      See comments in fs/gfs2/ops_address.c for further information about
      readpages with GFS2.
      
      Signed-off-by: Steven Whitehouse
      fd88de56
  19. 28 Apr, 2006 1 commit
  20. 30 Jan, 2006 1 commit
  21. 24 Jan, 2006 1 commit
  22. 18 Jan, 2006 1 commit
  23. 16 Jan, 2006 1 commit