diff options
author | Susant Palai <spalai@redhat.com> | 2020-05-04 19:09:00 +0530 |
---|---|---|
committer | Susant Palai <spalai@redhat.com> | 2020-05-12 05:49:23 +0000 |
commit | f246cb1359b5c488c2c5b76ee9e67154461e572a (patch) | |
tree | c753a8f24ae1e8fdf65bf3f867688baf9c02c3e6 /xlators/cluster/dht/src/dht-common.h | |
parent | 640926b917967b675cf3e7bd44aed1a70d8c6824 (diff) |
dht: Do opendir selectively in gf_defrag_process_dir
Currently opendir is done from the cluster view. Hence, even if
one opendir is successful, the opendir operation as a whole is considered
successful.
But since in gf_defrag_get_entry we fetch entries selectively from
local_subvols, we need to opendir individually on those local subvols
and keep track of fds separately. Otherwise it is possible that opendir
failed on one of the subvol and we wind readdirp call on the fd to the
corresponding subvol, which will ultimately result in EINVAL error.
fixes: #1218
Change-Id: I50dd88b9597852a15579f4ee325918979417f570
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index afd01d69e0a..8d539f1e360 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -752,6 +752,8 @@ struct dir_dfmeta { struct list_head **head; struct list_head **iterator; int *fetch_entries; + /* fds corresponding to local subvols only */ + fd_t **lfd; }; typedef struct dht_migrate_info { |