No description
  • C 96.8%
  • Assembly 0.9%
  • Rust 0.7%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Christian Brauner 86fb594115 netfs support library
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqG5UsNXhtOCrfGQP+7dXa6fLC2sFAmWNRBEACgkQ+7dXa6fL
 C2vQPBAAh36FEN5497raWKakNfFnsvctNO4b7dYkYVZsKDxf/tZY/FoUe1VKYp6m
 49ZwBHp5kwmr1baWBqa5JS/t4SkgRYwXB0qp2J7maCA7vqglDKMyPVJgh+bohVHU
 5pUvinrtk5BzVfEqU2FW7fhyr2uFNN4N+9UeSZBz7GIAMFaULovVIRGtYGLG2Rbk
 fCx05eLSEh3DKarLvU8A32jNI3TfPXIwPULS8VxcR/G7Tl6iqDXRysofizCtU+zL
 Xy/8KLp1juw1BYbHzv24A/GxJqTSHV1GayfRaAOi1fSDNTz4Wzmjmg6lpwio52gU
 Z8VbBPaaBnu+83paWsKYUFMbr/rncIw7W83NCnLvn8SqWPp1cXYFRycjA5FN+mjj
 E+DZoGT/4Y/tEg/vxlF39RO+lWjI6zzQU9qc6dEj0FFaEDM31x6ssjHXTB6l9bW0
 VG3vFfUPnNigOYbB/eJfcx96aAOlzJPZrX1qK9fwJAuyT8ZBwEnwZg8keYqpAgoO
 jfyVLaPQ8fSEp/raFnTeyS1CUpeYq6VPCg2EKUgu+L/IestYkkP53zShXtzfIB1Y
 LrZmZvX+8lIOJ/WHHYbGLUUqr/tOzzvg1mNyXWX7XaGfCN+HWpoobcAY2jTKKGnG
 6aYz3uP/Tc6khy1gVSw2P82pk3OEiJy5mnHQh8cRrUY8R93n3pE=
 =1ta4
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZY1PVgAKCRCRxhvAZXjc
 oieIAP9PZUj2r7frbtczRiIC9VukSjiPuXvcvkX9E8p54GlyRwD/cRSlawwptR6F
 Q0LvrjdgaxW5ppwkgJvVdm9+52BdZwY=
 =9fJW
 -----END PGP SIGNATURE-----

Merge tag 'netfs-lib-20231228' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

Pull netfs updates from David Howells:

The main aims of these patches are to get high-level I/O and knowledge of
the pagecache out of the filesystem drivers as much as possible and to get
rid, as much of possible, of the knowledge that pages/folios exist.
Further, I would like to see ->write_begin, ->write_end and
->launder_folio go away.

Features that are added by these patches to that which is already there in
netfslib:

 (1) NFS-style (and Ceph-style) locking around DIO vs buffered I/O calls to
     prevent these from happening at the same time.  mmap'd I/O can, of
     necessity, happen at any time ignoring these locks.

 (2) Support for unbuffered I/O.  The data is kept in the bounce buffer and
     the pagecache is not used.  This can be turned on with an inode flag.

 (3) Support for direct I/O.  This is basically unbuffered I/O with some
     extra restrictions and no RMW.

 (4) Support for using a bounce buffer in an operation.  The bounce buffer
     may be bigger than the target data/buffer, allowing for crypto
     rounding.

 (5) ->write_begin() and ->write_end() are ignored in favour of merging all
     of that into one function, netfs_perform_write(), thereby avoiding the
     function pointer traversals.

 (6) Support for write-through caching in the pagecache.
     netfs_perform_write() adds the pages is modifies to an I/O operation
     as it goes and directly marks them writeback rather than dirty.  When
     writing back from write-through, it limits the range written back.
     This should allow CIFS to deal with byte-range mandatory locks
     correctly.

 (7) O_*SYNC and RWF_*SYNC writes use write-through rather than writing to
     the pagecache and then flushing afterwards.  An AIO O_*SYNC write will
     notify of completion when the sub-writes all complete.

 (8) Support for write-streaming where modifed data is held in !uptodate
     folios, with a private struct attached indicating the range that is
     valid.

 (9) Support for write grouping, multiplexing a pointer to a group in the
     folio private data with the write-streaming data.  The writepages
     algorithm only writes stuff back that's in the nominated group.  This
     is intended for use by Ceph to write is snaps in order.

(10) Skipping reads for which we know the server could only supply zeros or
     EOF (for instance if we've done a local write that leaves a hole in
     the file and extends the local inode size).

