From 41beab5444969f235c665042965a650b5a2866e6 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 3 Feb 2016 17:15:03 +0100 Subject: shard: add seek() FOP as not supported For getting basic support for SEEK_DATA/SEEK_HOLE, sharding has not been implemented. Bug 1301647 has been filed to get this new feature in sharding as well. Because of a premature merge (and revert), this change is re-applying everything from commit 2ce3daa94066dcc77cdc6b54a31747b6c7c0c2fc again. BUG: 1220173 Change-Id: I0fb2d36c65af5cb2d0a064104b74f7a863ec4ed3 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/13347 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/features/shard/src/shard.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xlators/features/shard/src/shard.c') diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c index e46d4dc33ec..19a07d29562 100644 --- a/xlators/features/shard/src/shard.c +++ b/xlators/features/shard/src/shard.c @@ -4611,6 +4611,17 @@ shard_discard (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, return 0; } +int32_t +shard_seek (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, + gf_seek_what_t what, dict_t *xdata) +{ + /* TBD */ + gf_msg (this->name, GF_LOG_INFO, ENOTSUP, SHARD_MSG_FOP_NOT_SUPPORTED, + "seek called on %s.", uuid_utoa (fd->inode->gfid)); + SHARD_STACK_UNWIND (seek, frame, -1, ENOTSUP, 0, NULL); + return 0; +} + int32_t mem_acct_init (xlator_t *this) { @@ -4801,6 +4812,7 @@ struct xlator_fops fops = { .link = shard_link, .unlink = shard_unlink, .rename = shard_rename, + .seek = shard_seek, }; struct xlator_cbks cbks = { -- cgit