<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/fs/gfs2/glops.c, branch docs-4.15</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-4.15</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-4.15'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-09-15T01:54:01+00:00</updated>
<entry>
<title>Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2017-09-15T01:54:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-09-15T01:54:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0f0d12728e56c94d3289c6831243b6faeae8a19d'/>
<id>urn:sha1:0f0d12728e56c94d3289c6831243b6faeae8a19d</id>
<content type='text'>
Pull mount flag updates from Al Viro:
 "Another chunk of fmount preparations from dhowells; only trivial
  conflicts for that part. It separates MS_... bits (very grotty
  mount(2) ABI) from the struct super_block -&gt;s_flags (kernel-internal,
  only a small subset of MS_... stuff).

  This does *not* convert the filesystems to new constants; only the
  infrastructure is done here. The next step in that series is where the
  conflicts would be; that's the conversion of filesystems. It's purely
  mechanical and it's better done after the merge, so if you could run
  something like

	list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$')

	sed -i -e 's/\&lt;MS_RDONLY\&gt;/SB_RDONLY/g' \
	        -e 's/\&lt;MS_NOSUID\&gt;/SB_NOSUID/g' \
	        -e 's/\&lt;MS_NODEV\&gt;/SB_NODEV/g' \
	        -e 's/\&lt;MS_NOEXEC\&gt;/SB_NOEXEC/g' \
	        -e 's/\&lt;MS_SYNCHRONOUS\&gt;/SB_SYNCHRONOUS/g' \
	        -e 's/\&lt;MS_MANDLOCK\&gt;/SB_MANDLOCK/g' \
	        -e 's/\&lt;MS_DIRSYNC\&gt;/SB_DIRSYNC/g' \
	        -e 's/\&lt;MS_NOATIME\&gt;/SB_NOATIME/g' \
	        -e 's/\&lt;MS_NODIRATIME\&gt;/SB_NODIRATIME/g' \
	        -e 's/\&lt;MS_SILENT\&gt;/SB_SILENT/g' \
	        -e 's/\&lt;MS_POSIXACL\&gt;/SB_POSIXACL/g' \
	        -e 's/\&lt;MS_KERNMOUNT\&gt;/SB_KERNMOUNT/g' \
	        -e 's/\&lt;MS_I_VERSION\&gt;/SB_I_VERSION/g' \
	        -e 's/\&lt;MS_LAZYTIME\&gt;/SB_LAZYTIME/g' \
	        $list

  and commit it with something along the lines of 'convert filesystems
  away from use of MS_... constants' as commit message, it would save a
  quite a bit of headache next cycle"

* 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  VFS: Differentiate mount flags (MS_*) from internal superblock flags
  VFS: Convert sb-&gt;s_flags &amp; MS_RDONLY to sb_rdonly(sb)
  vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
</content>
</entry>
<entry>
<title>gfs2: Get rid of gfs2_set_nlink</title>
<updated>2017-08-10T15:42:11+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2017-08-01T16:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=eebd2e813f7ef688e22cd0b68aea78fb3d1ef19c'/>
<id>urn:sha1:eebd2e813f7ef688e22cd0b68aea78fb3d1ef19c</id>
<content type='text'>
Remove gfs2_set_nlink which prevents the link count of an inode from
becoming non-zero once it has reached zero.  The next commit reduces the
amount of waiting on glocks when an inode is evicted from memory.  With
that, an inode can become reallocated before all the remote-unlink
callbacks from a previous delete are processed, which causes the link
count to change from zero to non-zero.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: fix code parameter error in inode_go_lock</title>
<updated>2017-07-21T12:40:59+00:00</updated>
<author>
<name>Wang Xibo</name>
<email>wang.xibo@zte.com.cn</email>
</author>
<published>2017-07-21T12:40:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e7cb550d79fba5876616ed33ccafafc4e2bd7e2e'/>
<id>urn:sha1:e7cb550d79fba5876616ed33ccafafc4e2bd7e2e</id>
<content type='text'>
In inode_go_lock() function, the parameter order of list_add() is error.
According to the define of list_add(), the first parameter is new entry
and the second is the list head, so ip-&gt;i_trunc_list should be the
first parameter and the sdp-&gt;sd_trunc_list should be second.

Signed-off-by: Wang Xibo&lt;wang.xibo@zte.com.cn&gt;
Signed-off-by: Xiao Likun&lt;xiao.likun@zte.com.cn&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>VFS: Convert sb-&gt;s_flags &amp; MS_RDONLY to sb_rdonly(sb)</title>
<updated>2017-07-17T07:45:34+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2017-07-17T07:45:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bc98a42c1f7d0f886c0c1b75a92a004976a46d9f'/>
<id>urn:sha1:bc98a42c1f7d0f886c0c1b75a92a004976a46d9f</id>
<content type='text'>
Firstly by applying the following with coccinelle's spatch:

	@@ expression SB; @@
	-SB-&gt;s_flags &amp; MS_RDONLY
	+sb_rdonly(SB)

