diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2018-06-08 09:54:00 -0400 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-24 04:18:55 +0000 |
commit | f191bb7bc1abd250bdf0a5a6972ce95fcbd3314b (patch) | |
tree | 761211f59a43a954dc3312b570080faa68027be8 /xlators/features/quiesce | |
parent | 11a9f9f0dcca58446f306ef2060a345348ed91c1 (diff) |
features/snapview-server: validate the fs instance before doing fop there
PROBLEM:
========
USS design depends on snapview-server translator communicating with each
individual snapshot via gfapi. So, the snapview-server xlator maintains
the glfs instance (thus the snapshot) to which a inode belongs to by
storing it inside the inode context.
Suppose, a file from a snapshot is opened by a application, and the fd
is still valid from application's point of view (i.e. application has
not yet closed fd). Now, if the snapshot to which the opened file
belongs to is deleted, then the glfs_t instance corresponding to the
snapshot is destroyed by snapview-server as part of snap deletion.
But now, if the application does IO on the fd it has kept open, then
snapview server tries to send that request to the corresponding snap
via glfs instance for that snapshot stored in the inode context for
the file on which the application is sending the fop. And this results
in freed up glfs_t pointer being accessed and causes a segfault.
FIX:
===
For fd based operations, check whether the glfs instance that the inode
contains in its context, is still valid or not.
For non fd based operations, usually lookup should guarantee that. But
if the file was already looked up, and the client accessing the snap data
(either NFS, or native glusterfs fuse) does not bother to send a lookup
and directly sends a path based fop, then that path based fop should
ensure that the fs instance is valid.
Change-Id: I881be15ec46ecb51aa844d7fd41d5630f0d644fb
updates: bz#1602070
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/features/quiesce')
0 files changed, 0 insertions, 0 deletions