Re: [v3] ceph: add 'lazyio' mount option to kclient
Alex Markuze <[email protected]>
| Newsgroups | org.kernel.vger.ceph-devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Xiubo, One issue in caps.c:1014: ceph_adjust_caps_used_for_lazyio() maps CACHE/BUFFER onto LAZYIO only while LAZYIO is in issued. The grant path in handle_cap_grant() is fine — the writeback/invalidate wait fires there. But after the revoke, ceph_check_caps() sees used as BUFFER/CACHE with revoking as LAZYIO, (revoking & cap_used)==0, and ACKs immediately. The MDS can then hand the cap to another client while dirty or stale pages are still present. Fix: extend the mapping to cover implemented, not just issued, so the LAZYIO-revoking case holds until writeback and invalidation actually complete. Also worth queuing writeback when revoking LAZYIO with i_wrbuffer_ref set, matching the existing BUFFER path. Minor: the commit message still says CEPH_FILE_MODE_LAZY is set in ceph_init_file_info(); since v2 it's set in ceph_open()/ceph_atomic_open(). Could you respin? -- Alex Markuze