Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932136Ab3GBFpY (ORCPT ); Tue, 2 Jul 2013 01:45:24 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:60571 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278Ab3GBFpV (ORCPT ); Tue, 2 Jul 2013 01:45:21 -0400 Date: Tue, 2 Jul 2013 13:45:17 +0800 From: majianpeng To: sage Cc: ceph-devel , linux-kernel Reply-To: majianpeng Subject: [PATCH 3/3] ceph: For ceph_sync_read, update the atime of file. X-Priority: 3 X-GUID: 6A09C052-7F0F-4737-BADF-C3B6F1EBA162 X-Has-Attach: no X-Mailer: Foxmail 7.0.1.90[en] Mime-Version: 1.0 Message-ID: <201307021345131042678@gmail.com> Content-Type: text/plain; charset="gb2312" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r625jdR7005636 Content-Length: 735 Lines: 25 For buffer read, the func generic_file_aio_read will update atime of file.But the ceph_sync_read don't do it.So add this. Signed-off-by: Jianpeng Ma --- fs/ceph/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 656e169..87df15a 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -442,6 +442,9 @@ done: ceph_put_page_vector(pages, num_pages, true); else ceph_release_page_vector(pages, num_pages); + + file_accessed(file); + dout("sync_read result %d\n", ret); return ret; } -- 1.8.1.2 ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?