)]}'
{
  "commit": "2ff1e97587f4d398686f52c07afde3faf3da4e5c",
  "tree": "a25925bb777929c20020df7af7eec696c61c0cce",
  "parents": [
    "5f24162f873f08681804059e6de70d77c3e4cea2"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Tue Mar 19 10:00:09 2024 +0000"
  },
  "committer": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Mon Apr 29 15:01:42 2024 +0100"
  },
  "message": "netfs: Replace PG_fscache by setting folio-\u003eprivate and marking dirty\n\nWhen dirty data is being written to the cache, setting/waiting on/clearing\nthe fscache flag is always done in tandem with setting/waiting on/clearing\nthe writeback flag.  The netfslib buffered write routines wait on and set\nboth flags and the write request cleanup clears both flags, so the fscache\nflag is almost superfluous.\n\nThe reason it isn\u0027t superfluous is because the fscache flag is also used to\nindicate that data just read from the server is being written to the cache.\nThe flag is used to prevent a race involving overlapping direct-I/O writes\nto the cache.\n\nChange this to indicate that a page is in need of being copied to the cache\nby placing a magic value in folio-\u003eprivate and marking the folios dirty.\nThen when the writeback code sees a folio marked in this way, it only\nwrites it to the cache and not to the server.\n\nIf a folio that has this magic value set is modified, the value is just\nreplaced and the folio will then be uplodaded too.\n\nWith this, PG_fscache is no longer required by the netfslib core, 9p and\nafs.\n\nCeph and nfs, however, still need to use the old PG_fscache-based tracking.\nTo deal with this, a flag, NETFS_ICTX_USE_PGPRIV2, now has to be set on the\nflags in the netfs_inode struct for those filesystems.  This reenables the\nuse of PG_fscache in that inode.  9p and afs use the netfslib write helpers\nso get switched over; cifs, for the moment, does page-by-page manual access\nto the cache, so doesn\u0027t use PG_fscache and is unaffected.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nReviewed-by: Jeff Layton \u003cjlayton@kernel.org\u003e\ncc: Matthew Wilcox (Oracle) \u003cwilly@infradead.org\u003e\ncc: Eric Van Hensbergen \u003cericvh@kernel.org\u003e\ncc: Latchesar Ionkov \u003clucho@ionkov.net\u003e\ncc: Dominique Martinet \u003casmadeus@codewreck.org\u003e\ncc: Christian Schoenebeck \u003clinux_oss@crudebyte.com\u003e\ncc: Marc Dionne \u003cmarc.dionne@auristor.com\u003e\ncc: Ilya Dryomov \u003cidryomov@gmail.com\u003e\ncc: Xiubo Li \u003cxiubli@redhat.com\u003e\ncc: Steve French \u003csfrench@samba.org\u003e\ncc: Paulo Alcantara \u003cpc@manguebit.com\u003e\ncc: Ronnie Sahlberg \u003cronniesahlberg@gmail.com\u003e\ncc: Shyam Prasad N \u003csprasad@microsoft.com\u003e\ncc: Tom Talpey \u003ctom@talpey.com\u003e\ncc: Bharath SM \u003cbharathsm@microsoft.com\u003e\ncc: Trond Myklebust \u003ctrond.myklebust@hammerspace.com\u003e\ncc: Anna Schumaker \u003canna@kernel.org\u003e\ncc: netfs@lists.linux.dev\ncc: v9fs@lists.linux.dev\ncc: linux-afs@lists.infradead.org\ncc: ceph-devel@vger.kernel.org\ncc: linux-cifs@vger.kernel.org\ncc: linux-nfs@vger.kernel.org\ncc: linux-fsdevel@vger.kernel.org\ncc: linux-mm@kvack.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee9caf7916fb95931e08e41467cc97ddba950c0b",
      "old_mode": 33188,
      "old_path": "fs/ceph/addr.c",
      "new_id": "28ae4976a4f988ce62a47591a9582731b2158ed0",
      "new_mode": 33188,
      "new_path": "fs/ceph/addr.c"
    },
    {
      "type": "modify",
      "old_id": "7b2e77517f235ecd47264061c04bae2e6d0b7c83",
      "old_mode": 33188,
      "old_path": "fs/ceph/inode.c",
      "new_id": "99561fddcb388b8f1743e7323085ec7dcd26f727",
      "new_mode": 33188,
      "new_path": "fs/ceph/inode.c"
    },
    {
      "type": "modify",
      "old_id": "3298c29b5548398c0026ccf6ab30c32cb290070d",
      "old_mode": 33188,
      "old_path": "fs/netfs/buffered_read.c",
      "new_id": "6d49319c82c691c789548f6eae9ec4ec63485600",
      "new_mode": 33188,
      "new_path": "fs/netfs/buffered_read.c"
    },
    {
      "type": "modify",
      "old_id": "f7455a579f213405bf6576cbd8055c672abfe48b",
      "old_mode": 33188,
      "old_path": "fs/netfs/buffered_write.c",
      "new_id": "57c6eab01261f2a3e4e45b20b2f8e8ab39b36728",
      "new_mode": 33188,
      "new_path": "fs/netfs/buffered_write.c"
    },
    {
      "type": "modify",
      "old_id": "43a651ed826413d8ea60dcb240950e2a074aca28",
      "old_mode": 33188,
      "old_path": "fs/netfs/fscache_io.c",
      "new_id": "5028f2ae30dae4e20cddad2731fc82bff7ca50dd",
      "new_mode": 33188,
      "new_path": "fs/netfs/fscache_io.c"
    },
    {
      "type": "modify",
      "old_id": "ec7045d24400df09bd5a933401a7fbb2d36a3d24",
      "old_mode": 33188,
      "old_path": "fs/netfs/internal.h",
      "new_id": "156ab138e22418ecdb1f6044a0a515c38c458a08",
      "new_mode": 33188,
      "new_path": "fs/netfs/internal.h"
    },
    {
      "type": "modify",
      "old_id": "4261ad6c55b664a7e3da006d007de03664790641",
      "old_mode": 33188,
      "old_path": "fs/netfs/io.c",
      "new_id": "b3b9827a9709896969a20e93d0ad6a7ab2e41a29",
      "new_mode": 33188,
      "new_path": "fs/netfs/io.c"
    },
    {
      "type": "modify",
      "old_id": "5e77618a79409c253ab21aa51c186a07f691f356",
      "old_mode": 33188,
      "old_path": "fs/netfs/main.c",
      "new_id": "c5a73c9ed1260741fd96476b3ba2b56adca7a1ef",
      "new_mode": 33188,
      "new_path": "fs/netfs/main.c"
    },
    {
      "type": "modify",
      "old_id": "90051ced8e2a879827e54d4b50c976bc11f6b759",
      "old_mode": 33188,
      "old_path": "fs/netfs/misc.c",
      "new_id": "bc1fc54fb724709483fdfdcbf32e106b4aba9716",
      "new_mode": 33188,
      "new_path": "fs/netfs/misc.c"
    },
    {
      "type": "modify",
      "old_id": "610ceb5bd86c08ba7c61905d07d19092940f44ae",
      "old_mode": 33188,
      "old_path": "fs/netfs/objects.c",
      "new_id": "72b52f0702708848621ec24a8d775006bbcb8b41",
      "new_mode": 33188,
      "new_path": "fs/netfs/objects.c"
    },
    {
      "type": "modify",
      "old_id": "e3cb4923316b2cc044fd87ef6399c867ba19663c",
      "old_mode": 33188,
      "old_path": "fs/nfs/fscache.h",
      "new_id": "814363d1d7c795514ec566372cbc3eb042361cb4",
      "new_mode": 33188,
      "new_path": "fs/nfs/fscache.h"
    },
    {
      "type": "modify",
      "old_id": "6e8562cbcc43221e50cfd2b5698a99b2f7c2cb3f",
      "old_mode": 33188,
      "old_path": "include/linux/fscache.h",
      "new_id": "9de27643607fb16a20e7ed3dbcd2c564e8e600aa",
      "new_mode": 33188,
      "new_path": "include/linux/fscache.h"
    },
    {
      "type": "modify",
      "old_id": "100cbb261269d1921bff6e616e86223ee9e5512c",
      "old_mode": 33188,
      "old_path": "include/linux/netfs.h",
      "new_id": "f5e9c5f84a0c0b27b0b37a4f50a104b83fe3ef8e",
      "new_mode": 33188,
      "new_path": "include/linux/netfs.h"
    },
    {
      "type": "modify",
      "old_id": "447a8c21cf57df7d30de48efcd27c435fab2c308",
      "old_mode": 33188,
      "old_path": "include/trace/events/netfs.h",
      "new_id": "e03fafb0c1e3bdacbcb1c24220f15e14d400acb2",
      "new_mode": 33188,
      "new_path": "include/trace/events/netfs.h"
    }
  ]
}