to effect the conversion to sb_rdonly(sb), then by applying:

	@@ expression A, SB; @@
	(
	-(!sb_rdonly(SB)) &amp;&amp; A
	+!sb_rdonly(SB) &amp;&amp; A
	|
	-A != (sb_rdonly(SB))
	+A != sb_rdonly(SB)
	|
	-A == (sb_rdonly(SB))
	+A == sb_rdonly(SB)
	|
	-!(sb_rdonly(SB))
	+!sb_rdonly(SB)
	|
	-A &amp;&amp; (sb_rdonly(SB))
	+A &amp;&amp; sb_rdonly(SB)
	|
	-A || (sb_rdonly(SB))
	+A || sb_rdonly(SB)
	|
	-(sb_rdonly(SB)) != A
	+sb_rdonly(SB) != A
	|
	-(sb_rdonly(SB)) == A
	+sb_rdonly(SB) == A
	|
	-(sb_rdonly(SB)) &amp;&amp; A
	+sb_rdonly(SB) &amp;&amp; A
	|
	-(sb_rdonly(SB)) || A
	+sb_rdonly(SB) || A
	)

	@@ expression A, B, SB; @@
	(
	-(sb_rdonly(SB)) ? 1 : 0
	+sb_rdonly(SB)
	|
	-(sb_rdonly(SB)) ? A : B
	+sb_rdonly(SB) ? A : B
	)

to remove left over excess bracketage and finally by applying:

	@@ expression A, SB; @@
	(
	-(A &amp; MS_RDONLY) != sb_rdonly(SB)
	+(bool)(A &amp; MS_RDONLY) != sb_rdonly(SB)
	|
	-(A &amp; MS_RDONLY) == sb_rdonly(SB)
	+(bool)(A &amp; MS_RDONLY) == sb_rdonly(SB)
	)

to make comparisons against the result of sb_rdonly() (which is a bool)
work correctly.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Protect gl-&gt;gl_object by spin lock</title>
<updated>2017-07-05T12:20:52+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2017-06-30T12:55:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6f6597baae206c544c49ad7f1129d5adc1e9019d'/>
<id>urn:sha1:6f6597baae206c544c49ad7f1129d5adc1e9019d</id>
<content type='text'>
Put all remaining accesses to gl-&gt;gl_object under the
gl-&gt;gl_lockref.lock spinlock to prevent races.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Get rid of flush_delayed_work in gfs2_evict_inode</title>
<updated>2017-07-05T12:20:24+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2017-06-30T12:47:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4fd1a5795214bc6405f14691c1344ae8c3f17215'/>
<id>urn:sha1:4fd1a5795214bc6405f14691c1344ae8c3f17215</id>
<content type='text'>
So far, gfs2_evict_inode clears gl-&gt;gl_object and then flushes the glock
work queue to make sure that inode glops which dereference gl-&gt;gl_object
have finished running before the inode is destroyed.  However, flushing
the work queue may do more work than needed, and in particular, it may
call into DLM, which we want to avoid here.  Use a bit lock
(GIF_GLOP_PENDING) to synchronize between the inode glops and
gfs2_evict_inode instead to get rid of the flushing.

In addition, flush the work queues of existing glocks before reusing
them for new inodes to get those glocks into a known state: the glock
state engine currently doesn't handle glock re-appropriation correctly.
(We may be able to fix the glock state engine instead later.)

Based on a patch by Steven Whitehouse &lt;swhiteho@redhat.com&gt;.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Get rid of dead code in inode_go_demote_ok</title>
<updated>2016-04-05T15:59:18+00:00</updated>
<author>
<name>Bob Peterson</name>
<email>rpeterso@redhat.com</email>
</author>
<published>2016-04-01T17:18:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=73cc86252bd8a547349d2856497eceaf4f2d1766'/>
<id>urn:sha1:73cc86252bd8a547349d2856497eceaf4f2d1766</id>
<content type='text'>
Function inode_go_demote_ok had some code that was only executed
if gl_holders was not empty. However, if gl_holders was not empty,
the only caller, demote_ok(), returns before inode_go_demote_ok
would ever be called. Therefore, it's dead code, so I removed it.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Invalid security labels of inodes when they go invalid</title>
<updated>2015-12-24T16:09:40+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2015-12-24T16:09:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f39814f60ad0fa982ac87a97af1fb0bde244c319'/>
<id>urn:sha1:f39814f60ad0fa982ac87a97af1fb0bde244c319</id>
<content type='text'>
When gfs2 releases the glock of an inode, it must invalidate all
information cached for that inode, including the page cache and acls.
Use the new security_inode_invalidate_secctx hook to also invalidate
security labels in that case.  These items will be reread from disk
when needed after reacquiring the glock.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Acked-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: cluster-devel@redhat.com
[PM: fixed spelling errors and description line lengths]
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
</content>
</entry>
<entry>
<title>gfs2: Remove gl_spin define</title>
<updated>2015-10-29T17:57:48+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2015-10-29T15:58:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f3dd1649122b9e73f869e5304d5fa8554e128b7a'/>
<id>urn:sha1:f3dd1649122b9e73f869e5304d5fa8554e128b7a</id>
<content type='text'>
Commit e66cf161 replaced the gl_spin spinlock in struct gfs2_glock with a
gl_lockref lockref and defined gl_spin as gl_lockref.lock (the spinlock in
gl_lockref).  Remove that define to make the references to gl_lockref.lock more
obvious.

Signed-off-by: Andreas Gruenbacher &lt;andreas.gruenbacher@gmail.com&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Move glock superblock pointer to field gl_name</title>
<updated>2015-09-03T18:33:09+00:00</updated>
<author>
<name>Bob Peterson</name>
<email>rpeterso@redhat.com</email>
</author>
<published>2015-03-16T16:52:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=15562c439d0a1850b71aa1c0d92d1f4fb9503c8d'/>
<id>urn:sha1:15562c439d0a1850b71aa1c0d92d1f4fb9503c8d</id>
<content type='text'>
What uniquely identifies a glock in the glock hash table is not
gl_name, but gl_name and its superblock pointer. This patch makes
the gl_name field correspond to a unique glock identifier. That will
allow us to simplify hashing with a future patch, since the hash
algorithm can then take the gl_name and hash its components in one
operation.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
</feed>
