diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-05-05 06:50:46 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-05-07 18:45:51 -0700 |
commit | 768b86a269378e66f9378295073740ff6e0cb02e (patch) | |
tree | dbe4c76da759bac359d006095282e596aaa176aa /xlators/cluster/dht/src/dht-inode-write.c | |
parent | eb8847703b8560a045e7ed0336f895bcceda98ea (diff) |
features/shard: Implement [f]truncate fops
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: Ifd24c2f5e80d2c3bc921261f5481251df8948126
BUG: 1207615
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/10631
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-write.c')
-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; } |