From patchwork Tue Jul 2 05:45:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: majianpeng X-Patchwork-Id: 2810881 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 78BA7BF4A1 for ; Tue, 2 Jul 2013 05:46:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C3A020145 for ; Tue, 2 Jul 2013 05:46:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9348620143 for ; Tue, 2 Jul 2013 05:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997Ab3GBFpX (ORCPT ); Tue, 2 Jul 2013 01:45:23 -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 Received: by mail-pd0-f173.google.com with SMTP id v14so3249224pde.18 for ; Mon, 01 Jul 2013 22:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:reply-to:subject:x-priority:x-guid:x-has-attach :x-mailer:mime-version:message-id:content-type :content-transfer-encoding; bh=lKP45yDVGwyZgl1HRVy7IJto95NTNZaPSmGiei7sdug=; b=LYEIg3tXJrO/uvk9cTSq22URgQ5OdfjqUZMaEtP/0v8C52SQLcdi6S2+jblgrCA07g 4RCjVVsuVMooroAx8Y9TZfX8Rgiw1uKSm5vTLZNNApmHwfRr/GsaPDhNuHCc/Qu9LxgQ iL3Z74XQBF8vtWw97VHyBwOT391OwDFA+BQbj3vIzjgD2tpFUhBoXVxab9IodIXHZJR3 RV4c2lJiVOwObm2eAYZMyNWUnLInCk4EqAc6tE/wT7I95vKCIjK6ve5h3J82kTtBdTYr WIWpNJgiyW7lvFRk40pio9Ihpwp0nBnR3i8IA9EM836Mr2orCNtM5rS0A4DEHbRxf6xp d50w== X-Received: by 10.68.171.226 with SMTP id ax2mr27148662pbc.201.1372743920747; Mon, 01 Jul 2013 22:45:20 -0700 (PDT) Received: from majianpeng ([218.242.10.182]) by mx.google.com with ESMTPSA id b4sm25662536pba.45.2013.07.01.22.45.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 01 Jul 2013 22:45:19 -0700 (PDT) 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> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) -- 1.8.1.2 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; }