General notes:

 (1) The fscache module is merged into the netfslib module to avoid cyclic
     exported symbol usage that prevents either module from being loaded.

 (2) Some helpers from fscache are reassigned to netfslib by name.

 (3) netfslib now makes use of folio->private, which means the filesystem
     can't use it.

 (4) The filesystem provides wrappers to call the write helpers, allowing
     it to do pre-validation, oplock/capability fetching and the passing in
     of write group info.

 (5) I want to try flushing the data when tearing down an inode before
     invalidating it to try and render launder_folio unnecessary.

 (6) Write-through caching will generate and dispatch write subrequests as
     it gathers enough data to hit wsize and has whole pages that at least
     span that size.  This needs to be a bit more flexible, allowing for a
     filesystem such as CIFS to have a variable wsize.

 (7) The filesystem driver is just given read and write calls with an
     iov_iter describing the data/buffer to use.  Ideally, they don't see
     pages or folios at all.  A function, extract_iter_to_sg(), is already
     available to decant part of an iterator into a scatterlist for crypto
     purposes.

AFS notes:

 (1) I pushed a pair of patches that clean up the trace header down to the
     base so that they can be shared with another branch.

9P notes:

 (1) Most of xfstests now pass - more, in fact, since upstream 9p lacks a
     writepages method and can't handle mmap writes.  An occasional oops
     (and sometimes panic) happens somewhere in the pathwalk/FID handling
     code that is unrelated to these changes.

 (2) Writes should now occur in larger-than-page-sized chunks.

 (3) It should be possible to turn on multipage folio support in 9P now.

All in all these patches remove a little over 800 lines from AFS, 300
from 9P, albeit with around 3000 lines added to netfs. Hopefully, I will
be able to remove a bunch of lines from Ceph too.

I've split the CIFS patches out to a separate branch, cifs-netfs, where
a further 2000+ lines are removed.  I can run a certain amount of
xfstests on CIFS, though I'm running into ksmbd issues and not all the
tests work correctly because of issues between fallocate and what the
SMB protocol actually supports.

I've also dropped the content-crypto patches out for the moment as
they're only usable by the ceph changes which I'm still working on.

The patch to use PG_writeback instead of PG_fscache for writing to the
cache has also been deferred, pending 9p, afs, ceph and cifs all being
converted.

* tag 'netfs-lib-20231228' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (40 commits)
  9p: Use netfslib read/write_iter
  afs: Use the netfs write helpers
  netfs: Export the netfs_sreq tracepoint
  netfs: Optimise away reads above the point at which there can be no data
  netfs: Implement a write-through caching option
  netfs: Provide a launder_folio implementation
  netfs: Provide a writepages implementation
  netfs, cachefiles: Pass upper bound length to allow expansion
  netfs: Provide netfs_file_read_iter()
  netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite()
  netfs: Implement buffered write API
  netfs: Implement unbuffered/DIO write support
  netfs: Implement unbuffered/DIO read support
  netfs: Allocate multipage folios in the writepath
  netfs: Make netfs_read_folio() handle streaming-write pages
  netfs: Provide func to copy data to pagecache for buffered write
  netfs: Dispatch write requests to process a writeback slice
  netfs: Prep to use folio->private for write grouping and streaming write
  netfs: Make the refcounting of netfs_begin_read() easier to use
  netfs: Make netfs_put_request() handle a NULL pointer
  ...

Signed-off-by: Christian Brauner <brauner@kernel.org>
History 2023-12-28 11:34:22 +01:00
arch netfs, fscache: Combine fscache with netfs 2023-12-24 15:08:46 +00:00
block block-6.7-2023-12-01 2023-12-02 06:39:30 +09:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto This push fixes a regression in ahash and hides the Kconfig sub-options for the jitter RNG. 2023-11-09 17:04:58 -08:00
Documentation netfs, fscache: Remove ->begin_cache_operation 2023-12-24 15:08:48 +00:00
drivers SCSI fixes on 20231223 2023-12-23 11:58:53 -08:00
fs 9p: Use netfslib read/write_iter 2023-12-28 09:45:28 +00:00
include afs: Use the netfs write helpers 2023-12-28 09:45:28 +00:00
init As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
io_uring io_uring/cmd: fix breakage in SOCKET_URING_OP_SIOC* implementation 2023-12-14 16:52:13 -07:00
ipc Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
kernel Tracing fixes for 6.7: 2023-12-21 09:31:45 -08:00
lib printk changes for 6.8 2023-12-22 13:41:29 -08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm netfs: Implement unbuffered/DIO write support 2023-12-28 09:45:24 +00:00
net Two small fixes scheduled for stable trees 2023-12-22 07:50:34 -08:00
rust Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
samples Landlock updates for v6.7-rc1 2023-11-03 09:28:53 -10:00
scripts sign-file: Fix incorrect return values check 2023-12-13 12:55:11 -08:00
security keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2023-12-21 13:47:38 +00:00
sound ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel 2023-12-21 09:24:01 +01:00
tools RISC-V 2023-12-22 19:22:20 -08:00
usr arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
virt KVM/arm64 fixes for 6.7, part #2 2023-12-22 18:03:54 -05:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap mailmap: add entries for Geliang Tang 2023-12-17 20:54:22 +00:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: drop Antti Palosaari 2023-12-06 16:12:49 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS netfs, fscache: Move fs/fscache/* into fs/netfs/ 2023-12-24 11:36:00 +00:00
Makefile Linux 6.7-rc7 2023-12-23 16:25:56 -08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.