1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00

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 <behlendorf1@llnl.gov>
Closes #862
This commit is contained in:
Etienne Dechamps 2012-08-01 10:29:59 +02:00 committed by Brian Behlendorf
parent 9a512dca97
commit ee5fd0bb80
61 changed files with 233 additions and 0 deletions

View File

@ -91,6 +91,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 \

View File

@ -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 \

View File

@ -71,6 +71,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 \

View File

@ -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 \

View File

@ -71,6 +71,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 \

View File

@ -71,6 +71,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 \

View File

@ -71,6 +71,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 \

View File

@ -71,6 +71,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 \

View File

@ -71,6 +71,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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -71,6 +71,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 \

View File

@ -71,6 +71,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 \

View File

@ -0,0 +1,20 @@
dnl #
dnl # 2.6.33 API change
dnl # Discard granularity and alignment restrictions may now be set.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_DISCARD_GRANULARITY], [
AC_MSG_CHECKING([whether ql->discard_granularity is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
struct queue_limits ql __attribute__ ((unused));
ql.discard_granularity = 0;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DISCARD_GRANULARITY, 1,
[ql->discard_granularity is available])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -39,6 +39,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_GET_GENDISK
ZFS_AC_KERNEL_RQ_IS_SYNC
ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT
ZFS_AC_KERNEL_DISCARD_GRANULARITY
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
ZFS_AC_KERNEL_XATTR_HANDLER_GET
ZFS_AC_KERNEL_XATTR_HANDLER_SET

138
configure vendored
View File

@ -15369,6 +15369,75 @@ fi
EXTRA_KCFLAGS="$tmp_flags"
{ $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <linux/blkdev.h>
int
main (void)
{
struct queue_limits ql __attribute__ ((unused));
ql.discard_granularity = 0;
;
return 0;
}
_ACEOF
rm -Rf build && mkdir -p build && touch build/conftest.mod.c
echo "obj-m := conftest.o" >build/Makefile
modpost_flag=''
test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_DISCARD_GRANULARITY 1
_ACEOF
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
rm -Rf build
{ $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
@ -22873,6 +22942,75 @@ fi
EXTRA_KCFLAGS="$tmp_flags"
{ $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <linux/blkdev.h>
int
main (void)
{
struct queue_limits ql __attribute__ ((unused));
ql.discard_granularity = 0;
;
return 0;
}
_ACEOF
rm -Rf build && mkdir -p build && touch build/conftest.mod.c
echo "obj-m := conftest.o" >build/Makefile
modpost_flag=''
test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_DISCARD_GRANULARITY 1
_ACEOF
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
rm -Rf build
{ $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -432,6 +432,21 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
# define VDEV_REQ_DISCARD REQ_DISCARD
#endif
/*
* 2.6.33 API change
* Discard granularity and alignment restrictions may now be set. For
* older kernels which do not support this it is safe to skip it.
*/
#ifdef HAVE_DISCARD_GRANULARITY
static inline void
blk_queue_discard_granularity(struct request_queue *q, unsigned int dg)
{
q->limits.discard_granularity = dg;
}
#else
#define blk_queue_discard_granularity(x, dg) ((void)0)
#endif /* HAVE_DISCARD_GRANULARITY */
/*
* Default Linux IO Scheduler,
* Setting the scheduler to noop will allow the Linux IO scheduler to

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -1245,6 +1245,7 @@ __zvol_create_minor(const char *name)
#ifdef HAVE_BLK_QUEUE_DISCARD
blk_queue_max_discard_sectors(zv->zv_queue,
(zvol_max_discard_blocks * zv->zv_volblocksize) >> 9);
blk_queue_discard_granularity(zv->zv_queue, zv->zv_volblocksize);
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zv->zv_queue);
#endif
#ifdef HAVE_BLK_QUEUE_NONROT

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \

View File

@ -120,6 +120,9 @@
/* xattr_handler->set() wants dentry */
#undef HAVE_DENTRY_XATTR_SET
/* ql->discard_granularity is available */
#undef HAVE_DISCARD_GRANULARITY
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H