summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix 'zfs set volsize=N pool/dataset'Brian Behlendorf2011-05-0257-11/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a kernel panic which would occur when resizing a dataset which was not open. The objset_t stored in the zvol_state_t will be set to NULL when the block device is closed. To avoid this issue we pass the correct objset_t as the third arg. The code has also been updated to correctly notify the kernel when the block device capacity changes. For 2.6.28 and newer kernels the capacity change will be immediately detected. For earlier kernels the capacity change will be detected when the device is next opened. This is a known limitation of older kernels. Online ext3 resize test case passes on 2.6.28+ kernels: $ dd if=/dev/zero of=/tmp/zvol bs=1M count=1 seek=1023 $ zpool create tank /tmp/zvol $ zfs create -V 500M tank/zd0 $ mkfs.ext3 /dev/zd0 $ mkdir /mnt/zd0 $ mount /dev/zd0 /mnt/zd0 $ df -h /mnt/zd0 $ zfs set volsize=800M tank/zd0 $ resize2fs /dev/zd0 $ df -h /mnt/zd0 Original-patch-by: Fajar A. Nugraha <[email protected]> Closes #68 Closes #84
* Add zpl_export.c to the list of targets.Alejandro R. Sedeño2011-04-292-0/+2
|
* Correct MAXUIDBrian Behlendorf2011-04-291-1/+1
| | | | | | | | | | The uid_t on most systems is in fact and unsigned 32-bit value. This is almost always correct, however you could compile your kernel to use an unsigned 16-bit value for uid_t. In practice I've never encountered a distribution which does this so I'm willing to overlook this corner case for now. Closes #165
* Implemented NFS export_operations.Gunnar Beutner2011-04-2961-12/+273
| | | | | Implemented the required NFS operations for exporting ZFS datasets using the in-kernel NFS daemon.
* Suppress 'vdev_metaslab_init' memory warningBrian Behlendorf2011-04-271-1/+1
| | | | | | | The vdev_metaslab_init() function has been observed to allocate larger than 8k chunks. However, they are not much larger than 8k and it does this infrequently so it is allowed and the warning is supressed.
* Conserve stack in dsl_scan_visit()Brian Behlendorf2011-04-261-10/+15
| | | | | | | | | | | | | | The dsl_scan_visit() function is a little heavy weight taking 464 bytes on the stack. This can be easily reduced for little cost by moving zap_cursor_t and zap_attribute_t off the stack and on to the heap. After this change dsl_scan_visit() has been reduced in size by 320 bytes. This change was made to reduce stack usage in the dsl_scan_sync() callpath which is recursive and has been observed to overflow the stack. Issue #174
* Conserve stack in dsl_scan_visitbp()Brian Behlendorf2011-04-261-5/+12
| | | | | | | | | | | This function is called recursively so everything possible must be done to limit its stack consumption. The dprintf_bp() debugging function adds 30 bytes of local variables to the function we cannot afford. By commenting out this debugging we save 30 bytes per recursion and depths of 13 are not uncommon. This yeilds a total stack saving of 390 bytes on our 8k stack. Issue #174
* Conserve stack in dsl_scan_visitbp()Brian Behlendorf2011-04-261-2/+2
| | | | | | | | | | | | | The recursive call chain dsl_scan_visitbp() -> dsl_scan_recurse() -> dsl_scan_visitdnode() -> dsl_scan_visitbp has been observed to consume considerable stack resulting in a stack overflow (>8k). The cleanest way I see to fix this with minimal impact to the existing flow of code, and with the fewest performance concerns, is to always inline dsl_scan_recurse() and dsl_scan_visitdnode(). While this will increase the function size of dsl_scan_visitbp(), by 4660 bytes, it also reduces the stack requirements by removing the function call overhead. Issue #174
* Merged pull request #212 from dajhorn/hostid.Brian Behlendorf2011-04-263-12/+5
|\ | | | | Use gethostid in the Linux convention.
| * Use gethostid in the Linux convention.Darik Horn2011-04-253-12/+5
| | | | | | | | | | | | | | | | | | | | Disable the gethostid() override for Solaris behavior because Linux systems implement the POSIX standard in a way that allows a negative result. Mask the gethostid() result to the lower four bytes, like coreutils does in /usr/bin/hostid, to prevent junk bits or sign-extension on systems that have an eight byte long type. This can cause a spurious hostid mismatch that prevents zpool import on 64-bit systems.
* | Fix zvol deadlockBrian Behlendorf2011-04-261-1/+2
|/ | | | | | | | | | | | It's possible for a zvol_write thread to enter direct memory reclaim while holding open a transaction group. This results in the system attempting to write out data to the disk to free memory. Unfortunately, this can't succeed because the the thread doing reclaim is holding open the txg which must be closed to be synced to disk. To prevent this the offending allocation is marked KM_PUSHPAGE which will prevent it from attempting writeback. Closes #191
* Fix 32-bit MAXOFFSET_T definitionBrian Behlendorf2011-04-221-7/+2
| | | | | | | | | | | Having MAXOFFSET_T defined to 0x7fffffffl was artificially limiting the maximum file size on 32-bit systems. In reality MAXOFFSET_T is used when working with 'long long' types and as such we now define it as LLONG_MAX. This resolves the 2GB file size limit for files and additionally allows zvols greater than 2GB on 32-bit systems. Closes #136 Closes #81
* Fix spurious -EFAULT when setting I/O schedulerBrian Behlendorf2011-04-221-17/+12
| | | | | | | | | | | | Occasionally we would see an -EFAULT returned when setting the I/O scheduler on a vdev. This was caused an improperly formatted user mode helper command. This commit restructures the command to something simpler, allocates space for it dynamically to save stack, and removes the retry logic which is no longer needed. Closes #169
* Enforce ARC meta-data limitsBrian Behlendorf2011-04-211-2/+15
| | | | | | | | | | | | | | | This change ensures the ARC meta-data limits are enforced. Without this enforcement meta-data can grow to consume all of the ARC cache pushing out data and hurting performance. The cache is aggressively reclaimed but this is a soft and not a hard limit. The cache may exceed the set limit briefly before being brought under control. By default 25% of the ARC capacity can be used for meta-data. This limit can be tuned by setting the 'zfs_arc_meta_limit' module option. Once this limit is exceeded meta-data reclaim will occur in 3 percent chunks, or may be tuned using 'arc_reduce_dnlc_percent'. Closes #193
* Fixed a use-after-free bug in zfs_zget().Gunnar Beutner2011-04-211-1/+23
| | | | | | | | | | Fixed a bug where zfs_zget could access a stale znode pointer when the inode had already been removed from the inode cache via iput -> iput_final -> ... -> zfs_zinactive but the corresponding SA handle was still alive. Signed-off-by: Brian Behlendorf <[email protected]> Closes #180
* Suppress 'zfs receive' memory warningBrian Behlendorf2011-04-201-1/+1
| | | | | | | | | | As part of zfs_ioc_recv() a zfs_cmd_t is allocated in the kernel which is 17808 bytes in size. This sort of thing in general should be avoided. However, since this should be an infrequent event for now we allow it and simply suppress the warning with the KM_NODEBUG flag. This can be revisited latter if/when it becomes an issue. Closes #178
* Added required runlevel info for init on DebianAniruddha Shankar2011-04-201-0/+2
| | | | | Signed-off-by: Brian Behlendorf <[email protected]> Closes #208
* Update zconfig.sh to use new zvol namesBrian Behlendorf2011-04-191-82/+99
| | | | | | | | | | | | | | | | | | | This change should have occured when we commited the new udev rules for zvols. Basically, the test script is just out of date. We need to update it to use the /dev/zvol/ device names, and to expect the more common -partN suffixes. I added a udev_trigger() call in zconfig_partition() and zconfig_zvol_device_stat() to ensure that all the udev rules have run before. This ensures the devices are available to subsequent commands and closes a small race. Finally, I was forced added a small 'sleep 1' to test 10. I was observing occassional failures in my VM due to the device still claiming to be busy. Delaying betwen the various methods of adding/removing a vdev avoids the issue. Closes #207
* Add parted and lsscsi dependencies to zfs-testBrian Behlendorf2011-04-191-0/+1
| | | | | | | | | | | | | The zfault.sh and zconfig.sh test scripts requires the parted utility, the lsscsi utility, and the scsi_debug module. To ensure the utilities are available they have been added as dependencies to zfs-test package. Checking for scsi_debug is a little more problematic because if it's missing you will need to build it. For clarity the documention has been updated to mention this. Closes #205 Closes #206
* Add Gunnar Beutner to AUTHORS for his contributionsBrian Behlendorf2011-04-191-0/+1
|
* Truncate the xattr znode when updating existing attributes.Gunnar Beutner2011-04-191-1/+7
| | | | | | | | If the attribute's new value was shorter than the old one the old code would leave parts of the old value in the xattr znode. Signed-off-by: Brian Behlendorf <[email protected]> Closes #203
* Added missing initialization for va.va_dentry in zfs_get_xattrdir.Gunnar Beutner2011-04-191-0/+1
| | | | | | | | | | | | Without this we may mistakenly believe we have a dentry and try to d_instantiate() it. This will result in the following BUG. It's important to note that while the xattr directory has an inode assoicated with it we never create a dentry for it. kernel BUG at fs/dcache.c:1418! Signed-off-by: Brian Behlendorf <[email protected]> Closes #202
* Support IEC base-2 prefixesRichard Laager2011-04-191-4/+7
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Cleanup various Sun/Solaris-ismsRichard Laager2011-04-193-99/+11
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Update the version in the zpool upgrade exampleRichard Laager2011-04-191-1/+1
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Normalize the deferred destruction languageRichard Laager2011-04-191-3/+3
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Improve the wording about hot sparesRichard Laager2011-04-191-2/+2
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Improve some quoting consistencyRichard Laager2011-04-191-3/+3
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Remove a stray tabRichard Laager2011-04-191-1/+1
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Linux has "partitions", not "slices"Richard Laager2011-04-191-2/+2
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Use Linux disk names in zpool.8Richard Laager2011-04-191-25/+25
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* More and correct an example in zpool.8Richard Laager2011-04-191-1/+1
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Change /dev/dsk -> /dev in the man pagesRichard Laager2011-04-192-5/+5
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Correct man page section numbers for LinuxRichard Laager2011-04-193-22/+22
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Set -Wno-unused-but-set-variable globallyBrian Behlendorf2011-04-1920-62/+83
| | | | | | | | | | | | | As of gcc-4.6 the option -Wunused-but-set-variable is enabled by default. While this is a useful warning there are numerous places in the ZFS code when a variable is set and then only checked in an ASSERT(). To avoid having to update every instance of this in the code we now set -Wno-unused-but-set-variable to suppress the warning. Additionally, when building with --enable-debug and -Werror set these warning also become fatal. We can reevaluate the suppression of these error at a later time if it becomes an issue. For now we are basically just reverting to the previous gcc behavior.
* Fix gcc configure warningsBrian Behlendorf2011-04-1910-45/+45
| | | | | | | | | | | | | | | | | | Newer versions of gcc are getting smart enough to detect the sloppy syntax used for the autoconf tests. It is now generating warnings for unused/undeclared variables. Newer version of gcc even have the -Wunused-but-set-variable option set by default. This isn't a problem except when -Werror is set and they get promoted to an error. In this case the autoconf test will return an incorrect result which will result in a build failure latter on. To handle this I'm tightening up many of the autoconf tests to explicitly mark variables as unused to suppress the gcc warning. Remember, all of the autoconf code can never actually be run we just want to get a clean build error to detect which APIs are available. Never using a variable is absolutely fine for this. Closes #176
* Fix gcc compiler warning, parse_option()Brian Behlendorf2011-04-191-0/+1
| | | | | | | | | | | | | | | When compiling ZFS in user space gcc-4.6.0 correctly identifies the variable 'value' as being set but never used. This generates a warning and a build failure when using --enable-debug. Once again this is correct but I'm reluctant to remove 'value' because we are breaking the string in to name/value pairs. While it is not used now there's a good chance it will be soon and I'd rather not have to reinvent this. To suppress the warning with just as a VERIFY(). This was observed under Fedora 15. cmd/mount_zfs/mount_zfs.c: In function ‘parse_option’: cmd/mount_zfs/mount_zfs.c:112:21: error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
* Fix gcc compiler warning, dsl_pool_create()Brian Behlendorf2011-04-191-2/+2
| | | | | | | | | | | | | | When compiling ZFS in user space gcc-4.6.0 correctly identifies the variable 'os' as being set but never used. This generates a warning and a build failure when using --enable-debug. However, the code is correct we only want to use 'os' for the kernel space builds. To suppress the warning the call was wrapped with a VERIFY() which has the nice side effect of ensuring the 'os' actually never is NULL. This was observed under Fedora 15. module/zfs/dsl_pool.c: In function ‘dsl_pool_create’: module/zfs/dsl_pool.c:229:12: error: variable ‘os’ set but not used [-Werror=unused-but-set-variable]
* Linux 2.6.39 compat, invalidate_inodes()Brian Behlendorf2011-04-191-1/+1
| | | | | | | | | Update code to use the spl_invalidate_inodes() wrapper. This hides some of the complexity of determining if invalidate_inodes() was exported, and if so what is its prototype. The second argument of spl_invalidate_inodes() determined the behavior of how dirty inodes are handled. By passing a zero we are indicated that we want those inodes to be treated as busy and skipped.
* Autogen refresh for kernel-insert-inode-locked.m4Brian Behlendorf2011-04-185-0/+5
| | | | | | Several Makefile.in's were accidentally not updated when the kernel-insert-inode-locked.m4 check was added. This change simply refreshes the missed files.
* Fix rebuildable RPMs for el6/ch5zfs-0.6.0-rc3Brian Behlendorf2011-04-081-2/+6
| | | | | | | When rebuilding the source RPM under el5 you need to append the target_cpu. However, under el6/ch5 things are packaged correctly and the arch is already part of kver. For this reason it also needs to be stripped from kver when setting kverpkg.
* Align closing fi in mount-zfs.shNed Bass2011-04-081-1/+1
|
* Use consistent indentation in mount-zfs.shNed Bass2011-04-081-1/+1
|
* Fix a couple commentsRichard Laager2011-04-072-2/+2
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Linux 2.6.29 compat, credentialsBrian Behlendorf2011-04-071-3/+3
| | | | | | | The .sync_fs fix as applied did not use the updated SPL credential API. This broke builds on Debian Lenny, this change applies the needed fix to use the portable API. The original credential changes are part of commit 81e97e21872a9c38ad66c37fafe1436ee25abee3.
* Prep zfs-0.6.0-rc3 tagBrian Behlendorf2011-04-071-1/+1
| | | | Create the third 0.6.0 release candidate tag (rc3).
* Update zfs.fedora init scriptManuel Amador (Rudd-O)2011-04-071-51/+178
| | | | | | | | | | | | | | Apply all of Rudd-O's changes for the Fedora init script. The initial init script was one I threw together based on Rudd-O's original work. It worked for me but it has some flaws. Rudd-O has invested considerable time updating it to be significantly smarter. It now handles using ZFS as your root filesystem plus various other quirks. Since he is familiar with the right way to do things on Fedora and has tested this init script we are integrating all of his changes. Signed-off-by: Brian Behlendorf <[email protected]>
* Permit both mountpoint=legacy and mountpoint=/ in initrdManuel Amador (Rudd-O)2011-04-071-1/+7
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Added .gitignore for mount.zfs and zvol_idManuel Amador (Rudd-O)2011-04-072-0/+2
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Fix ASSERTION(!dsl_pool_sync_context(tx->tx_pool))Brian Behlendorf2011-04-071-0/+13
| | | | | | | | | | Disable the normal reclaim path for the txg_sync thread. This ensures the thread will never enter dmu_tx_assign() which can otherwise occur due to direct reclaim. If this is allowed to happen the system can deadlock. Direct reclaim call path: ->shrink_icache_memory->prune_icache->dispose_list-> clear_inode->zpl_clear_inode->zfs_inactive->dmu_tx_assign