mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-10-25 09:25:00 +03:00
In a debug build, certain GCC versions flag an array bounds warning in
the below code from dnode_sync.c
} else {
int i;
ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr);
/* the blkptrs we are losing better be unallocated */
for (i = dn->dn_next_nblkptr[txgoff];
i < dnp->dn_nblkptr; i++)
ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i]));
This usage is in fact safe, since the ASSERT ensures the index does
not exceed to maximum possible number of block pointers. However gcc
can't determine that the assignment 'i = dn->dn_next_nblkptr[txgoff];'
falls within the array bounds so it issues a warning. To avoid this,
initialize i to zero to make gcc happy but skip the elements before
dn->dn_next_nblkptr[txgoff] in the loop body. Since a dnode contains
at most 3 block pointers this overhead should be negligible.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #950
|
||
|---|---|---|
| cmd | ||
| config | ||
| dracut | ||
| etc | ||
| include | ||
| lib | ||
| man | ||
| module | ||
| patches | ||
| scripts | ||
| udev | ||
| .gitignore | ||
| AUTHORS | ||
| autogen.sh | ||
| configure.ac | ||
| copy-builtin | ||
| COPYING | ||
| COPYRIGHT | ||
| DISCLAIMER | ||
| dkms.conf.in | ||
| dkms.postinst | ||
| Makefile.am | ||
| META | ||
| OPENSOLARIS.LICENSE | ||
| PKGBUILD-zfs-modules.in | ||
| PKGBUILD-zfs.in | ||
| README.markdown | ||
| zfs-modules.spec.in | ||
| zfs-script-config.sh.in | ||
| ZFS.RELEASE | ||
| zfs.release.in | ||
| zfs.spec.in | ||
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
To copy the kernel code inside your kernel source tree for builtin compilation:
$ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-...
$ ./copy-builtin /usr/src/linux-...
Full documentation for building, configuring, and using ZFS can be found at: http://zfsonlinux.org