diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-04-30 14:40:54 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 11:49:28 +0300 |
commit | 5dda377cf0a6bd43f64a3c1efb670d7c668e7b29 (patch) | |
tree | 5b2fddcbf62d8c2b076d2e1040bdd6f5a21e8012 /drivers/media | |
parent | 7b06a826e7c52d77ce801e5960ecf0338eafe886 (diff) | |
download | op-kernel-dev-5dda377cf0a6bd43f64a3c1efb670d7c668e7b29.zip op-kernel-dev-5dda377cf0a6bd43f64a3c1efb670d7c668e7b29.tar.gz |
ceph: set i_head_snapc when getting CEPH_CAP_FILE_WR reference
In most cases that snap context is needed, we are holding
reference of CEPH_CAP_FILE_WR. So we can set ceph inode's
i_head_snapc when getting the CEPH_CAP_FILE_WR reference,
and make codes get snap context from i_head_snapc. This makes
the code simpler.
Another benefit of this change is that we can handle snap
notification more elegantly. Especially when snap context
is updated while someone else is doing write. The old queue
cap_snap code may set cap_snap's context to ether the old
context or the new snap context, depending on if i_head_snapc
is set. The new queue capp_snap code always set cap_snap's
context to the old snap context.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions