1. 15 10月, 2011 1 次提交
    • B
      ore/exofs: Define new ore_verify_layout · 5a51c0c7
      Boaz Harrosh 提交于
      All users of the ore will need to check if current code
      supports the given layout. For example RAID5/6 is not
      currently supported.
      
      So move all the checks from exofs/super.c to a new
      ore_verify_layout() to be used by ore users.
      
      Note that any new layout should be passed through the
      ore_verify_layout() because the ore engine will prepare
      and verify some internal members of ore_layout, and
      assumes it's called.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      5a51c0c7
  2. 04 10月, 2011 1 次提交
    • B
      ore/exofs: Change the type of the devices array (API change) · d866d875
      Boaz Harrosh 提交于
      In the pNFS obj-LD the device table at the layout level needs
      to point to a device_cache node, where it is possible and likely
      that many layouts will point to the same device-nodes.
      
      In Exofs we have a more orderly structure where we have a single
      array of devices that repeats twice for a round-robin view of the
      device table
      
      This patch moves to a model that can be used by the pNFS obj-LD
      where struct ore_components holds an array of ore_dev-pointers.
      (ore_dev is newly defined and contains a struct osd_dev *od
       member)
      
      Each pointer in the array of pointers will point to a bigger
      user-defined dev_struct. That can be accessed by use of the
      container_of macro.
      
      In Exofs an __alloc_dev_table() function allocates the
      ore_dev-pointers array as well as an exofs_dev array, in one
      allocation and does the addresses dance to set everything pointing
      correctly. It still keeps the double allocation trick for the
      inodes round-robin view of the table.
      
      The device table is always allocated dynamically, also for the
      single device case. So it is unconditionally freed at umount.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      d866d875
  3. 03 10月, 2011 3 次提交
  4. 07 8月, 2011 3 次提交
    • B
      exofs: Rename raid engine from exofs/ios.c => ore · 8ff660ab
      Boaz Harrosh 提交于
      ORE stands for "Objects Raid Engine"
      
      This patch is a mechanical rename of everything that was in ios.c
      and its API declaration to an ore.c and an osd_ore.h header. The ore
      engine will later be used by the pnfs objects layout driver.
      
      * File ios.c => ore.c
      
      * Declaration of types and API are moved from exofs.h to a new
        osd_ore.h
      
      * All used types are prefixed by ore_ from their exofs_ name.
      
      * Shift includes from exofs.h to osd_ore.h so osd_ore.h is
        independent, include it from exofs.h.
      
      Other than a pure rename there are no other changes. Next patch
      will move the ore into it's own module and will export the API
      to be used by exofs and later the layout driver
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      8ff660ab
    • B
      exofs: ios: Move to a per inode components & device-table · 9e9db456
      Boaz Harrosh 提交于
      Exofs raid engine was saving on memory space by having a single layout-info,
      single pid, and a single device-table, global to the filesystem. Then passing
      a credential and object_id info at the io_state level, private for each
      inode. It would also devise this contraption of rotating the device table
      view for each inode->ino to spread out the device usage.
      
      This is not compatible with the pnfs-objects standard, demanding that
      each inode can have it's own layout-info, device-table, and each object
      component it's own pid, oid and creds.
      
      So: Bring exofs raid engine to be usable for generic pnfs-objects use by:
      
      * Define an exofs_comp structure that holds obj_id and credential info.
      
      * Break up exofs_layout struct to an exofs_components structure that holds a
        possible array of exofs_comp and the array of devices + the size of the
        arrays.
      
      * Add a "comps" parameter to get_io_state() that specifies the ids creds
        and device array to use for each IO.
      
        This enables to keep the layout global, but the device-table view, creds
        and IDs at the inode level. It only adds two 64bit to each inode, since
        some of these members already existed in another form.
      
      * ios raid engine now access layout-info and comps-info through the passed
        pointers. Everything is pre-prepared by caller for generic access of
        these structures and arrays.
      
      At the exofs Level:
      
      * Super block holds an exofs_components struct that holds the device
        array, previously in layout. The devices there are in device-table
        order. The device-array is twice bigger and repeats the device-table
        twice so now each inode's device array can point to a random device
        and have a round-robin view of the table, making it compatible to
        previous exofs versions.
      
      * Each inode has an exofs_components struct that is initialized at
        load time, with it's own view of the device table IDs and creds.
        When doing IO this gets passed to the io_state together with the
        layout.
      
      While preforming this change. Bugs where found where credentials with the
      wrong IDs where used to access the different SB objects (super.c). As well
      as some dead code. It was never noticed because the target we use does not
      check the credentials.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      9e9db456
    • B
      exofs: Move exofs specific osd operations out of ios.c · 85e44df4
      Boaz Harrosh 提交于
      ios.c will be moving to an external library, for use by the
      objects-layout-driver. Remove from it some exofs specific functions.
      
      Also g_attr_logical_length is used both by inode.c and ios.c
      move definition to the later, to keep it independent
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      85e44df4
  5. 05 8月, 2011 2 次提交
    • B
      exofs: Small cleanup of exofs_fill_super · 9ce73047
      Boaz Harrosh 提交于
      Small cleanup that unifies duplicated code used in both the
      error and success cases
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      9ce73047
    • B
      exofs: BUG: Avoid sbi realloc · 6d4073e8
      Boaz Harrosh 提交于
      Since the beginning we realloced the sbi structure when a bigger
      then one device table was specified. (I know that was really stupid).
      
      Then much later when "register bdi" was added (By Jens) it was
      registering the pointer to sbi->bdi before the realloc.
      
      We never saw this problem because up till now the realloc did not
      do anything since the device table was small enough to fit in the
      original allocation. But once we starting testing with large device
      tables (Bigger then 28) we noticed the crash of writeback operating
      on a deallocated pointer.
      
      * Avoid the all mess by allocating the device-table as a second array
        and get rid of the variable-sized structure and the rest of this
        mess.
      * Take the chance to clean near by structures and comments.
      * Add a needed dprint on startup to indicate the loaded layout.
      * Also move the bdi registration to the very end because it will
        only fail in a low memory, which will probably fail before hand.
        There are many more likely causes to not load before that. This
        way the error handling is made simpler. (Just doing this would be
        enough to fix the BUG)
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      6d4073e8
  6. 18 7月, 2011 1 次提交
  7. 15 3月, 2011 5 次提交
    • B
      exofs: deprecate the commands pending counter · a49fb4c3
      Boaz Harrosh 提交于
      One leftover from the days of IBM's original code, is an SB counter
      that counts in-flight asynchronous commands. And a piece of code that
      waits for the counter to reach zero at unmount. I guess it might have
      been needed then, cause of some reference missing or something.
      
      I'm not removing it yet but am putting a warning message if ever this
      counter triggers at unmount. If I'll never see it triggers or reported
      I'll remove the counter for good.
      (I had this print as a debug output for a long time and never had it
       trigger)
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      a49fb4c3
    • B
      exofs: Write sbi->s_nextid as part of the Create command · 1cea312a
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      1cea312a
    • B
      exofs: Add option to mount by osdname · 9ed96484
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      9ed96484
    • B
      exofs: Override read-ahead to align on stripe_size · 66cd6cad
      bharrosh@panasas.com 提交于
      * 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: NBoaz Harrosh <bharrosh@panasas.com>
      66cd6cad
    • T
      exofs: Remove redundant unlikely() · 2c722c9a
      Tobias Klauser 提交于
      IS_ERR() already implies unlikely(), so it can be omitted here.
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      2c722c9a
  8. 07 1月, 2011 1 次提交
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  9. 29 10月, 2010 1 次提交
  10. 10 8月, 2010 1 次提交
  11. 04 8月, 2010 1 次提交
  12. 22 4月, 2010 1 次提交
  13. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  14. 28 2月, 2010 3 次提交
    • B
      exofs: groups support · 50a76fd3
      Boaz Harrosh 提交于
      * _calc_stripe_info() changes to accommodate for grouping
        calculations. Returns additional information
      
      * old _prepare_pages() becomes _prepare_one_group()
        which stores pages belonging to one device group.
      
      * New _prepare_for_striping iterates on all groups calling
        _prepare_one_group().
      
      * Enable mounting of groups data_maps (group_width != 0)
      
      [QUESTION]
      what is faster A or B;
      A.	x += stride;
      	x = x % width + first_x;
      
      B	x += stride
      	if (x < last_x)
      		x = first_x;
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      50a76fd3
    • B
      exofs: RAID0 support · 5d952b83
      Boaz Harrosh 提交于
      We now support striping over mirror devices. Including variable sized
      stripe_unit.
      
      Some limits:
      * stripe_unit must be a multiple of PAGE_SIZE
      * stripe_unit * stripe_count is maximum upto 32-bit (4Gb)
      
      Tested RAID0 over mirrors, RAID0 only, mirrors only. All check.
      
      Design notes:
      * I'm not using a vectored raid-engine mechanism yet. Following the
        pnfs-objects-layout data-map structure, "Mirror" is just a private
        case of "group_width" == 1, and RAID0 is a private case of
        "Mirrors" == 1. The performance lose of the general case over the
        particular special case optimization is totally negligible, also
        considering the extra code size.
      
      * In general I added a prepare_stripes() stage that divides the
        to-be-io pages to the participating devices, the previous
        exofs_ios_write/read, now becomes _write/read_mirrors and a new
        write/read upper layer loops on all devices calling
        _write/read_mirrors. Effectively the prepare_stripes stage is the all
        secret.
        Also truncate need fixing to accommodate for striping.
      
      * In a RAID0 arrangement, in a regular usage scenario, if all inode
        layouts will start at the same device, the small files fill up the
        first device and the later devices stay empty, the farther the device
        the emptier it is.
      
        To fix that, each inode will start at a different stripe_unit,
        according to it's obj_id modulus number-of-stripe-units. And
        will then span all stripe-units in the same incrementing order
        wrapping back to the beginning of the device table. We call it
        a stripe-units moving window.
      
        Special consideration was taken to keep all devices in a mirror
        arrangement identical. So a broken osd-device could just be cloned
        from one of the mirrors and no FS scrubbing is needed. (We do that
        by rotating stripe-unit at a time and not a single device at a time.)
      
      TODO:
       We no longer verify object_length == inode->i_size in exofs_iget.
       (since i_size is stripped on multiple objects now).
       I should introduce a multiple-device attribute reading, and use
       it in exofs_iget.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      5d952b83
    • B
      exofs: Move layout related members to a layout structure · 45d3abcb
      Boaz Harrosh 提交于
      * Abstract away those members in exofs_sb_info that are related/needed
        by a layout into a new exofs_layout structure. Embed it in exofs_sb_info.
      
      * At exofs_io_state receive/keep a pointer to an exofs_layout. No need for
        an exofs_sb_info pointer, all we need is at exofs_layout.
      
      * Change any usage of above exofs_sb_info members to their new name.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      45d3abcb
  15. 10 12月, 2009 4 次提交
    • B
      exofs: Multi-device mirror support · 04dc1e88
      Boaz Harrosh 提交于
      This patch changes on-disk format, it is accompanied with a parallel
      patch to mkfs.exofs that enables multi-device capabilities.
      
      After this patch, old exofs will refuse to mount a new formatted FS and
      new exofs will refuse an old format. This is done by moving the magic
      field offset inside the FSCB. A new FSCB *version* field was added. In
      the future, exofs will refuse to mount unmatched FSCB version. To
      up-grade or down-grade an exofs one must use mkfs.exofs --upgrade option
      before mounting.
      
      Introduced, a new object that contains a *device-table*. This object
      contains the default *data-map* and a linear array of devices
      information, which identifies the devices used in the filesystem. This
      object is only written to offline by mkfs.exofs. This is why it is kept
      separate from the FSCB, since the later is written to while mounted.
      
      Same partition number, same object number is used on all devices only
      the device varies.
      
      * define the new format, then load the device table on mount time make
        sure every thing is supported.
      
      * Change I/O engine to now support Mirror IO, .i.e write same data
        to multiple devices, read from a random device to spread the
        read-load from multiple clients (TODO: stripe read)
      
      Implementation notes:
       A few points introduced in previous patch should be mentioned here:
      
      * Special care was made so absolutlly all operation that have any chance
        of failing are done before any osd-request is executed. This is to
        minimize the need for a data consistency recovery, to only real IO
        errors.
      
      * Each IO state has a kref. It starts at 1, any osd-request executed
        will increment the kref, finally when all are executed the first ref
        is dropped. At IO-done, each request completion decrements the kref,
        the last one to return executes the internal _last_io() routine.
        _last_io() will call the registered io_state_done. On sync mode a
        caller does not supply a done method, indicating a synchronous
        request, the caller is put to sleep and a special io_state_done is
        registered that will awaken the caller. Though also in sync mode all
        operations are executed in parallel.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      04dc1e88
    • B
      exofs: Move all operations to an io_engine · 06886a5a
      Boaz Harrosh 提交于
      In anticipation for multi-device operations, we separate osd operations
      into an abstract I/O API. Currently only one device is used but later
      when adding more devices, we will drive all devices in parallel according
      to a "data_map" that describes how data is arranged on multiple devices.
      The file system level operates, like before, as if there is one object
      (inode-number) and an i_size. The io engine will split this to the same
      object-number but on multiple device.
      
      At first we introduce Mirror (raid 1) layout. But at the final outcome
      we intend to fully implement the pNFS-Objects data-map, including
      raid 0,4,5,6 over mirrored devices, over multiple device-groups. And
      more. See: http://tools.ietf.org/html/draft-ietf-nfsv4-pnfs-obj-12
      
      * Define an io_state based API for accessing osd storage devices
        in an abstract way.
        Usage:
      	First a caller allocates an io state with:
      		exofs_get_io_state(struct exofs_sb_info *sbi,
      				   struct exofs_io_state** ios);
      
      	Then calles one of:
      		exofs_sbi_create(struct exofs_io_state *ios);
      		exofs_sbi_remove(struct exofs_io_state *ios);
      		exofs_sbi_write(struct exofs_io_state *ios);
      		exofs_sbi_read(struct exofs_io_state *ios);
      		exofs_oi_truncate(struct exofs_i_info *oi, u64 new_len);
      
      	And when done
      		exofs_put_io_state(struct exofs_io_state *ios);
      
      * Convert all source files to use this new API
      * Convert from bio_alloc to bio_kmalloc
      * In io engine we make use of the now fixed osd_req_decode_sense
      
      There are no functional changes or on disk additions after this patch.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      06886a5a
    • B
      exofs: statfs blocks is sectors not FS blocks · cae012d8
      Boaz Harrosh 提交于
      Even though exofs has a 4k block size, statfs blocks
      is in sectors (512 bytes).
      
      Also if target returns 0 for capacity then make it
      ULLONG_MAX. df does not like zero-size filesystems
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      cae012d8
    • B
      exofs: Prints on mount and unmout · 19fe294f
      Boaz Harrosh 提交于
      It is important to print in the logs when a filesystem was
      mounted and eventually unmounted.
      
      Print the osd-device's osd_name and pid the FS was
      mounted/unmounted on.
      
      TODO: How to also print the namespace path the filesystem was
            mounted on?
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      19fe294f
  16. 24 9月, 2009 1 次提交
    • B
      exofs: remove BKL from super operations · 1ba50bbe
      Boaz Harrosh 提交于
      the two places inside exofs that where taking the BKL were:
      exofs_put_super() - .put_super
      and
      exofs_sync_fs() - which is .sync_fs and is also called from
                        .write_super.
      
      Now exofs_sync_fs() is protected from itself by also taking
      the sb_lock.
      
      exofs_put_super() directly calls exofs_sync_fs() so there is no
      danger between these two either.
      
      In anyway there is absolutely nothing dangerous been done
      inside exofs_sync_fs().
      
      Unless there is some subtle race with the actual lifetime of
      the super_block in regard to .put_super and some other parts
      of the VFS. Which is highly unlikely.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1ba50bbe
  17. 13 7月, 2009 1 次提交
  18. 21 6月, 2009 2 次提交
    • B
      exofs: Avoid using file_fsync() · baaf94cd
      Boaz Harrosh 提交于
      The use of file_fsync() in exofs_file_sync() is not necessary since it
      does some extra stuff not used by exofs. Open code just the parts that
      are currently needed.
      
      TODO: Farther optimization can be done to sync the sb only on inode
      update of new files, Usually the sb update is not needed in exofs.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      baaf94cd
    • B
      exofs: Remove IBM copyrights · 27d2e149
      Boaz Harrosh 提交于
      Boaz,
      Congrats on getting all the OSD stuff into 2.6.30!
      I just pulled the git, and saw that the IBM copyrights are still there.
      Please remove them from all files:
       * Copyright (C) 2005, 2006
       * International Business Machines
      
      IBM has revoked all rights on the code - they gave it to me.
      
      Thanks!
      Avishay
      Signed-off-by: NAvishay Traeger <avishay@gmail.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      27d2e149
  19. 12 6月, 2009 4 次提交
    • C
      exofs: add ->sync_fs · 80e09fb9
      Christoph Hellwig 提交于
      Add a ->sync_fs method for data integrity syncs, and reimplement
      ->write_super ontop of it.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      80e09fb9
    • C
      ->write_super lock_super pushdown · ebc1ac16
      Christoph Hellwig 提交于
      Push down lock_super into ->write_super instances and remove it from the
      caller.
      
      Following filesystem don't need ->s_lock in ->write_super and are skipped:
      
       * bfs, nilfs2 - no other uses of s_lock and have internal locks in
      	->write_super
       * ext2 - uses BKL in ext2_write_super and has internal calls without s_lock
       * reiserfs - no other uses of s_lock as has reiserfs_write_lock (BKL) in
       	->write_super
       * xfs - no other uses of s_lock and uses internal lock (buffer lock on
      	superblock buffer) to serialize ->write_super.  Also xfs_fs_write_super
      	is superflous and will go away in the next merge window
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ebc1ac16
    • C
      push BKL down into ->put_super · 6cfd0148
      Christoph Hellwig 提交于
      Move BKL into ->put_super from the only caller.  A couple of
      filesystems had trivial enough ->put_super (only kfree and NULLing of
      s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
      hugetlbfs, omfs, qnx4, shmem, all others got the full treatment.  Most
      of them probably don't need it, but I'd rather sort that out individually.
      Preferably after all the other BKL pushdowns in that area.
      
      [AV: original used to move lock_super() down as well; these changes are
      removed since we don't do lock_super() at all in generic_shutdown_super()
      now]
      [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6cfd0148
    • C
      remove ->write_super call in generic_shutdown_super · 8c85e125
      Christoph Hellwig 提交于
      We just did a full fs writeout using sync_filesystem before, and if
      that's not enough for the filesystem it can perform it's own writeout
      in ->put_super, which many filesystems already do.
      
      Move a call to foofs_write_super into every foofs_put_super for now to
      guarantee identical behaviour until it's cleaned up by the individual
      filesystem maintainers.
      
      Exceptions:
      
       - affs already has identical copy & pasted code at the beginning of
         affs_put_super so no need to do it twice.
       - xfs does the right thing without it and I have changes pending for
         the xfs tree touching this are so I don't really need conflicts
         here..
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8c85e125
  20. 01 4月, 2009 2 次提交
    • B
      exofs: export_operations · 8cf74b39
      Boaz Harrosh 提交于
      implement export_operations and set in superblock.
      It is now posible to export exofs via nfs
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      8cf74b39
    • B
      exofs: super_operations and file_system_type · ba9e5e98
      Boaz Harrosh 提交于
      This patch ties all operation vectors into a file system superblock
      and registers the exofs file_system_type at module's load time.
      
      * The file system control block (AKA on-disk superblock) resides in
        an object with a special ID (defined in common.h).
        Information included in the file system control block is used to
        fill the in-memory superblock structure at mount time. This object
        is created before the file system is used by mkexofs.c It contains
        information such as:
      	- The file system's magic number
      	- The next inode number to be allocated
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      ba9e5e98