<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>c8383054 - cachefiles: notify the user daemon when looking up cookie</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#c8383054</link>
        <description>cachefiles: notify the user daemon when looking up cookieFscache/CacheFiles used to serve as a local cache for a remotenetworking fs. A new on-demand read mode will be introduced forCacheFiles, which can boost the scenario where on-demand read semanticsare needed, e.g. container image distribution.The essential difference between these two modes is seen when a cachemiss occurs: In the original mode, the netfs will fetch the data fromthe remote server and then write it to the cache file; in on-demandread mode, fetching the data and writing it into the cache is delegatedto a user daemon.As the first step, notify the user daemon when looking up cookie. Inthis case, an anonymous fd is sent to the user daemon, through which theuser daemon can write the fetched data to the cache file. Since the userdaemon may move the anonymous fd around, e.g. through dup(), an objectID uniquely identifying the cache file is also attached.Also add one advisory flag (FSCACHE_ADV_WANT_CACHE_SIZE) suggesting thatthe cache file size shall be retrieved at runtime. This helps thescenario where one cache file contains multiple netfs files, e.g. forthe purpose of deduplication. In this case, netfs itself has no idea thesize of the cache file, whilst the user daemon should give the hint onit.Signed-off-by: Jeffle Xu &lt;jefflexu@linux.alibaba.com&gt;Link: https://lore.kernel.org/r/20220509074028.74954-3-jefflexu@linux.alibaba.comAcked-by: David Howells &lt;dhowells@redhat.com&gt;Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Mon, 25 Apr 2022 12:21:24 +0000</pubDate>
        <dc:creator>Jeffle Xu &lt;jefflexu@linux.alibaba.com&gt;</dc:creator>
    </item>
