diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-05-05 06:50:46 +0530 |
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-08 04:49:54 -0700 |
| commit | f4507c2bb4a862f6ea10f7e683b5a63218103dda (patch) | |
| tree | e5120e7b04087d66880726bb9edb9ef3a5772224 /xlators/cluster | |
| parent | bb6de6aaf5ddbc93eca63b983c0bd2ead8969750 (diff) | |
features/shard: Implement [f]truncate fops
Backport of: http://review.gluster.org/10631
To-Do:
* Make ftruncate work even in the absence of path
* Aggregate and update ia_blocks appropriately when a file is
truncated to a lower size.
Change-Id: Icd424430066233ba61a030e72fdddf692d2b3f22
BUG: 1214247
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/10638
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster')
| -rw-r--r-- | xlators/cluster/dht/src/dht-inode-write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index 2bfd80af3cd..7d04376abfc 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -276,7 +276,6 @@ dht_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset, VALIDATE_OR_GOTO (this, err); VALIDATE_OR_GOTO (loc, err); VALIDATE_OR_GOTO (loc->inode, err); - VALIDATE_OR_GOTO (loc->path, err); local = dht_local_init (frame, loc, NULL, GF_FOP_TRUNCATE); if (!local) { @@ -289,7 +288,8 @@ dht_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset, subvol = local->cached_subvol; if (!subvol) { gf_msg_debug (this->name, 0, - "no cached subvolume for path=%s", loc->path); + "no cached subvolume for gfid=%s", + uuid_utoa (loc->inode->gfid)); op_errno = EINVAL; goto err; } |
