diff options
author | Etienne Dechamps <[email protected]> | 2012-08-01 10:29:59 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-08-07 14:55:31 -0700 |
commit | ee5fd0bb80d68ef095f831784cbb17181b2ba898 (patch) | |
tree | e2437a510eaa09db0af6429e1aa94d2d44b35182 /lib | |
parent | 9a512dca97fec1afa5068b53621ce1dd7dbef578 (diff) |
Set zvol discard_granularity to the volblocksize.
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: Brian Behlendorf <[email protected]>
Closes #862
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libavl/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libefi/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libnvpair/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libshare/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/asm-generic/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/asm-i386/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/asm-x86_64/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/ia32/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/ia32/sys/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/rpc/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/sys/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/sys/dktp/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/sys/sysevent/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libspl/include/util/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libunicode/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libuutil/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libzfs/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libzpool/Makefile.in | 1 |
21 files changed, 21 insertions, 0 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in index 87dfb2fba..1ad953932 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 26dacbec9..f5311c3c0 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index e9b8f9559..7a60887d4 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index 0f36765c1..2e0fcf9e1 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libshare/Makefile.in b/lib/libshare/Makefile.in index 811b05101..081ce0992 100644 --- a/lib/libshare/Makefile.in +++ b/lib/libshare/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index 88ded3bb9..89fe88ac4 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index b8ba11408..b7059c02f 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 7cd6977b2..8e7e590fe 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 083fee5d5..3df767a15 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index 0c6fdcf69..b81c3dbe8 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index 02186ac39..23ffb4dc1 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index f9e0236bc..2b2c230f9 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index b601bc125..3752b74df 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index 8258f0fe0..fec69dfe7 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index 9ea3a27c2..3932adcba 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 62b876137..7d784f360 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index cf37f1639..e32a340d2 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index 4ca968241..971a2bc5e 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index a90c890cb..64b2c3005 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index c2c1d2e4a..f22b6f0a5 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index a94b7e1cd..b0c001545 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-make-root.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ + $(top_srcdir)/config/kernel-discard-granularity.m4 \ $(top_srcdir)/config/kernel-encode-fh-inode.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ |