1. 15 Mar, 2011 8 commits
    • Boaz Harrosh's avatar
      exofs: Write sbi->s_nextid as part of the Create command · 1cea312a
      Boaz Harrosh authored
      Before when creating a new inode, we'd set the sb->s_dirt flag,
      and sometime later the system would write out s_nextid as part
      of the sb_info. Also on inode sync we would force the sb sync
      as well.
      
      Define the s_nextid as a new partition attribute and set it
      every time we create a new object.
      At mount we read it from it's new place.
      
      We now never set sb->s_dirt anywhere in exofs. write_super
      is actually never called. The call to exofs_write_super from
      exofs_put_super is also removed because the VFS always calls
      ->sync_fs before calling ->put_super twice.
      
      To stay backward-and-forward compatible we also write the old
      s_nextid in the super_block object at unmount, and support zero
      length attribute on mount.
      
      This also fixes a BUG where in layouts when group_width was not
      a divisor of EXOFS_SUPER_ID (0x10000) the s_nextid was not read
      from the device it was written to. Because of the sliding window
      layout trick, and because the read was always done from the 0
      device but the write was done via the raid engine that might slide
      the device view. Now we read and write through the raid engine.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      1cea312a
    • Boaz Harrosh's avatar
      exofs: Add option to mount by osdname · 9ed96484
      Boaz Harrosh authored
      If /dev/osd* devices are shuffled because more devices
      where added, and/or login order has changed. It is hard to
      mount the FS you want.
      
      Add an option to mount by osdname. osdname is any osd-device's
      osdname as specified to the mkfs.exofs command when formatting
      the osd-devices.
      The new mount format is:
      	OPT="osdname=$UUID0,pid=$PID,_netdev"
      	mount -t exofs -o $OPT $DEV_OSD0 $MOUNTDIR
      
      if "osdname=" is specified in options above $DEV_OSD0 is
      ignored and can be empty.
      
      Also while at it: Removed some old unused Opt_* enums.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      9ed96484
    • bharrosh@panasas.com's avatar
      exofs: Override read-ahead to align on stripe_size · 66cd6cad
      bharrosh@panasas.com authored
      * Set all inode->i_mapping->backing_dev_info to point to
        the per super-block sb->s_bdi.
      
      * Calculating a read_ahead that is:
        - preferable 2 stripes long
          (Future patch will add a mount option to override this)
        - Minimum 128K aligned up to stripe-size
        - Caped to maximum-IO-sizes round down to stripe_size.
          (Max sizes are governed by max bio-size that fits in a page
           times number-of-devices)
      
      CC: Marc Dionne <marc.c.dionne@gmail.com>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      66cd6cad
    • Nick Piggin's avatar
      exofs: simple fsync race fix · 97178b7b
      Nick Piggin authored
      It is incorrect to test inode dirty bits without participating in the inode
      writeback protocol. Inode writeback sets I_SYNC and clears I_DIRTY_?, then
      writes out the particular bits, then clears I_SYNC when it is done. BTW. it
      may not completely write all pages out, so I_DIRTY_PAGES would get set
      again.
      
      This is a standard pattern used throughout the kernel's writeback caches
      (I_SYNC ~= I_WRITEBACK, if that makes it clearer).
      
      And so it is not possible to determine an inode's dirty status just by
      checking I_DIRTY bits. Especially not for the purpose of data integrity
      syncs.
      
      Missing the check for these bits means that fsync can complete while
      writeback to the inode is underway. Inode writeback functions get this
      right, so call into them rather than try to shortcut things by testing
      dirty state improperly.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      97178b7b
    • Boaz Harrosh's avatar
      exofs: Optimize read_4_write · a8f1418f
      Boaz Harrosh authored
      Don't attempt a read passed i_size, just zero the page and be
      done with it.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      a8f1418f
    • Boaz Harrosh's avatar
      exofs: Trivial: fix some indentation and debug prints · 0a935519
      Boaz Harrosh authored
      I stumbled on some of these prints in log files so, might
      just submit the fixes.
      
      * All i_ino prints in exofs should be hex
      * All OSD_ERR prints should end with a "\n"
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      0a935519
    • Tobias Klauser's avatar
      exofs: Remove redundant unlikely() · 2c722c9a
      Tobias Klauser authored
      IS_ERR() already implies unlikely(), so it can be omitted here.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      2c722c9a
    • Linus Torvalds's avatar
      Linux 2.6.38 · 521cb40b
      Linus Torvalds authored
      521cb40b
  2. 14 Mar, 2011 32 commits