<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/gfs2, branch v3.0.55</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/gfs2?h=v3.0.55</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/gfs2?h=v3.0.55'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-21T16:17:10Z</updated>
<entry>
<title>tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking</title>
<updated>2012-10-21T16:17:10Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2012-10-08T03:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f38039a248831d279cca77ab1dab773684a96c1e'/>
<id>urn:sha1:f38039a248831d279cca77ab1dab773684a96c1e</id>
<content type='text'>
commit 35c2a7f4908d404c9124c2efc6ada4640ca4d5d5 upstream.

Fuzzing with trinity oopsed on the 1st instruction of shmem_fh_to_dentry(),
	u64 inum = fid-&gt;raw[2];
which is unhelpfully reported as at the end of shmem_alloc_inode():

BUG: unable to handle kernel paging request at ffff880061cd3000
IP: [&lt;ffffffff812190d0&gt;] shmem_alloc_inode+0x40/0x40
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Call Trace:
 [&lt;ffffffff81488649&gt;] ? exportfs_decode_fh+0x79/0x2d0
 [&lt;ffffffff812d77c3&gt;] do_handle_open+0x163/0x2c0
 [&lt;ffffffff812d792c&gt;] sys_open_by_handle_at+0xc/0x10
 [&lt;ffffffff83a5f3f8&gt;] tracesys+0xe1/0xe6

Right, tmpfs is being stupid to access fid-&gt;raw[2] before validating that
fh_len includes it: the buffer kmalloc'ed by do_sys_name_to_handle() may
fall at the end of a page, and the next page not be present.

But some other filesystems (ceph, gfs2, isofs, reiserfs, xfs) are being
careless about fh_len too, in fh_to_dentry() and/or fh_to_parent(), and
could oops in the same way: add the missing fh_len checks to those.

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Sage Weil &lt;sage@inktank.com&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>GFS2: Fix mount hang caused by certain access pattern to sysfs files</title>
<updated>2011-08-05T04:58:42Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2011-07-26T08:15:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52880922de44a7950283451b06db5aec0fc34a99'/>
<id>urn:sha1:52880922de44a7950283451b06db5aec0fc34a99</id>
<content type='text'>
commit 19237039919088781b4191a00bdc1284d8fea1dd upstream.

Depending upon the order of userspace/kernel during the
mount process, this can result in a hang without the
_all version of the completion.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>GFS2: Resolve inode eviction and ail list interaction bug</title>
<updated>2011-07-14T07:59:44Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2011-07-14T07:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=380f7c65a7eb3288e4b6812acf3474a1de230707'/>
<id>urn:sha1:380f7c65a7eb3288e4b6812acf3474a1de230707</id>
<content type='text'>
This patch contains a few misc fixes which resolve a recently
reported issue. This patch has been a real team effort and has
received a lot of testing.

The first issue is that the ail lock needs to be held over a few
more operations. The lock thats added into gfs2_releasepage() may
possibly be a candidate for replacing with RCU at some future
point, but at this stage we've gone for the obvious fix.

The second issue is that gfs2_write_inode() can end up calling
a glock recursively when called from gfs2_evict_inode() via the
syncing code, so it needs a guard added.

The third issue is that we either need to not truncate the metadata
pages of inodes which have zero link count, but which we cannot
deallocate due to them still being in use by other nodes, or we need
to ensure that those pages have all made it through the journal and
ail lists first. This patch takes the former approach, but the
latter has also been tested and there is nothing to choose between
them performance-wise. So again, we could revise that decision
in the future.

Also, the inode eviction process is now better documented.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Tested-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Tested-by: Abhijith Das &lt;adas@redhat.com&gt;
Reported-by: Barry J. Marson &lt;bmarson@redhat.com&gt;
Reported-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Fix race during filesystem mount</title>
<updated>2011-07-12T08:15:46Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2011-07-11T07:53:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3942ae5319640ced5844b75f44884e4bcb8a2f16'/>
<id>urn:sha1:3942ae5319640ced5844b75f44884e4bcb8a2f16</id>
<content type='text'>
There is a potential race during filesystem mounting which has recently
been reported. It occurs when the userland gfs_controld is able to
process requests fast enough that it tries to use the sysfs interface
before the lock module is properly initialised. This is a pretty
unusual case as normally the lock module initialisation is very quick
compared with gfs_controld.

This patch adds an interruptible completion which is used to ensure that
userland will wait for the initialisation of the lock module to
complete.

There are other potential solutions to this problem, but this is the
quickest at this stage and has been tested both with and without
mount.gfs2 present in the system.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Reported-by: David Booher &lt;dbooher@adams.net&gt;
</content>
</entry>
<entry>
<title>GFS2: force a log flush when invalidating the rindex glock</title>
<updated>2011-07-12T08:15:24Z</updated>
<author>
<name>Benjamin Marzinski</name>
<email>bmarzins@redhat.com</email>
</author>
<published>2011-06-13T19:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1ce533686c7d40bf900dc346a7279c17a9ee8e0e'/>
<id>urn:sha1:1ce533686c7d40bf900dc346a7279c17a9ee8e0e</id>
<content type='text'>
Right now, there is nothing that forces the log to get flushed when a node
drops its rindex glock so that another node can grow the filesystem. If the
log doesn't get flushed, GFS2 can corrupt the sd_log_le_rg list in the
following way.

A node puts an rgd on the list in rg_lo_add(), and then the rindex glock is
dropped so the other node can grow the filesystem. When the node reacquires the
rindex glock, that rgd gets deleted in clear_rgrpdi() before ever being
removed from the list by gfs2_log_flush().

