>On Thu, Jul 11, 2013 at 9:17 AM, majianpeng <majianpeng@xxxxxxxxx> wrote: >> Although, mmap-write of ceph update the time of file using >> file_update_time.Because it don't mark the relative cap so the time >> can't save. > >I think cephfs' mmap IO support is still broken. mmap IO does not respect >ceph capabilities at all. It's possible that the kclient has no Fw cap when >ceph_page_mkwrite is called. > Thanks, i'll add this check and resent. Jianpeng Ma >Yan, Zheng > > >> >> Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx> >> --- >> fs/ceph/addr.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c >> index 38b5c1b..52f7c7c 100644 >> --- a/fs/ceph/addr.c >> +++ b/fs/ceph/addr.c >> @@ -1231,10 +1231,18 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) >> >> ret = ceph_update_writeable_page(vma->vm_file, off, len, page); >> if (ret == 0) { >> + int dirty; >> + struct ceph_inode_info *ci = ceph_inode(inode); >> /* success. we'll keep the page locked. */ >> set_page_dirty(page); >> up_read(&mdsc->snap_rwsem); >> ret = VM_FAULT_LOCKED; >> + >> + spin_lock(&ci->i_ceph_lock); >> + dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR); >> + spin_unlock(&ci->i_ceph_lock); >> + if (dirty) >> + __mark_inode_dirty(inode, dirty); >> } else { >> if (ret == -ENOMEM) >> ret = VM_FAULT_OOM; >> -- >> 1.8.1.2?韬{.n?????%??檩??w?{.n????u朕?Ф?塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f