1. 12 May, 2016 1 commit
  2. 26 Apr, 2016 1 commit
  3. 23 Mar, 2016 1 commit
  4. 20 Mar, 2016 1 commit
  5. 01 Nov, 2015 2 commits
  6. 13 Aug, 2015 1 commit
  7. 08 Feb, 2014 1 commit
  8. 24 Aug, 2013 1 commit
  9. 10 Apr, 2013 1 commit
  10. 08 Apr, 2013 1 commit
  11. 25 Mar, 2013 1 commit
    • Brian Behlendorf's avatar
      Provide ${kmodname}-devel-kmod for yum-builddep · 0df23ca9
      Brian Behlendorf authored
      In order to ensure that yum-builddep pulls in all the build
      requirements a generic ${kmodname}-devel-kmod provides line is
      added.  This allows a version of the development headers to be
      included without requiring knowledge of the kernel version.
      
      This is important because unlike rpmbuild which does correctly
      expand the source rpm spec file, yum-builddep does not.  Without
      this generic provides line mock which relies on yum-builddep is
      unable to automatically satisfy the dependency.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      0df23ca9
  12. 21 Mar, 2013 2 commits
  13. 18 Mar, 2013 1 commit
    • Brian Behlendorf's avatar
      Refresh RPM packaging · f3757573
      Brian Behlendorf authored
      Refresh the existing RPM packaging to conform to the 'Fedora
      Packaging Guidelines'.  This includes adopting the kmods2
      packaging standard which is used fod kmods distributed by
      rpmfusion for Fedora/RHEL.
      
        http://fedoraproject.org/wiki/Packaging:Guidelines
        http://rpmfusion.org/Packaging/KernelModules/Kmods2
      
      While the spec files have been entirely rewritten from a
      user perspective the only major changes are:
      
      * The Fedora packages now have a build dependency on the
        rpmfusion repositories.  The generic kmod packages also
        have a new dependency on kmodtool-1.22 but it is bundled
        with the source rpm so no additional packages are needed.
      
      * The kernel binary module packages have been renamed from
        zfs-modules-* to kmod-zfs-* as specificed by kmods2.
      
      * The is now a common kmod-zfs-devel-* package in addition
        to the per-kernel devel packages.  The common package
        contains the development headers while the per-kernel
        package contains kernel specific build products.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #1341
      f3757573
  14. 06 Mar, 2013 1 commit
  15. 05 Mar, 2013 1 commit
    • Eric Dillmann's avatar
      Add snapdev=[hidden|visible] dataset property · 0b4d1b58
      Eric Dillmann authored
      The new snapdev dataset property may be set to control the
      visibility of zvol snapshot devices.  By default this value
      is set to 'hidden' which will prevent zvol snapshots from
      appearing under /dev/zvol/ and /dev/<dataset>/.  When set to
      'visible' all zvol snapshots for the dataset will be visible.
      
      This functionality was largely added because when automatic
      snapshoting is enabled large numbers of read-only zvol snapshots
      will be created.  When creating these devices the kernel will
      attempt to read their partition tables, and blkid will attempt
      to identify any filesystems on those partitions.  This leads
      to a variety of issues:
      
      1) The zvol partition tables will be read in the context of
         the `modprobe zfs` for automatically imported pools.  This
         is undesirable and should be done asynchronously, but for
         now reducing the number of visible devices helps.
      
      2) Udev expects to be able to complete its work for a new
         block devices fairly quickly.  When many zvol devices are
         added at the same time this is no longer be true.  It can
         lead to udev timeouts and missing /dev/zvol links.
      
      3) Simply having lots of devices in /dev/ can be aukward from
         a management standpoint.  Hidding the devices your unlikely
         to ever use helps with this.  Any snapshot device which is
         needed can be made visible by changing the snapdev property.
      
      NOTE: This patch changes the default behavior for zvols which
            was effectively 'snapdev=visible'.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #1235
      Closes #945
      Issue #956
      Issue #756
      0b4d1b58
  16. 29 Jan, 2013 1 commit
    • Brian Behlendorf's avatar
      Retire zpool_id infrastructure · dbf763b3
      Brian Behlendorf authored
      In the interest of maintaining only one udev helper to give vdevs
      user friendly names, the zpool_id and zpool_layout infrastructure
      is being retired.  They are superseded by vdev_id which incorporates
      all the previous functionality.
      
      Documentation for the new vdev_id(8) helper and its configuration
      file, vdev_id.conf(5), can be found in their respective man pages.
      Several useful example files are installed under /etc/zfs/.
      
        /etc/zfs/vdev_id.conf.alias.example
        /etc/zfs/vdev_id.conf.multipath.example
        /etc/zfs/vdev_id.conf.sas_direct.example
        /etc/zfs/vdev_id.conf.sas_switch.example
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #981
      dbf763b3
  17. 28 Jan, 2013 2 commits
    • Brian Behlendorf's avatar
      Quiet mkfs.ext2 output · ff5b1c80
      Brian Behlendorf authored
      The -q option should quiet the mkfs.ext2 output but certain
      versions of e2fsprogs appear to ignore it.  This can result in
      an extra 'done' message in the test output.  To keep this noise
      from distracting just direct stdout to /dev/null.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      ff5b1c80
    • Brian Behlendorf's avatar
      Stop using /bin/ as a source in zconfig.sh · 930b6fec
      Brian Behlendorf authored
      Test 5, 6, 7, and 7 in zconfig.sh use /bin/ as a source of random
      directories and files for their test.  This has lead to unexpected
      tests failures because the total size of /bin/ on the test system
      isn't checked and it is entirely possible for it to be larger than
      the target filesystem.
      
      To resolve this issue we create a somewhat random collection of
      files and directories in /var/tmp to use.  On average we expect
      about 5MB of data with the worst case being 20MB.  This is large
      enough to be interesting and small enough to always fit in the
      default test datasets.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #1113
      930b6fec
  18. 24 Jan, 2013 2 commits
  19. 03 Dec, 2012 1 commit
  20. 15 Oct, 2012 1 commit
  21. 03 Oct, 2012 1 commit
    • Etienne Dechamps's avatar
      Force 4K blocksize when testing ext2 on zvol. · 2f342404
      Etienne Dechamps authored
      Currently, mkfs.ext2 on zconfig.sh zvols tries to use a 8K blocksize,
      probably because by default zvol exposes an optimal I/O size of 8K.
      
      Unfortunately, a ext2 blocksize of 8K is not supported by the kernel,
      so the resulting filesystem is unmountable.
      
      This patch fixes the issue by making sure the blocksize is 4K. We have
      to use -F to force it else mkfs.ext2 won't allow us to use a blocksize
      smaller than the optimal I/O size.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #979
      2f342404
  22. 27 Aug, 2012 1 commit
  23. 07 Aug, 2012 1 commit
    • Etienne Dechamps's avatar
      Set zvol discard_granularity to the volblocksize. · ee5fd0bb
      Etienne Dechamps authored
      Currently, zvols have a discard granularity set to 0, which suggests to
      the upper layer that discard requests of arbirarily small size and
      alignment can be made efficiently.
      
      In practice however, ZFS does not handle unaligned discard requests
      efficiently: indeed, it is unable to free a part of a block. It will
      write zeros to the specified range instead, which is both useless and
      inefficient (see dnode_free_range).
      
      With this patch, zvol block devices expose volblocksize as their discard
      granularity, so the upper layer is aware that it's not supposed to send
      discard requests smaller than volblocksize.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #862
      ee5fd0bb
  24. 23 Jul, 2012 3 commits
  25. 17 Jul, 2012 1 commit
    • Etienne Dechamps's avatar
      Move partition scanning from userspace to module. · b5a28807
      Etienne Dechamps authored
      Currently, zpool online -e (dynamic vdev expansion) doesn't work on
      whole disks because we're invoking ioctl(BLKRRPART) from userspace
      while ZFS still has a partition open on the disk, which results in
      EBUSY.
      
      This patch moves the BLKRRPART invocation from the zpool utility to the
      module. Specifically, this is done just before opening the device in
      vdev_disk_open() which is called inside vdev_reopen(). This requires
      jumping through some hoops to get to the disk device from the partition
      device, and to make sure we can still open the partition after the
      BLKRRPART call.
      
      Note that this new code path is triggered on dynamic vdev expansion
      only; other actions, like creating a new pool, are unchanged and still
      call BLKRRPART from userspace.
      
      This change also depends on API changes which are available in 2.6.37
      and latter kernels.  The build system has been updated to detect this,
      but there is no compatibility mode for older kernels.  This means that
      online expansion will NOT be available in older kernels.  However, it
      will still be possible to expand the vdev offline.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #808
      b5a28807
  26. 11 Jun, 2012 1 commit
    • Richard Yao's avatar
      Linux 3.4 compat, d_make_root() replaces d_alloc_root() · 6a0936ba
      Richard Yao authored
      torvalds/linux@adc0e91ab142abe93f5b0d7980ada8a7676231fe introduced
      introduced d_make_root() as a replacement for d_alloc_root(). Further
      commits appear to have removed d_alloc_root() from the Linux source
      tree. This causes the following failure:
      
        error: implicit declaration of function 'd_alloc_root'
        [-Werror=implicit-function-declaration]
      
      To correct this we update the code to use the current d_make_root()
      interface for readability.  Then we introduce an autotools check
      to determine if d_make_root() is available.  If it isn't then we
      define some compatibility logic which used the older d_alloc_root()
      interface.
      Signed-off-by: default avatarRichard Yao <ryao@gentoo.org>
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #776
      6a0936ba
  27. 30 Apr, 2012 1 commit
  28. 23 Mar, 2012 1 commit
    • Brian Behlendorf's avatar
      Add --enable-debug-dmu-tx configure option · 1c5de20a
      Brian Behlendorf authored
      Allow rigorous (and expensive) tx validation to be enabled/disabled
      indepentantly from the standard zfs debugging.  When enabled these
      checks ensure that all txs are constructed properly and that a dbuf
      is never dirtied without taking the correct tx hold.
      
      This checking is particularly helpful when adding new dmu consumers
      like Lustre.  However, for established consumers such as the zpl
      with no known outstanding tx construction problems this is just
      overhead.
      
      --enable-debug-dmu-tx  - Enable/disable validation of each tx as
      --disable-debug-dmu-tx   it is constructed.  By default validation
                               is disabled due to performance concerns.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      1c5de20a
  29. 22 Mar, 2012 1 commit
    • Brian Behlendorf's avatar
      Add .zfs control directory · ebe7e575
      Brian Behlendorf authored
      Add support for the .zfs control directory.  This was accomplished
      by leveraging as much of the existing ZFS infrastructure as posible
      and updating it for Linux as required.  The bulk of the core
      functionality is now all there with the following limitations.
      
      *) The .zfs/snapshot directory automount support requires a 2.6.37
         or newer kernel.  The exception is RHEL6.2 which has backported
         the d_automount patches.
      
      *) Creating/destroying/renaming snapshots with mkdir/rmdir/mv
         in the .zfs/snapshot directory works as expected.  However,
         this functionality is only available to root until zfs
         delegations are finished.
      
            * mkdir - create a snapshot
            * rmdir - destroy a snapshot
            * mv    - rename a snapshot
      
      The following issues are known defeciences, but we expect them to
      be addressed by future commits.
      
      *) Add automount support for kernels older the 2.6.37.  This should
         be possible using follow_link() which is what Linux did before.
      
      *) Accessing the .zfs/snapshot directory via NFS is not yet possible.
         The majority of the ground work for this is complete.  However,
         finishing this work will require resolving some lingering
         integration issues with the Linux NFS kernel server.
      
      *) The .zfs/shares directory exists but no futher smb functionality
         has yet been implemented.
      Contributions-by: default avatarRohan Puri <rohan.puri15@gmail.com>
      Contributiobs-by: default avatarAndrew Barnes <barnes333@gmail.com>
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #173
      ebe7e575
  30. 27 Feb, 2012 1 commit
    • Brian Behlendorf's avatar
      Cleanly support debug packages · 4b787d75
      Brian Behlendorf authored
      Allow a source rpm to be rebuilt with debugging enabled.  This
      avoids the need to have to manually modify the spec file.  By
      default debugging is still largely disabled.  To enable specific
      debugging features use the following options with rpmbuild.
      
        '--with debug'               - Enables ASSERTs
      
        # For example:
        $ rpmbuild --rebuild --with debug zfs-modules-0.6.0-rc6.src.rpm
      
      Additionally, ZFS_CONFIG has been added to zfs_config.h for
      packages which build against these headers.  This is critical
      to ensure both zfs and the dependant package are using the same
      prototype and structure definitions.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      4b787d75
  31. 10 Feb, 2012 2 commits
    • Etienne Dechamps's avatar
      Add support for DISCARD to ZVOLs. · 30930fba
      Etienne Dechamps authored
      DISCARD (REQ_DISCARD, BLKDISCARD) is useful for thin provisioning.
      It allows ZVOL clients to discard (unmap, trim) block ranges from
      a ZVOL, thus optimizing disk space usage by allowing a ZVOL to
      shrink instead of just grow.
      
      We can't use zfs_space() or zfs_freesp() here, since these functions
      only work on regular files, not volumes. Fortunately we can use the
      low-level function dmu_free_long_range() which does exactly what we
      want.
      
      Currently the discard operation is not added to the log. That's not
      a big deal since losing discard requests cannot result in data
      corruption. It would however result in disk space usage higher than
      it should be. Thus adding log support to zvol_discard() is probably
      a good idea for a future improvement.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      30930fba
    • Etienne Dechamps's avatar
      Support the fallocate() file operation. · cb2d1901
      Etienne Dechamps authored
      Currently only the (FALLOC_FL_PUNCH_HOLE) flag combination is
      supported, since it's the only one that matches the behavior of
      zfs_space(). This makes it pretty much useless in its current
      form, but it's a start.
      
      To support other flag combinations we would need to modify
      zfs_space() to make it more flexible, or emulate the desired
      functionality in zpl_fallocate().
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Issue #334
      cb2d1901
  32. 09 Feb, 2012 1 commit
    • Brian Behlendorf's avatar
      Fix zconfig.sh non-optimal alignment · 93648f31
      Brian Behlendorf authored
      The recent zvol improvements have changed default suggested alignment
      for zvols from 512b (default) to 8k (zvol blocksize).  Because of this
      the zconfig.sh tests which create paritions are now generating a
      warning about non-optimal alignments.
      
      This change updates the need zconfig.sh tests such that a partition
      will be properly aligned.  In the process, it shifts from using the
      sfdisk utility to the parted utility to create partitions.  It also
      moves the creation of labels, partitions, and filesystems in to
      generic functions in common.sh.in.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      93648f31
  33. 08 Feb, 2012 1 commit
    • Etienne Dechamps's avatar
      Improve ZVOL queue behavior. · 34037afe
      Etienne Dechamps authored
      The Linux block device queue subsystem exposes a number of configurable
      settings described in Linux block/blk-settings.c. The defaults for these
      settings are tuned for hard drives, and are not optimized for ZVOLs. Proper
      configuration of these options would allow upper layers (I/O scheduler) to
      take better decisions about write merging and ordering.
      
      Detailed rationale:
      
       - max_hw_sectors is set to unlimited (UINT_MAX). zvol_write() is able to
         handle writes of any size, so there's no reason to impose a limit. Let the
         upper layer decide.
      
       - max_segments and max_segment_size are set to unlimited. zvol_write() will
         copy the requests' contents into a dbuf anyway, so the number and size of
         the segments are irrelevant. Let the upper layer decide.
      
       - physical_block_size and io_opt are set to the ZVOL's block size. This
         has the potential to somewhat alleviate issue #361 for ZVOLs, by warning
         the upper layers that writes smaller than the volume's block size will be
         slow.
      
       - The NONROT flag is set to indicate this isn't a rotational device.
         Although the backing zpool might be composed of rotational devices, the
         resulting ZVOL often doesn't exhibit the same behavior due to the COW
         mechanisms used by ZFS. Setting this flag will prevent upper layers from
         making useless decisions (such as reordering writes) based on incorrect
         assumptions about the behavior of the ZVOL.
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      34037afe