This code simply forces a log flush when the rindex glock is invalidated,
solving the problem.

Signed-off-by: Benjamin Marzinski &lt;bmarzins@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes</title>
<updated>2011-06-08T01:44:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-06-08T01:44:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d205df9955feb9c2ae63ac1387804e225ff22605'/>
<id>urn:sha1:d205df9955feb9c2ae63ac1387804e225ff22605</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: Processes waiting on inode glock that no processes are holding
</content>
</entry>
<entry>
<title>Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6</title>
<updated>2011-05-26T20:19:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-26T20:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7c2f036284452627d793af981877817b37d4351'/>
<id>urn:sha1:b7c2f036284452627d793af981877817b37d4351</id>
<content type='text'>
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  gfs2: Drop __TIME__ usage
  isdn/diva: Drop __TIME__ usage
  atm: Drop __TIME__ usage
  dlm: Drop __TIME__ usage
  wan/pc300: Drop __TIME__ usage
  parport: Drop __TIME__ usage
  hdlcdrv: Drop __TIME__ usage
  baycom: Drop __TIME__ usage
  pmcraid: Drop __DATE__ usage
  edac: Drop __DATE__ usage
  rio: Drop __DATE__ usage
  scsi/wd33c93: Drop __TIME__ usage
  scsi/in2000: Drop __TIME__ usage
  aacraid: Drop __TIME__ usage
  media/cx231xx: Drop __TIME__ usage
  media/radio-maxiradio: Drop __TIME__ usage
  nozomi: Drop __TIME__ usage
  cyclades: Drop __TIME__ usage
</content>
</entry>
<entry>
<title>gfs2: Drop __TIME__ usage</title>
<updated>2011-05-26T08:54:37Z</updated>
<author>
<name>Michal Marek</name>
<email>mmarek@suse.cz</email>
</author>
<published>2011-04-01T10:41:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d2c50e3b65c8d48d51088f541c13fde46cc8133'/>
<id>urn:sha1:8d2c50e3b65c8d48d51088f541c13fde46cc8133</id>
<content type='text'>
The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: cluster-devel@redhat.com
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>vmscan: change shrinker API by passing shrink_control struct</title>
<updated>2011-05-25T15:39:26Z</updated>
<author>
<name>Ying Han</name>
<email>yinghan@google.com</email>
</author>
<published>2011-05-25T00:12:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1495f230fa7750479c79e3656286b9183d662077'/>
<id>urn:sha1:1495f230fa7750479c79e3656286b9183d662077</id>
<content type='text'>
Change each shrinker's API by consolidating the existing parameters into
shrink_control struct.  This will simplify any further features added w/o
touching each file of shrinker.

[akpm@linux-foundation.org: fix build]
[akpm@linux-foundation.org: fix warning]
[kosaki.motohiro@jp.fujitsu.com: fix up new shrinker API]
[akpm@linux-foundation.org: fix xfs warning]
[akpm@linux-foundation.org: update gfs2]
Signed-off-by: Ying Han &lt;yinghan@google.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>GFS2: Processes waiting on inode glock that no processes are holding</title>
<updated>2011-05-25T09:37:11Z</updated>
<author>
<name>Bob Peterson</name>
<email>rpeterso@redhat.com</email>
</author>
<published>2011-05-24T14:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f90e5b5b136ede1f0fd15999e95f13124d6b0dbd'/>
<id>urn:sha1:f90e5b5b136ede1f0fd15999e95f13124d6b0dbd</id>
<content type='text'>
This patch fixes a race in the GFS2 glock state machine that may
result in lockups.  The symptom is that all nodes but one will
hang, waiting for a particular glock.  All the holder records
will have the "W" (Waiting) bit set.  The other node will
typically have the glock stuck in Exclusive mode (EX) with no
holder records, but the dinode will be cached.  In other words,
an entry with "I:" will appear in the glock dump for that glock,
but nothing else.

The race has to do with the glock "Pending Demote" bit, which
can be set, then immediately reset, thus losing the fact that
another node needs the glock.  The sequence of events is:

1. Something schedules the glock workqueue (e.g. glock request from fs)
2. The glock workqueue gets to the point between the test of the reply pending
bit and the spin lock:

        if (test_and_clear_bit(GLF_REPLY_PENDING, &amp;gl-&gt;gl_flags)) {
                finish_xmote(gl, gl-&gt;gl_reply);
                drop_ref = 1;
        }
        down_read(&amp;gfs2_umount_flush_sem);         &lt;---- i.e. here
        spin_lock(&amp;gl-&gt;gl_spin);

3. In comes (a) the reply to our EX lock request setting GLF_REPLY_PENDING and
            (b) the demote request which sets GLF_PENDING_DEMOTE

4. The following test is executed:

        if (test_and_clear_bit(GLF_PENDING_DEMOTE, &amp;gl-&gt;gl_flags) &amp;&amp;
            gl-&gt;gl_state != LM_ST_UNLOCKED &amp;&amp;
            gl-&gt;gl_demote_state != LM_ST_EXCLUSIVE) {

This resets the pending demote flag, and gl-&gt;gl_demote_state is not equal to
exclusive, however because the reply from the dlm arrived after we checked for
the GLF_REPLY_PENDING flag, gl-&gt;gl_state is still equal to unlocked, so
although we reset the GLF_PENDING_DEMOTE flag, we didn't then set the
GLF_DEMOTE flag or reinstate the GLF_PENDING_DEMOTE_FLAG.

The patch closes the timing window by only transitioning the
"Pending demote" bit to the "demote" flag once we know the
other conditions (not unlocked and not exclusive) are met.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;

</content>
</entry>
</feed>
