Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp907586imm; Fri, 28 Sep 2018 08:43:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV63c6D8LeK4sLnFmsIqQSSoPYGJFw7PSxpBuJzy/A0T5EDRPBE0bH7/mac9gMWB4PyM8ArFP X-Received: by 2002:a17:902:a03:: with SMTP id 3-v6mr16965866plo.323.1538149402942; Fri, 28 Sep 2018 08:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538149402; cv=none; d=google.com; s=arc-20160816; b=x52FKzvTX29TvWDZ/2BMd3GVdS8f9NUqWlvY4H5HP0eCJyl3qn9DlltK9u3pgsUX7o fwPL5XiZzzWb7OS1t1cZtveXWUa15cE2e/1IkkkXCpTRoX4N4c2pvgh9PrXFTygS/JWG vjWk4VbU6Sp+IVf8h8Unh27Pb6Kul4gH2RMNflVL+mvxC66Ml2dyNJgAbeFhUYD18ZKl PMUEQFbftAFL8sxSd1I+FKXleI0jhWLiZjdB8bsnqPDfqtLuyzRxcZqAKPM+TEzM8wep zm+SYsPJOALiEohaz4EjFxrPni+dSb4lODI9RvcPts5xMvHEP9J2bJdg+dGv4XRtgO89 jN3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Ko/6pZM5qyC5tUYIuQ2NdJlXSEdirTohEeN5+ByLYX0=; b=CiokLqU0aUqc1DTO6i4DLDU7GDOCM/+6y6aADmm08P/t+oft9bqpKlufWta3klzxbf Nux9d4qIAJweew36gEU2ur4fHmxqCfuvzy/y02n+hPWGpPM/HmLjuJXLi3cicThkZpYF sCyYxqNtFquXAuhJK5M9rnIdUu+ythe5/+CPX4WPsA306hDE2ryNQRUc1TjoOIGfFbKW UEaCsCzOavdJsLBFB0wXAiAEnhPuW65vjcYO7BgiFm/n1YfUuRZGXwDcmnvQY7cSh+wB kLdKWh1sRYcNqcdxZUZCsrcSORKFpxmsraLVwfV6C3yk+f/mL2PgLMUxFnODkDftRWU6 W8fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 145-v6si5063541pgd.509.2018.09.28.08.43.07; Fri, 28 Sep 2018 08:43:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729555AbeI1WHA (ORCPT + 99 others); Fri, 28 Sep 2018 18:07:00 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36250 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728953AbeI1WHA (ORCPT ); Fri, 28 Sep 2018 18:07:00 -0400 Received: by mail-wm1-f67.google.com with SMTP id n23-v6so2681540wmc.1 for ; Fri, 28 Sep 2018 08:42:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ko/6pZM5qyC5tUYIuQ2NdJlXSEdirTohEeN5+ByLYX0=; b=m9GfYc9clKPX+zjGWmwURCgwjC53jzjiyr/P4o/FAAYuqoSuyWzmbJ+Oadu5mRtVhG +JrHpXx/x2/qmO1k4sL5jgCz6qeV/PIEgwW5I3U8qm3HArybHu/wOKsNyTR5OGHGPWs+ cOOuKB7KcD2unndV29p+4aqpOI+Ko1i/uQ2O6eXnwEHnSB7ZwHCqfnASwOFKDgxnQibD kWS+2GoUp7wXPgjw5Xw41pxoZIBVgLZjuWIotzMH8rnRjpem+uhvz3VmcikUzgbDJu/T wLC/lKlFQ82yAg/CIJnAb5sdrkL/3TkBGVzh3dvgYRPoQ4hk2CJ7oghTcHookknDZKzw ap3g== X-Gm-Message-State: ABuFfoiSBZH/lF+KSN8+pnefvhAygebKJInaPDqWLOYzcyOAOzLZxm/L SarLeZ9EyvbltCb7zxJbRuU23Q== X-Received: by 2002:a1c:c708:: with SMTP id x8-v6mr2198699wmf.116.1538149359555; Fri, 28 Sep 2018 08:42:39 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-212-96-48-140.catv.broadband.hu. [212.96.48.140]) by smtp.gmail.com with ESMTPSA id v2-v6sm2009877wme.36.2018.09.28.08.42.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Sep 2018 08:42:38 -0700 (PDT) From: Miklos Szeredi To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 0/9] fuse: readdir caching Date: Fri, 28 Sep 2018 17:42:25 +0200 Message-Id: <20180928154234.19270-1-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow caching readdir in fuse. Use the page cache for this, which solves cache shrinking on memory pressure. I think it might make sense to extract something like this into a set of VFS helpers, so that other filesystems can also make use of this facility. Thanks, Miklos --- Miklos Szeredi (9): fuse: split out readdir.c fuse: add FOPEN_CACHE_DIR fuse: extract fuse_emit() helper fuse: allow caching readdir fuse: allow using readdir cache fuse: add readdir cache version fuse: use mtime for readdir cache verification fuse: use iversion for readdir cache verification fuse: reduce size of struct fuse_inode fs/fuse/Makefile | 2 +- fs/fuse/dir.c | 293 +++--------------------- fs/fuse/file.c | 10 + fs/fuse/fuse_i.h | 83 ++++++- fs/fuse/inode.c | 11 +- fs/fuse/readdir.c | 567 ++++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/fuse.h | 7 +- 7 files changed, 688 insertions(+), 285 deletions(-) create mode 100644 fs/fuse/readdir.c -- 2.14.3