<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/orangefs/inode.c, branch linux-5.3.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.3.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.3.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-05-03T18:39:10+00:00</updated>
<entry>
<title>orangefs: truncate before updating size</title>
<updated>2019-05-03T18:39:10+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2019-04-29T17:09:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:39+00:00</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2019-03-25T22:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:39+00:00</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2019-03-25T22:17:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:39+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2019-02-12T20:19:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-12-14T20:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-11-06T19:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-02-22T18:10:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>
<entry>
<title>orangefs: migrate to generic_file_read_iter</title>
<updated>2019-05-03T18:32:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-02-16T20:51:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c453dcfc79815760071bd9a7805d4b809fec05cf'/>
<id>urn:sha1:c453dcfc79815760071bd9a7805d4b809fec05cf</id>
<content type='text'>
Remove orangefs_inode_read.  It was used by readpage.  Calling
wait_for_direct_io directly serves the purpose just as well.  There is
now no check of the bufmap size in the readpage path.  There are already
other places the bufmap size is assumed to be greater than PAGE_SIZE.

Important to call truncate_inode_pages now in the write path so a
subsequent read sees the new data.

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: remove orangefs_readpages</title>
<updated>2019-05-03T18:32:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-02-15T18:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a68d9c606a67952fe547399bc45eebc8d83078bd'/>
<id>urn:sha1:a68d9c606a67952fe547399bc45eebc8d83078bd</id>
<content type='text'>
It's a copy of the loop which would run in read_pages from
mm/readahead.c.

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: reorganize setattr functions to track attribute changes</title>
<updated>2019-05-03T18:32:38+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2018-02-13T20:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afd9fb2a31797b4c787034294a4062df0c19c37e'/>
<id>urn:sha1:afd9fb2a31797b4c787034294a4062df0c19c37e</id>
<content type='text'>
OrangeFS accepts a mask indicating which attributes were changed.  The
kernel must not set any bits except those that were actually changed.
The kernel must set the uid/gid of the request to the actual uid/gid
responsible for the change.

Code path for notify_change initiated setattrs is

orangefs_setattr(dentry, iattr)
-&gt; __orangefs_setattr(inode, iattr)

In kernel changes are initiated by calling __orangefs_setattr.

Code path for writeback is

orangefs_write_inode
-&gt; orangefs_inode_setattr

attr_valid and attr_uid and attr_gid change together under i_lock.
I_DIRTY changes separately.

__orangefs_setattr
	lock
	if needs to be cleaned first, unlock and retry
	set attr_valid
	copy data in
	unlock
	mark_inode_dirty

orangefs_inode_setattr
	lock
	copy attributes out
	unlock
	clear getattr_time
	# __writeback_single_inode clears dirty

orangefs_inode_getattr
	# possible to get here with attr_valid set and not dirty
	lock
	if getattr_time ok or attr_valid set, unlock and return
	unlock
	do server operation
	# another thread may getattr or setattr, so check for that
	lock
	if getattr_time ok or attr_valid, unlock and return
	else, copy in
	update getattr_time
	unlock

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