diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/storage/posix/src/posix-handle.h | 2 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h index 8a07cf2b57d..78da75d5358 100644 --- a/xlators/storage/posix/src/posix-handle.h +++ b/xlators/storage/posix/src/posix-handle.h @@ -190,4 +190,6 @@ int posix_check_internal_writes (xlator_t *this, fd_t *fd, int sysfd, dict_t *xdata); +void +posix_disk_space_check (xlator_t *this); #endif /* !_POSIX_HANDLE_H */ diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 62f2c2aa1ee..ff82eb19f2d 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -602,6 +602,15 @@ posix_do_fallocate (call_frame_t *frame, xlator_t *this, fd_t *fd, VALIDATE_OR_GOTO (fd, out); priv = this->private; + + /* fallocate case is special so call posix_disk_space_check separately + for every fallocate fop instead of calling posix_disk_space with + thread after every 5 sec sleep to working correctly storage.reserve + option behaviour + */ + if (priv->disk_reserve) + posix_disk_space_check (this); + DISK_SPACE_CHECK_AND_GOTO (frame, priv, xdata, ret, ret, out); ret = posix_fd_ctx_get (fd, this, &pfd, &op_errno); |