Hi,
I find that fchmod(2) on a zfs filesystem can sometimes generate errno =
ENOSPC. However this error value is not in the manpage of fchmod(2).
Here''s where ENOSPC is generated.
zfs`dsl_dir_tempreserve_impl
zfs`dsl_dir_tempreserve_space+0x4e
zfs`dmu_tx_try_assign+0x230
zfs`dmu_tx_assign+0x21
zfs`zfs_setattr+0x41b
genunix`fop_setattr+0x24
genunix`vpsetattr+0x110
genunix`fdsetattr+0x26
genunix`fchmod+0x2a
genunix`dtrace_systrace_syscall+0xbc
unix`sys_sysenter+0x101
Is this correct behavior? Is it the manpage that needs fixing? zpool
list shows this.
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
pool1 115M 83.1M 31.9M 72% ONLINE -
While I am unable to guarantee that there has been no activity after
fchmod() has failed, I am fairly sure that the filesystem was not full
when it returned ENOSPC.
I have done all my analysis on build 54. So I might just be looking at
outdated stuff.
Please let me know what you think.
Regards,
Manoj
Manoj Joseph wrote:> Hi, > > I find that fchmod(2) on a zfs filesystem can sometimes generate errno = > ENOSPC. However this error value is not in the manpage of fchmod(2). > > Here''s where ENOSPC is generated. > > zfs`dsl_dir_tempreserve_impl > zfs`dsl_dir_tempreserve_space+0x4e > zfs`dmu_tx_try_assign+0x230 > zfs`dmu_tx_assign+0x21 > zfs`zfs_setattr+0x41b > genunix`fop_setattr+0x24 > genunix`vpsetattr+0x110 > genunix`fdsetattr+0x26 > genunix`fchmod+0x2a > genunix`dtrace_systrace_syscall+0xbc > unix`sys_sysenter+0x101 > > Is this correct behavior? Is it the manpage that needs fixing? zpool > list shows this.In a COW filesystem such as ZFS, it will sometimes be necessary to return ENOSPC in cases such as chmod(2) which previously did not. This is because there could be a snapshot, so "overwriting" some information actually requires a net increase in space used. That said, we may be generating this ENOSPC in cases where it is not strictly necessary (eg, when there are no snapshots). We''re working on some of these cases. Can you show us the output of ''zfs list'' when the ENOSPC occurs? --matt
Matthew Ahrens wrote:> Manoj Joseph wrote: >> Hi, >> >> I find that fchmod(2) on a zfs filesystem can sometimes generate errno >> = ENOSPC. However this error value is not in the manpage of fchmod(2). >> >> Here''s where ENOSPC is generated. >> >> zfs`dsl_dir_tempreserve_impl >> zfs`dsl_dir_tempreserve_space+0x4e >> zfs`dmu_tx_try_assign+0x230 >> zfs`dmu_tx_assign+0x21 >> zfs`zfs_setattr+0x41b >> genunix`fop_setattr+0x24 >> genunix`vpsetattr+0x110 >> genunix`fdsetattr+0x26 >> genunix`fchmod+0x2a >> genunix`dtrace_systrace_syscall+0xbc >> unix`sys_sysenter+0x101 >> >> Is this correct behavior? Is it the manpage that needs fixing? zpool >> list shows this. > > In a COW filesystem such as ZFS, it will sometimes be necessary to > return ENOSPC in cases such as chmod(2) which previously did not. This > is because there could be a snapshot, so "overwriting" some information > actually requires a net increase in space used.Could the manpage be updated to reflect this?> That said, we may be generating this ENOSPC in cases where it is not > strictly necessary (eg, when there are no snapshots). We''re working on > some of these cases. Can you show us the output of ''zfs list'' when the > ENOSPC occurs?-bash-3.00# zfs list pool1 NAME USED AVAIL REFER MOUNTPOINT pool1 83.0M 0 82.8M /pool1 -bash-3.00# zpool list pool1 NAME SIZE USED AVAIL CAP HEALTH ALTROOT pool1 115M 83.0M 32.0M 72% ONLINE - zfs list does say that there is no available space. There is 32M available on the zpool though. Interesting... Regards, Manoj
Matthew Ahrens wrote:> In a COW filesystem such as ZFS, it will sometimes be necessary to > return ENOSPC in cases such as chmod(2) which previously did not. This > is because there could be a snapshot, so "overwriting" some information > actually requires a net increase in space used. > > That said, we may be generating this ENOSPC in cases where it is not > strictly necessary (eg, when there are no snapshots). We''re working on > some of these cases. Can you show us the output of ''zfs list'' when the > ENOSPC occurs?Is there a bug id for this? Regards, Manoj
Manoj Joseph wrote:> Matthew Ahrens wrote: >> In a COW filesystem such as ZFS, it will sometimes be necessary to >> return ENOSPC in cases such as chmod(2) which previously did not. >> This is because there could be a snapshot, so "overwriting" some >> information actually requires a net increase in space used. >> >> That said, we may be generating this ENOSPC in cases where it is not >> strictly necessary (eg, when there are no snapshots). We''re working >> on some of these cases. Can you show us the output of ''zfs list'' when >> the ENOSPC occurs? > > Is there a bug id for this?Can you search for ENOSPC in solaris/kernel/zfs? (That''s product/category/subcat. I don''t know how the external bug interface works.) Or check out 6362156 and 6453407. --matt