<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/fs/orangefs/inode.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/fs/orangefs/inode.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/fs/orangefs/inode.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-04-08T13:38:51Z</updated>
<entry>
<title>orangefs: get rid of knob code...</title>
<updated>2020-04-08T13:38:51Z</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2020-04-08T12:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ec95f1dedc9c64ac5a8b0bdb7c276936c70fdedd'/>
<id>urn:sha1:ec95f1dedc9c64ac5a8b0bdb7c276936c70fdedd</id>
<content type='text'>
Christoph Hellwig sent in a reversion of "orangefs: remember count
when reading." because:

  -&gt;read_iter calls can race with each other and one or
  more -&gt;flush calls. Remove the the scheme to store the read
  count in the file private data as is is completely racy and
  can cause use after free or double free conditions

Christoph's reversion caused Orangefs not to work or to compile. I
added a patch that fixed that, but intel's kbuild test robot pointed
out that sending Christoph's patch followed by my patch upstream, it
would break bisection because of the failure to compile. So I have
combined the reversion plus my patch... here's the commit message
that was in my patch:

  Logically, optimal Orangefs "pages" are 4 megabytes. Reading
  large Orangefs files 4096 bytes at a time is like trying to
  kick a dead whale down the beach. Before Christoph's "Revert
  orangefs: remember count when reading." I tried to give users
  a knob whereby they could, for example, use "count" in
  read(2) or bs with dd(1) to get whatever they considered an
  appropriate amount of bytes at a time from Orangefs and fill
  as many page cache pages as they could at once.

  Without the racy code that Christoph reverted Orangefs won't
  even compile, much less work. So this replaces the logic that
  used the private file data that Christoph reverted with
  a static number of bytes to read from Orangefs.

  I ran tests like the following to determine what a
  reasonable static number of bytes might be:

  dd if=/pvfsmnt/asdf of=/dev/null count=128 bs=4194304
  dd if=/pvfsmnt/asdf of=/dev/null count=256 bs=2097152
  dd if=/pvfsmnt/asdf of=/dev/null count=512 bs=1048576
                            .
                            .
                            .
  dd if=/pvfsmnt/asdf of=/dev/null count=4194304 bs=128

  Reads seem faster using the static number, so my "knob code"
  wasn't just racy, it wasn't even a good idea...

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
</content>
</entry>
<entry>
<title>orangefs: posix open permission checking...</title>
<updated>2019-12-04T13:52:55Z</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2019-11-26T17:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f9bbb68233aa5bd5ef238bd3532fddf92fa1b53c'/>
<id>urn:sha1:f9bbb68233aa5bd5ef238bd3532fddf92fa1b53c</id>
<content type='text'>
Orangefs has no open, and orangefs checks file permissions
on each file access. Posix requires that file permissions
be checked on open and nowhere else. Orangefs-through-the-kernel
needs to seem posix compliant.

The VFS opens files, even if the filesystem provides no
method. We can see if a file was successfully opened for
read and or for write by looking at file-&gt;f_mode.

When writes are flowing from the page cache, file is no
longer available. We can trust the VFS to have checked
file-&gt;f_mode before writing to the page cache.

The mode of a file might change between when it is opened
and IO commences, or it might be created with an arbitrary mode.

We'll make sure we don't hit EACCES during the IO stage by
using UID 0. Some of the time we have access without changing
to UID 0 - how to check?

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: remove redundant assignment to err</title>
<updated>2019-09-12T18:17:16Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-07-28T18:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e6b998ab62be29eb244fdb0fa41dcb5a8ad065f2'/>
<id>urn:sha1:e6b998ab62be29eb244fdb0fa41dcb5a8ad065f2</id>
<content type='text'>
Variable err is initialized to a value that is never read and it
is re-assigned later.  The initialization is redundant and can
be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: truncate before updating size</title>
<updated>2019-05-03T18:39:10Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2019-04-29T17:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=33713cd09ccdc1e01b10d0782ae60200d4989553'/>
<id>urn:sha1:33713cd09ccdc1e01b10d0782ae60200d4989553</id>
<content type='text'>
Otherwise we race with orangefs_writepage/orangefs_writepages
which and does not expect i_size &lt; page_offset.

