diff options
| author | Shreyas Siravara <sshreyas@fb.com> | 2015-10-23 15:52:22 -0700 |
|---|---|---|
| committer | Shreyas Siravara <sshreyas@fb.com> | 2017-08-30 01:18:39 +0000 |
| commit | d5bc1267359cf78a5e5d65bd70f51e41239f5e0e (patch) | |
| tree | 03d78d1c085cb71030641c5db6f4464a4d2a4020 /libglusterfs/src/stack.h | |
| parent | 476a5c3fb72ec4c1c791c0fcf9be3c95fcc398c6 (diff) | |
Make a DHT subvolume go read-only when a subvolume crashes
Summary:
When subvolumes crash, users get messages like "No such file or directory" or
"I/O Error" when doing operations that are cluster-wide, i.e., operations that
touch the subvolume that has crashed. These include operations like mkdir() and
rmdir() which are cluster-wide, as well as reads/writes/creates that hash to
the dead subvolume.
DHT does the right thing by disallowing operations to the subvolume -- it is
effectively putting the subvolume in "read-only" mode to protect data, but it
does not return the correct error. As a result, users of the filesystem think
that the data is gone (in the case of "No such file or directory", or worse a
blanket error that means nothing in the case of EIO). DHT sets the errno to
ENOENT, which while makes sense in the context of DHT (No subvolume entry,
hence ENOENT), the error it should bubble up to the user is EROFS, since it is
putting the system in read-only mode.
This diff changes the error messages to EROFS so the users get a more clear
message of what is going on.
Test Plan: Tested by downing a subvolume and checking error codes. Also ran
other prove tests to make sure they pass.
Change-Id: I20ad6fe31dbd66536db2a69246771ffad0140db3
Reviewers: rwareing, dph, moox
Reviewed-on: https://review.gluster.org/17952
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
Diffstat (limited to 'libglusterfs/src/stack.h')
0 files changed, 0 insertions, 0 deletions