<item>
        <title>287fd611 - cachefiles: Implement begin and end I/O operation</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#287fd611</link>
        <description>cachefiles: Implement begin and end I/O operationImplement the methods for beginning and ending an I/O operation.When called to begin an I/O operation, we are guaranteed that the cookiehas reached a certain stage (we&apos;re called by fscache after it has done asuitable wait).If a file is available, we paste a ref over into the cache resources forthe I/O routines to use.  This means that the object can be invalidatedwhilst the I/O is ongoing without the need to synchronise as the filepointer in the object is replaced, but the file pointer in the cacheresources is unaffected.Ending the operation just requires ditching any refs we have and droppingthe access guarantee that fscache got for us on the cookie.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819645033.215744.2199344081658268312.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906951916.143852.9531384743995679857.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967161222.1823006.4461476204800357263.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021559030.640689.3684291785218094142.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Thu, 21 Oct 2021 10:05:53 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>72b95785 - cachefiles: Implement metadata/coherency data storage in xattrs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#72b95785</link>
        <description>cachefiles: Implement metadata/coherency data storage in xattrsUse an xattr on each backing file in the cache to store some metadata, suchas the content type and the coherency data.Five content types are defined: (0) No content stored. (1) The file contains a single monolithic blob and must be all or nothing.     This would be used for something like an AFS directory or a symlink. (2) The file is populated with content completely up to a point with     nothing beyond that. (3) The file has a map attached and is sparsely populated.  This would be     stored in one or more additional xattrs. (4) The file is dirty, being in the process of local modification and the     contents are not necessarily represented correctly by the metadata.     The file should be deleted if this is seen on binding.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819641320.215744.16346770087799536862.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906942248.143852.5423738045012094252.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967151734.1823006.9301249989443622576.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021550471.640689.553853918307994335.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Wed, 17 Nov 2021 16:11:07 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>5d439467 - cachefiles: Implement key to filename encoding</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#5d439467</link>
        <description>cachefiles: Implement key to filename encodingImplement a function to encode a binary cookie key as something that can beused as a filename.  Four options are considered: (1) All printable chars with no &apos;/&apos; characters.  Prepend a &apos;D&apos; to indicate     the encoding but otherwise use as-is. (2) Appears to be an array of __be32.  Encode as &apos;S&apos; plus a list of     hex-encoded 32-bit ints separated by commas.  If a number is 0, it is     rendered as &quot;&quot; instead of &quot;0&quot;. (3) Appears to be an array of __le32.  Encoded as (2) but with a &apos;T&apos;     encoding prefix. (4) Encoded as base64 with an &apos;E&apos; prefix plus a second char indicating how     much padding is involved.  A non-standard base64 encoding is used     because &apos;/&apos; cannot be used in the encoded form.If (1) is not possible, whichever of (2), (3) or (4) produces the shorteststring is selected (hex-encoding a number may be less dense than base64encoding it).Note that the prefix characters have to be selected from the set [DEIJST@]lest cachefilesd remove the files because it recognise the name.Changes=======ver #2: - Fix a short allocation that didn&apos;t allow for a string terminator[1]Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/bcefb8f2-576a-b3fc-cc29-89808ebfd7c1@linux.alibaba.com/ [1]Link: https://lore.kernel.org/r/163819640393.215744.15212364106412961104.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906940529.143852.17352132319136117053.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967149827.1823006.6088580775428487961.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021549223.640689.14762875188193982341.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Wed, 17 Nov 2021 15:48:06 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>fe2140e2 - cachefiles: Implement volume support</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#fe2140e2</link>
        <description>cachefiles: Implement volume supportImplement support for creating the directory layout for a volume on diskand setting up and withdrawing volume caching.Each volume has a directory named for the volume key under the root of thecache (prefixed with an &apos;I&apos; to indicate to cachefilesd that it&apos;s an index)and then creates a bunch of hash bucket subdirectories under that (named as&apos;@&apos; plus a hex number) in which cookie files will be created.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819635314.215744.13081522301564537723.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906936397.143852.17788457778396467161.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967143860.1823006.7185205806080225038.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021545212.640689.5064821392307582927.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Thu, 21 Oct 2021 08:55:21 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>d1065b0a - cachefiles: Implement cache registration and withdrawal</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#d1065b0a</link>
        <description>cachefiles: Implement cache registration and withdrawalDo the following: (1) Fill out cachefiles_daemon_add_cache() so that it sets up the cache     directories and registers the cache with cachefiles. (2) Add a function to do the top-level part of cache withdrawal and     unregistration. (3) Add a function to sync a cache.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819633175.215744.10857127598041268340.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906935445.143852.15545194974036410029.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967142904.1823006.244055483596047072.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021543872.640689.14370017789605073222.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Fri, 26 Nov 2021 14:29:06 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>1bd9c4e4 - vfs, cachefiles: Mark a backing file in use with an inode flag</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#1bd9c4e4</link>
        <description>vfs, cachefiles: Mark a backing file in use with an inode flagUse an inode flag, S_KERNEL_FILE, to mark that a backing file is in use bythe kernel to prevent cachefiles or other kernel services from interferingwith that file.Alter rmdir to reject attempts to remove a directory marked with this flag.This is used by cachefiles to prevent cachefilesd from removing them.Using S_SWAPFILE instead isn&apos;t really viable as that has other effects inthe I/O paths.Changes=======ver #3: - Check for the object pointer being NULL in the tracepoints rather than   the caller.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819630256.215744.4815885535039369574.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906931596.143852.8642051223094013028.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967141000.1823006.12920680657559677789.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021541207.640689.564689725898537127.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Thu, 18 Nov 2021 08:58:08 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>80f94f29 - cachefiles: Provide a function to check how much space there is</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#80f94f29</link>
        <description>cachefiles: Provide a function to check how much space there isProvide a function to check how much space there is.  This also flips thestate on the cache and will signal the daemon to inform it of the changeand to ask it to do some culling if necessary.We will also need to subtract the amount of data currently being written tothe cache (cache-&gt;b_writing) from the amount of available space to avoidhitting ENOSPC accidentally.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819629322.215744.13457425294680841213.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906930100.143852.1681026700865762069.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967140058.1823006.7781243664702837128.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021539957.640689.12477177372616805706.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Thu, 21 Oct 2021 07:59:46 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>8667d434 - cachefiles: Register a miscdev and parse commands over it</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#8667d434</link>
        <description>cachefiles: Register a miscdev and parse commands over itRegister a misc device with which to talk to the daemon.  The misc deviceholds a cache set up through it around and closing the device kills thecache.cachefilesd communicates with the kernel by passing it single-line textcommands.  Parse these and use them to parameterise the cache state.  Thisdoes not implement the command to actually bring a cache online.  That&apos;sleft for later.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819628388.215744.17712097043607299608.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906929128.143852.14065207858943654011.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967139085.1823006.3514846391807454287.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021538400.640689.9172006906288062041.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Fri, 26 Nov 2021 15:12:07 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>254947d4 - cachefiles: Add security derivation</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#254947d4</link>
        <description>cachefiles: Add security derivationImplement code to derive a new set of creds for the cachefiles to use whenmaking VFS or I/O calls and to change the auditing info since theapplication interacting with the network filesystem is not accessing thecache directly.  Cachefiles uses override_creds() to change the effectivecreds temporarily.set_security_override_from_ctx() is called to derive the LSM &apos;label&apos; thatthe cachefiles driver will act with.  set_create_files_as() is called todetermine the LSM &apos;label&apos; that will be applied to files and directoriescreated in the cache.  These functions alter the new creds.Also implement a couple of functions to wrap the calls to begin/end credoverriding.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819627469.215744.3603633690679962985.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906928172.143852.15886637013364286786.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967138138.1823006.7620933448261939504.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021537001.640689.4081334436031700558.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Fri, 26 Nov 2021 14:59:10 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>a70f6526 - cachefiles: Add some error injection support</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#a70f6526</link>
        <description>cachefiles: Add some error injection supportAdd support for injecting ENOSPC or EIO errors.  This needs to be enabledby CONFIG_CACHEFILES_ERROR_INJECTION=y.  Once enabled, ENOSPC on thingslike write and mkdir can be triggered by:        echo 1 &gt;/proc/sys/cachefiles/error_injectionand EIO can be triggered on most operations by:        echo 2 &gt;/proc/sys/cachefiles/error_injectionSigned-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819624706.215744.6911916249119962943.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906925343.143852.5465695512984025812.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967134412.1823006.7354285948280296595.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021532340.640689.18209494225772443698.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Thu, 21 Oct 2021 07:15:26 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>77443f61 - cachefiles: Introduce rewritten driver</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#77443f61</link>
        <description>cachefiles: Introduce rewritten driverIntroduce basic skeleton of the rewritten cachefiles driver includingconfig options so that it can be enabled for compilation.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819622766.215744.9108359326983195047.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906923341.143852.3856498104256721447.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967130320.1823006.15791456613198441566.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021528993.640689.9069695476048171884.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Fri, 26 Nov 2021 14:32:29 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>6ae9bd8b - fscache, cachefiles: Remove the histogram stuff</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#6ae9bd8b</link>
        <description>fscache, cachefiles: Remove the histogram stuffRemove the histogram stuff as it&apos;s mostly going to be outdated.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/162431195953.2908479.16770977195634296638.stgit@warthog.procyon.org.uk/

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Wed, 12 May 2021 08:40:19 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>26aaeffc - fscache, cachefiles: Add alternate API to use kiocb for read/write to cache</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#26aaeffc</link>
        <description>fscache, cachefiles: Add alternate API to use kiocb for read/write to cacheAdd an alternate API by which the cache can be accessed through a kiocb,doing async DIO, rather than using the current API that tells the cachewhere all the pages are.The new API is intended to be used in conjunction with the netfs helperlibrary.  A filesystem must pick one or the other and not mix them.Filesystems wanting to use the new API must #define FSCACHE_USE_NEW_IO_APIbefore #including the header.  This prevents them from continuing to usethe old API at the same time as there are incompatibilities in how thePG_fscache page bit is used.Changes:v6: - Provide a routine to shape a write so that the start and length can be   aligned for DIO[3].v4: - Use the vfs_iocb_iter_read/write() helpers[1] - Move initial definition of fscache_begin_read_operation() here. - Remove a commented-out line[2] - Combine ki-&gt;term_func calls in cachefiles_read_complete()[2]. - Remove explicit NULL initialiser[2]. - Remove extern on func decl[2]. - Put in param names on func decl[2]. - Remove redundant else[2]. - Fill out the kdoc comment for fscache_begin_read_operation(). - Rename fs/fscache/page2.c to io.c to match later patches.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-and-tested-by: Jeff Layton &lt;jlayton@kernel.org&gt;Tested-by: Dave Wysochanski &lt;dwysocha@redhat.com&gt;Tested-By: Marc Dionne &lt;marc.dionne@auristor.com&gt;cc: Christoph Hellwig &lt;hch@lst.de&gt;cc: linux-cachefs@redhat.comcc: linux-afs@lists.infradead.orgcc: linux-nfs@vger.kernel.orgcc: linux-cifs@vger.kernel.orgcc: ceph-devel@vger.kernel.orgcc: v9fs-developer@lists.sourceforge.netcc: linux-fsdevel@vger.kernel.orgLink: https://lore.kernel.org/r/20210216102614.GA27555@lst.de/ [1]Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [2]Link: https://lore.kernel.org/r/161781047695.463527.7463536103593997492.stgit@warthog.procyon.org.uk/ [3]Link: https://lore.kernel.org/r/161118142558.1232039.17993829899588971439.stgit@warthog.procyon.org.uk/ # rfcLink: https://lore.kernel.org/r/161161037850.2537118.8819808229350326503.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/161340402057.1303470.8038373593844486698.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/161539545919.286939.14573472672781434757.stgit@warthog.procyon.org.uk/ # v4Link: https://lore.kernel.org/r/161653801477.2770958.10543270629064934227.stgit@warthog.procyon.org.uk/ # v5Link: https://lore.kernel.org/r/161789084517.6155.12799689829859169640.stgit@warthog.procyon.org.uk/ # v6

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Mon, 22 Feb 2021 11:39:47 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>b2441318 - License cleanup: add SPDX GPL-2.0 license identifier to files with no license</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#b2441318</link>
        <description>License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseMany source files in the tree are missing licensing information, whichmakes it harder for compliance tools to determine the correct license.By default all files without license information are under the defaultlicense of the kernel, which is GPL version 2.Update the files which contain no license information with the &apos;GPL-2.0&apos;SPDX license identifier.  The SPDX identifier is a legally bindingshorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart andPhilippe Ombredanne.How this work was done:Patches were generated and checked against linux-4.14-rc6 for a subset ofthe use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up caseswhere non-standard license headers were used, and references to licensehad to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied toa file was done in a spreadsheet of side by side results from of theoutput of two independent scanners (ScanCode &amp; Windriver) producing SPDXtag:value files created by Philippe Ombredanne.  Philippe prepared thebase worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 filesassessed.  Kate Stewart did a file by file comparison of the scannerresults in the spreadsheet to determine which SPDX license identifier(s)to be applied to the file. She confirmed any determination that was notimmediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained &gt;5   lines of source - File already had some variant of a license header in it (even if &lt;5   lines).All documentation files were explicitly excluded.The following heuristics were used to determine which SPDX licenseidentifiers to apply. - when both scanners couldn&apos;t find any license traces, file was   considered to have no license information in it, and the top level   COPYING file license applied.   For non */uapi/* files that summary was:   SPDX license identifier                            # files   ---------------------------------------------------|-------   GPL-2.0                                              11139   and resulted in the first patch in this series.   If that file was a */uapi/* path one, it was &quot;GPL-2.0 WITH   Linux-syscall-note&quot; otherwise it was &quot;GPL-2.0&quot;.  Results of that was:   SPDX license identifier                            # files   ---------------------------------------------------|-------   GPL-2.0 WITH Linux-syscall-note                        930   and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one   of the */uapi/* ones, it was denoted with the Linux-syscall-note if   any GPL family license was found in the file or had no licensing in   it (per prior point).  Results summary:   SPDX license identifier                            # files   ---------------------------------------------------|------   GPL-2.0 WITH Linux-syscall-note                       270   GPL-2.0+ WITH Linux-syscall-note                      169   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17   LGPL-2.1+ WITH Linux-syscall-note                      15   GPL-1.0+ WITH Linux-syscall-note                       14   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5   LGPL-2.0+ WITH Linux-syscall-note                       4   LGPL-2.1 WITH Linux-syscall-note                        3   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1   and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became   the concluded license(s). - when there was disagreement between the two scanners (one detected a   license but the other didn&apos;t, or they both detected different   licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file   resulted in a clear resolution of the license that should apply (and   which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was   confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier,   the file was flagged for further research and to be revisited later   in time.In total, over 70 hours of logged manual review was done on thespreadsheet to determine the SPDX license identifiers to apply to thesource files by Kate, Philippe, Thomas and, in some cases, confirmationby lawyers working with the Linux Foundation.Kate also obtained a third independent scan of the 4.13 code base fromFOSSology, and compared selected files where the other two scannersdisagreed against that SPDX file, to see if there was new insights.  TheWindriver scanner is based on an older version of FOSSology in part, sothey are related.Thomas did random spot checks in about 500 files from the spreadsheetsfor the uapi headers and agreed with SPDX license identifier in thefiles he inspected. For the non-uapi files Thomas did random spot checksin about 15000 files.In initial set of patches against 4.14-rc6, 3 files were found to havecopy/paste license identifier errors, and have been fixed to reflect thecorrect identifier.Additionally Philippe spent 10 hours this week doing a detailed manualinspection and review of the 12,461 patched files from the initial patchversion early this week with: - a full scancode scan run, collecting the matched texts, detected   license ids and scores - reviewing anything where there was a license detected (about 500+   files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied   SPDX license was correctThis produced a worksheet with 20 files needing minor correction.  Thisworksheet was then exported into 3 different .csv files for thedifferent types of files to be modified.These .csv files were then reviewed by Greg.  Thomas wrote a script toparse the csv files and add the proper SPDX tag to the file, in theformat that the file expected.  This script was further refined by Gregbased on the output to detect more types of files automatically and todistinguish between header and source .c files (which need differentcomment types.)  Finally Greg ran the script using the .csv files togenerate the patches.Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;Reviewed-by: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Wed, 01 Nov 2017 14:07:57 +0000</pubDate>
        <dc:creator>Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</dc:creator>
    </item>
<item>
        <title>9ae326a6 - CacheFiles: A cache that backs onto a mounted filesystem</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Makefile#9ae326a6</link>
        <description>CacheFiles: A cache that backs onto a mounted filesystemAdd an FS-Cache cache-backend that permits a mounted filesystem to be used as abacking store for the cache.CacheFiles uses a userspace daemon to do some of the cache management - such asreaping stale nodes and culling.  This is called cachefilesd and lives in/sbin.  The source for the daemon can be downloaded from:	http://people.redhat.com/~dhowells/cachefs/cachefilesd.cAnd an example configuration from:	http://people.redhat.com/~dhowells/cachefs/cachefilesd.confThe filesystem and data integrity of the cache are only as good as those of thefilesystem providing the backing services.  Note that CacheFiles does notattempt to journal anything since the journalling interfaces of the variousfilesystems are very specific in nature.CacheFiles creates a misc character device - &quot;/dev/cachefiles&quot; - that is usedto communication with the daemon.  Only one thing may have this open at once,and whilst it is open, a cache is at least partially in existence.  The daemonopens this and sends commands down it to control the cache.CacheFiles is currently limited to a single cache.CacheFiles attempts to maintain at least a certain percentage of free space onthe filesystem, shrinking the cache by culling the objects it contains to makespace if necessary - see the &quot;Cache Culling&quot; section.  This means it can beplaced on the same medium as a live set of data, and will expand to make use ofspare space and automatically contract when the set of data requires morespace.============REQUIREMENTS============The use of CacheFiles and its daemon requires the following features to beavailable in the system and in the cache filesystem:	- dnotify.	- extended attributes (xattrs).	- openat() and friends.	- bmap() support on files in the filesystem (FIBMAP ioctl).	- The use of bmap() to detect a partial page at the end of the file.It is strongly recommended that the &quot;dir_index&quot; option is enabled on Ext3filesystems being used as a cache.=============CONFIGURATION=============The cache is configured by a script in /etc/cachefilesd.conf.  These commandsset up cache ready for use.  The following script commands are available: (*) brun &lt;N&gt;% (*) bcull &lt;N&gt;% (*) bstop &lt;N&gt;% (*) frun &lt;N&gt;% (*) fcull &lt;N&gt;% (*) fstop &lt;N&gt;%	Configure the culling limits.  Optional.  See the section on culling	The defaults are 7% (run), 5% (cull) and 1% (stop) respectively.	The commands beginning with a &apos;b&apos; are file space (block) limits, those	beginning with an &apos;f&apos; are file count limits. (*) dir &lt;path&gt;	Specify the directory containing the root of the cache.  Mandatory. (*) tag &lt;name&gt;	Specify a tag to FS-Cache to use in distinguishing multiple caches.	Optional.  The default is &quot;CacheFiles&quot;. (*) debug &lt;mask&gt;	Specify a numeric bitmask to control debugging in the kernel module.	Optional.  The default is zero (all off).  The following values can be	OR&apos;d into the mask to collect various information:		1	Turn on trace of function entry (_enter() macros)		2	Turn on trace of function exit (_leave() macros)		4	Turn on trace of internal debug points (_debug())	This mask can also be set through sysfs, eg:		echo 5 &gt;/sys/modules/cachefiles/parameters/debug==================STARTING THE CACHE==================The cache is started by running the daemon.  The daemon opens the cache device,configures the cache and tells it to begin caching.  At that point the cachebinds to fscache and the cache becomes live.The daemon is run as follows:	/sbin/cachefilesd [-d]* [-s] [-n] [-f &lt;configfile&gt;]The flags are: (*) -d	Increase the debugging level.  This can be specified multiple times and	is cumulative with itself. (*) -s	Send messages to stderr instead of syslog. (*) -n	Don&apos;t daemonise and go into background. (*) -f &lt;configfile&gt;	Use an alternative configuration file rather than the default one.===============THINGS TO AVOID===============Do not mount other things within the cache as this will cause problems.  Thekernel module contains its own very cut-down path walking facility that ignoresmountpoints, but the daemon can&apos;t avoid them.Do not create, rename or unlink files and directories in the cache whilst thecache is active, as this may cause the state to become uncertain.Renaming files in the cache might make objects appear to be other objects (thefilename is part of the lookup key).Do not change or remove the extended attributes attached to cache files by thecache as this will cause the cache state management to get confused.Do not create files or directories in the cache, lest the cache get confused orserve incorrect data.Do not chmod files in the cache.  The module creates things with minimalpermissions to prevent random users being able to access them directly.=============CACHE CULLING=============The cache may need culling occasionally to make space.  This involvesdiscarding objects from the cache that have been used less recently thananything else.  Culling is based on the access time of data objects.  Emptydirectories are culled if not in use.Cache culling is done on the basis of the percentage of blocks and thepercentage of files available in the underlying filesystem.  There are six&quot;limits&quot;: (*) brun (*) frun     If the amount of free space and the number of available files in the cache     rises above both these limits, then culling is turned off. (*) bcull (*) fcull     If the amount of available space or the number of available files in the     cache falls below either of these limits, then culling is started. (*) bstop (*) fstop     If the amount of available space or the number of available files in the     cache falls below either of these limits, then no further allocation of     disk space or files is permitted until culling has raised things above     these limits again.These must be configured thusly:	0 &lt;= bstop &lt; bcull &lt; brun &lt; 100	0 &lt;= fstop &lt; fcull &lt; frun &lt; 100Note that these are percentages of available space and available files, and do_not_ appear as 100 minus the percentage displayed by the &quot;df&quot; program.The userspace daemon scans the cache to build up a table of cullable objects.These are then culled in least recently used order.  A new scan of the cache isstarted as soon as space is made in the table.  Objects will be skipped iftheir atimes have changed or if the kernel module says it is still using them.===============CACHE STRUCTURE===============The CacheFiles module will create two directories in the directory it wasgiven: (*) cache/ (*) graveyard/The active cache objects all reside in the first directory.  The CacheFileskernel module moves any retired or culled objects that it can&apos;t simply unlinkto the graveyard from which the daemon will actually delete them.The daemon uses dnotify to monitor the graveyard directory, and will deleteanything that appears therein.The module represents index objects as directories with the filename &quot;I...&quot; or&quot;J...&quot;.  Note that the &quot;cache/&quot; directory is itself a special index.Data objects are represented as files if they have no children, or directoriesif they do.  Their filenames all begin &quot;D...&quot; or &quot;E...&quot;.  If represented as adirectory, data objects will have a file in the directory called &quot;data&quot; thatactually holds the data.Special objects are similar to data objects, except their filenames begin&quot;S...&quot; or &quot;T...&quot;.If an object has children, then it will be represented as a directory.Immediately in the representative directory are a collection of directoriesnamed for hash values of the child object keys with an &apos;@&apos; prepended.  Intothis directory, if possible, will be placed the representations of the childobjects:	INDEX     INDEX      INDEX                             DATA FILES	========= ========== ================================= ================	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...DB1ry	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...N22ry	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...FP1ryIf the key is so long that it exceeds NAME_MAX with the decorations added on toit, then it will be cut into pieces, the first few of which will be used tomake a nest of directories, and the last one of which will be the objectsinside the last directory.  The names of the intermediate directories will have&apos;+&apos; prepended:	J1223/@23/+xy...z/+kl...m/EpqrNote that keys are raw data, and not only may they exceed NAME_MAX in size,they may also contain things like &apos;/&apos; and NUL characters, and so they may notbe suitable for turning directly into a filename.To handle this, CacheFiles will use a suitably printable filename directly and&quot;base-64&quot; encode ones that aren&apos;t directly suitable.  The two versions ofobject filenames indicate the encoding:	OBJECT TYPE	PRINTABLE	ENCODED	===============	===============	===============	Index		&quot;I...&quot;		&quot;J...&quot;	Data		&quot;D...&quot;		&quot;E...&quot;	Special		&quot;S...&quot;		&quot;T...&quot;Intermediate directories are always &quot;@&quot; or &quot;+&quot; as appropriate.Each object in the cache has an extended attribute label that holds the objecttype ID (required to distinguish special objects) and the auxiliary data fromthe netfs.  The latter is used to detect stale objects in the cache and updateor retire them.Note that CacheFiles will erase from the cache any file it doesn&apos;t recognise orany file of an incorrect type (such as a FIFO file or a device file).==========================SECURITY MODEL AND SELINUX==========================CacheFiles is implemented to deal properly with the LSM security features ofthe Linux kernel and the SELinux facility.One of the problems that CacheFiles faces is that it is generally acting onbehalf of a process, and running in that process&apos;s context, and that includes asecurity context that is not appropriate for accessing the cache - eitherbecause the files in the cache are inaccessible to that process, or because ifthe process creates a file in the cache, that file may be inaccessible to otherprocesses.The way CacheFiles works is to temporarily change the security context (fsuid,fsgid and actor security label) that the process acts as - without changing thesecurity context of the process when it the target of an operation performed bysome other process (so signalling and suchlike still work correctly).When the CacheFiles module is asked to bind to its cache, it: (1) Finds the security label attached to the root cache directory and uses     that as the security label with which it will create files.  By default,     this is:	cachefiles_var_t (2) Finds the security label of the process which issued the bind request     (presumed to be the cachefilesd daemon), which by default will be:	cachefilesd_t     and asks LSM to supply a security ID as which it should act given the     daemon&apos;s label.  By default, this will be:	cachefiles_kernel_t     SELinux transitions the daemon&apos;s security ID to the module&apos;s security ID     based on a rule of this form in the policy.	type_transition &lt;daemon&apos;s-ID&gt; kernel_t : process &lt;module&apos;s-ID&gt;;     For instance:	type_transition cachefilesd_t kernel_t : process cachefiles_kernel_t;The module&apos;s security ID gives it permission to create, move and remove filesand directories in the cache, to find and access directories and files in thecache, to set and access extended attributes on cache objects, and to read andwrite files in the cache.The daemon&apos;s security ID gives it only a very restricted set of permissions: itmay scan directories, stat files and erase files and directories.  It maynot read or write files in the cache, and so it is precluded from accessing thedata cached therein; nor is it permitted to create new files in the cache.There are policy source files available in:	http://people.redhat.com/~dhowells/fscache/cachefilesd-0.8.tar.bz2and later versions.  In that tarball, see the files:	cachefilesd.te	cachefilesd.fc	cachefilesd.ifThey are built and installed directly by the RPM.If a non-RPM based system is being used, then copy the above files to their owndirectory and run:	make -f /usr/share/selinux/devel/Makefile	semodule -i cachefilesd.ppYou will need checkpolicy and selinux-policy-devel installed prior to thebuild.By default, the cache is located in /var/fscache, but if it is desirable thatit should be elsewhere, than either the above policy files must be altered, oran auxiliary policy must be installed to label the alternate location of thecache.For instructions on how to add an auxiliary policy to enable the cache to belocated elsewhere when SELinux is in enforcing mode, please see:	/usr/share/doc/cachefilesd-*/move-cache.txtWhen the cachefilesd rpm is installed; alternatively, the document can be foundin the sources.==================A NOTE ON SECURITY==================CacheFiles makes use of the split security in the task_struct.  It allocatesits own task_security structure, and redirects current-&gt;act_as to point to itwhen it acts on behalf of another process, in that process&apos;s context.The reason it does this is that it calls vfs_mkdir() and suchlike rather thanbypassing security and calling inode ops directly.  Therefore the VFS and LSMmay deny the CacheFiles access to the cache data because under somecircumstances the caching code is running in the security context of whateverprocess issued the original syscall on the netfs.Furthermore, should CacheFiles create a file or directory, the securityparameters with that object is created (UID, GID, security label) would bederived from that process that issued the system call, thus potentiallypreventing other processes from accessing the cache - including CacheFiles&apos;scache management daemon (cachefilesd).What is required is to temporarily override the security of the process thatissued the system call.  We can&apos;t, however, just do an in-place change of thesecurity data as that affects the process as an object, not just as a subject.This means it may lose signals or ptrace events for example, and affects whatthe process looks like in /proc.So CacheFiles makes use of a logical split in the security between theobjective security (task-&gt;sec) and the subjective security (task-&gt;act_as).  Theobjective security holds the intrinsic security properties of a process and isnever overridden.  This is what appears in /proc, and is what is used when aprocess is the target of an operation by some other process (SIGKILL forexample).The subjective security holds the active security properties of a process, andmay be overridden.  This is not seen externally, and is used whan a processacts upon another object, for example SIGKILLing another process or opening afile.LSM hooks exist that allow SELinux (or Smack or whatever) to reject a requestfor CacheFiles to run in a context of a specific security label, or to createfiles and directories with another security label.This documentation is added by the patch to:	Documentation/filesystems/caching/cachefiles.txtSigned-Off-By: David Howells &lt;dhowells@redhat.com&gt;Acked-by: Steve Dickson &lt;steved@redhat.com&gt;Acked-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;Tested-by: Daire Byrne &lt;Daire.Byrne@framestore.com&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Makefile</description>
        <pubDate>Fri, 03 Apr 2009 15:42:41 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
</channel>
</rss>