Fixes xfstests generic/129.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: copy Orangefs-sized blocks into the pagecache if possible.</title>
<updated>2019-05-03T18:32:39Z</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2019-03-25T22:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dd59a6475c4cf69afac2ade01ab732b7825a2a45'/>
<id>urn:sha1:dd59a6475c4cf69afac2ade01ab732b7825a2a45</id>
<content type='text'>
-&gt;readpage looks in file-&gt;private_data to try and find out how the
userspace program set "count" in read(2) or with "dd bs=" or whatever.

-&gt;readpage uses "count" and inode-&gt;i_size to calculate how much
data Orangefs should deposit in the Orangefs shared buffer, and
remembers which slot the data is in.

After copying data from the Orangefs shared buffer slot into
"the page", readpage tries to increment through the pagecache index
and fill as many pages as it can from the extra data in the shared
buffer. Hopefully these extra pages will soon be needed by the vfs,
and they'll be in the pagecache already.

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: pass slot index back to readpage.</title>
<updated>2019-05-03T18:32:39Z</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2019-03-25T22:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4077a0f25b001926f86d35f6236351583bada9a4'/>
<id>urn:sha1:4077a0f25b001926f86d35f6236351583bada9a4</id>
<content type='text'>
When userspace deposits more than a page of data into the shared buffer,
we'll need to know which slot it is in when we get back to readpage
so that we can try to use the extra data to fill some extra pages.

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: add orangefs_revalidate_mapping</title>
<updated>2019-05-03T18:32:39Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2019-02-12T20:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8f04e1be784858ba0288c7c09b9de06627a800c9'/>
<id>urn:sha1:8f04e1be784858ba0288c7c09b9de06627a800c9</id>
<content type='text'>
This is modeled after NFS, except our method is different.  We use a
simple timer to determine whether to invalidate the page cache.  This
is bound to perform.

This addes a sysfs parameter cache_timeout_msecs which controls the time
between page cache invalidations.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: write range tracking</title>
<updated>2019-05-03T18:32:38Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-12-14T20:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=52e2d0a3804c095775b178d6b0707ef6ac8e6d04'/>
<id>urn:sha1:52e2d0a3804c095775b178d6b0707ef6ac8e6d04</id>
<content type='text'>
Attach the actual range of bytes written to plus the responsible uid/gid
to each dirty page.  This information must be sent to the server when
the page is written out.

Now write_begin, page_mkwrite, and invalidatepage keep up with this
information.  There are several conditions where they must write out the
page immediately to store the new range.  Two non-contiguous ranges
cannot be stored on a single page.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: move do_readv_writev to direct_IO</title>
<updated>2019-05-03T18:32:38Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-11-06T19:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3e9dfc6e1e8bce62a329f1452c7eeccbac230980'/>
<id>urn:sha1:3e9dfc6e1e8bce62a329f1452c7eeccbac230980</id>
<content type='text'>
direct_IO was the only caller and all direct_IO did was call it,
so there's no use in having the code spread out into so many functions.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
<entry>
<title>orangefs: implement writepage</title>
<updated>2019-05-03T18:32:38Z</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-02-22T18:10:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=85ac799cf926a589829ebe6274bb5e5a41159743'/>
<id>urn:sha1:85ac799cf926a589829ebe6274bb5e5a41159743</id>
<content type='text'>
Now orangefs_inode_getattr fills from cache if an inode has dirty pages.

also if attr_valid and dirty pages and !flags, we spin on inode writeback
before returning if pages still dirty after: should it be other way

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
</entry>
</feed>
