FreeBSD src
Go to file
Ned Bass e06be58641 Fix for access beyond end of device error
This commit fixes a sign extension bug affecting l2arc devices.  Extremely
large offsets may be passed down to the low level block device driver on
reads, generating errors similar to

    attempt to access beyond end of device
    sdbi1: rw=14, want=36028797014862705, limit=125026959

The unwanted sign extension occurrs because the function arc_read_nolock()
stores the offset as a daddr_t, a 32-bit signed int type in the Linux kernel.
This offset is then passed to zio_read_phys() as a uint64_t argument, causing
sign extension for values of 0x80000000 or greater.  To avoid this, we store
the offset in a uint64_t.

This change also changes a few daddr_t struct members to uint64_t in the libspl
headers to avoid similar bugs cropping up in the future.  We also add an ASSERT
to __vdev_disk_physio() to check for invalid offsets.

Closes #66
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-11-10 21:29:07 -08:00
cmd Make rollbacks fail gracefully 2010-11-08 14:03:36 -08:00
config Linux 2.6.36 compat, synchronous bio flag 2010-11-10 17:00:33 -08:00
etc Add FAILFAST support 2010-10-12 14:55:02 -07:00
include Linux 2.6.36 compat, blk_* macros removed 2010-11-10 17:00:40 -08:00
lib Fix for access beyond end of device error 2010-11-10 21:29:07 -08:00
man Add FAILFAST support 2010-10-12 14:55:02 -07:00
module Fix for access beyond end of device error 2010-11-10 21:29:07 -08:00
patches Add build system 2010-08-31 13:41:27 -07:00
scripts Add lustre zpios-test workload 2010-11-08 14:03:36 -08:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
AUTHORS Add AUTHORS to master branch 2010-05-18 14:55:01 -07:00
autogen.sh Minor packaging fixes 2010-09-01 15:42:32 -07:00
ChangeLog Add build system 2010-08-31 13:41:27 -07:00
configure Linux 2.6.36 compat, synchronous bio flag 2010-11-10 17:00:33 -08:00
configure.ac Add [-m map] option to zpool_layout 2010-09-17 11:02:19 -07:00
COPYING Relocate COPYING+COPYRIGHT, remove README cruft 2008-12-01 15:34:53 -08:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
DISCLAIMER Update COPYRIGHT and DISCLAIMER. 2010-05-18 10:32:23 -07:00
Makefile.am Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
Makefile.in Add FAILFAST support 2010-10-12 14:55:02 -07:00
META Prep for 0.5.2 tag 2010-11-08 14:03:36 -08:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix markdown rendering 2010-09-15 09:09:37 -07:00
zfs_config.h.in Linux 2.6.36 compat, synchronous bio flag 2010-11-10 17:00:33 -08:00
zfs-modules.spec.in Use top level object directory in zfs-module.spec 2010-09-10 12:33:31 -07:00
zfs-script-config.sh.in Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
ZFS.RELEASE Update to onnv_147 2010-08-26 14:24:34 -07:00
zfs.spec.in Support custom build directories and move includes 2010-09-08 12:38:56 -07:00

Native ZFS for Linux! ZFS is an advanced file system and volume manager which was originally developed for Solaris. It has been successfully ported to FreeBSD and now there is a functional Linux ZFS kernel port too. The port currently includes a fully functional and stable SPA, DMU, and ZVOL with a ZFS Posix Layer (ZPL) on the way!

$ ./configure
$ make pkg

Full documentation for building, configuring, and using ZFS can be found at: http://zfsonlinux.org