<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/gfs2/log.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-12-13T21:42:23Z</updated>
<entry>
<title>GFS2: Fix use-after-free race when calling gfs2_remove_from_ail</title>
<updated>2013-12-13T21:42:23Z</updated>
<author>
<name>Bob Peterson</name>
</author>
<published>2013-12-10T17:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9290a9a7c0bcf5400e8dbfbf9707fa68ea3fb338'/>
<id>urn:sha1:9290a9a7c0bcf5400e8dbfbf9707fa68ea3fb338</id>
<content type='text'>
Function gfs2_remove_from_ail drops the reference on the bh via
brelse. This patch fixes a race condition whereby bh is deferenced
after the brelse when setting bd-&gt;bd_blkno = bh-&gt;b_blocknr;
Under certain rare circumstances, bh might be gone or reused,
and bd-&gt;bd_blkno is set to whatever that memory happens to be,
which is often 0. Later, in gfs2_trans_add_unrevoke, that bd fails
the test "bd-&gt;bd_blkno &gt;= blkno" which causes it to never be freed.
The end result is that the bd is never freed from the bufdata cache,
which results in this error:
slab error in kmem_cache_destroy(): cache `gfs2_bufdata': Can't free all objects

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: aggressively issue revokes in gfs2_log_flush</title>
<updated>2013-06-19T08:41:59Z</updated>
<author>
<name>Benjamin Marzinski</name>
</author>
<published>2013-06-14T16:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d054964f57ade1adb310313c3cfb8e93e804e8f'/>
<id>urn:sha1:5d054964f57ade1adb310313c3cfb8e93e804e8f</id>
<content type='text'>
This patch looks at all the outstanding blocks in all the transactions
on the log, and moves the completed ones to the ail2 list.  Then it
issues revokes for these blocks.  This will hopefully speed things up
in situations where there is a lot of contention for glocks, especially
if they are acquired serially.

revoke_lo_before_commit will issue at most one log block's full of these
preemptive revokes. The amount of reserved log space that
gfs2_log_reserve() ignores has been incremented to allow for this extra
block.

This patch also consolidates the common revoke instructions into one
function, gfs2_add_revoke().

Signed-off-by: Benjamin Marzinski &lt;bmarzins@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;

</content>
</entry>
<entry>
<title>GFS2: replace gfs2_ail structure with gfs2_trans</title>
<updated>2013-04-08T07:46:22Z</updated>
<author>
<name>Benjamin Marzinski</name>
</author>
<published>2013-04-06T01:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16ca9412d8018188bddda29c3fee88471b94e3cb'/>
<id>urn:sha1:16ca9412d8018188bddda29c3fee88471b94e3cb</id>
<content type='text'>
In order to allow transactions and log flushes to happen at the same
time, gfs2 needs to move the transaction accounting and active items
list code into the gfs2_trans structure.  As a first step toward this,
this patch removes the gfs2_ail structure, and handles the active items
list in the gfs_trans structure.  This keeps gfs2 from allocating an ail
structure on log flushes, and gives us a struture that can later be used
to store the transaction accounting outside of the gfs2 superblock
structure.

With this patch, at the end of a transaction, gfs2 will add the
gfs2_trans structure to the superblock if there is not one already.
This structure now has the active items fields that were previously in
gfs2_ail.  This is not necessary in the case where the transaction was
simply used to add revokes, since these are never written outside of the
journal, and thus, don't need an active items list.

Also, in order to make sure that the transaction structure is not
removed while it's still in use by gfs2_trans_end, unlocking the
sd_log_flush_lock has to happen slightly later in ending the
transaction.

Signed-off-by: Benjamin Marzinski &lt;bmarzins@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;

</content>
</entry>
<entry>
<title>GFS2: Use -&gt;writepages for ordered writes</title>
<updated>2013-01-29T10:29:17Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2013-01-28T09:30:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4513899092b3254b3539f92a65d2839afa1d50f6'/>
<id>urn:sha1:4513899092b3254b3539f92a65d2839afa1d50f6</id>
<content type='text'>
Instead of using a list of buffers to write ahead of the journal
flush, this now uses a list of inodes and calls -&gt;writepages
via filemap_fdatawrite() in order to achieve the same thing. For
most use cases this results in a shorter ordered write list,
as well as much larger i/os being issued.

The ordered write list is sorted by inode number before writing
in order to retain the disk block ordering between inodes as
per the previous code.

The previous ordered write code used to conflict in its assumptions
about how to write out the disk blocks with mpage_writepages()
so that with this updated version we can also use mpage_writepages()
for GFS2's ordered write, writepages implementation. So we will
also send larger i/os from writeback too.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: eliminate log elements and simplify</title>
<updated>2012-05-02T08:14:36Z</updated>
<author>
<name>Bob Peterson</name>
</author>
<published>2012-05-01T16:00:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0752aa7e4d48cc19e167ccb0092bea8e5b6ca3a'/>
<id>urn:sha1:c0752aa7e4d48cc19e167ccb0092bea8e5b6ca3a</id>
<content type='text'>
This patch eliminates the gfs2_log_element data structure and
rolls its two components into the gfs2_bufdata. This makes the code
easier to understand and makes it easier to migrate to a rbtree
to keep the list sorted.

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

</content>
</entry>
<entry>
<title>GFS2: Log code fixes</title>
<updated>2012-04-24T15:44:38Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2012-04-19T09:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=144a4c2ff75552e2aabb9256ca0ec5e277097153'/>
<id>urn:sha1:144a4c2ff75552e2aabb9256ca0ec5e277097153</id>
<content type='text'>
This patch removes a log lock from around atomic operation where
it is not needed, removes an unused variable, and also changes
a void pointer used incorrectly to a struct page pointer.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Remove bd_list_tr</title>
<updated>2012-04-24T15:44:36Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2012-04-16T15:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c50b91c4bd511dfe844e2aa7be429b6b88406353'/>
<id>urn:sha1:c50b91c4bd511dfe844e2aa7be429b6b88406353</id>
<content type='text'>
This is another clean up in the logging code. This per-transaction
list was largely unused. Its main function was to ensure that the
number of buffers in a transaction was correct, however that counter
was only used to check the number of buffers in the bd_list_tr, plus
an assert at the end of each transaction. With the assert now changed
to use the calculated buffer counts, we can remove both bd_list_tr and
its associated counter.

This should make the code easier to understand as well as shrinking
a couple of structures.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Clean up log write code path</title>
<updated>2012-04-24T15:44:34Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2012-04-16T08:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8c92ed769008cfc799497f0a34c8faf46243c4d'/>
<id>urn:sha1:e8c92ed769008cfc799497f0a34c8faf46243c4d</id>
<content type='text'>
Prior to this patch, we have two ways of sending i/o to the log.
One of those is used when we need to allocate both the data
to be written itself and also a buffer head to submit it. This
is done via sb_getblk and friends. This is used mostly for writing
log headers.

The other method is used when writing blocks which have some
in-place counterpart. This is the case for all the metadata
blocks which are journalled, and when journaled data is in use,
for unescaped journalled data blocks.

This patch replaces both of those two methods, and about half
a dozen separate i/o submission points with a single i/o
submission function. We also go direct to bio rather than
using buffer heads, since this allows us to build i/o
requests of the maximum size for the block device in
question. It also reduces the memory required for flushing
the log, which can be very useful in low memory situations.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Drop "pull" argument from log_write_header()</title>
<updated>2012-04-24T15:44:24Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2012-04-02T14:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fdb76a4228303491b1b9b8923310f2cbcec8dc9f'/>
<id>urn:sha1:fdb76a4228303491b1b9b8923310f2cbcec8dc9f</id>
<content type='text'>
The "pull" argument to log_write_header() is only used
for debug purposes and it is not really needed any more. There
are other tests for this particular problem, so I think we can
dispose of it in order to simplify the code.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Clean up log flush header writing</title>
<updated>2012-03-09T14:07:06Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2012-03-09T10:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34cc1781c2ae921107e89f6633cfab7436e355ba'/>
<id>urn:sha1:34cc1781c2ae921107e89f6633cfab7436e355ba</id>
<content type='text'>
We already send both a pre and post flush to the block device
when writing a journal header. There is no need to wait for
the previous I/O specifically when we do this, unless we've
turned "barriers" off.

As a side effect, this also cleans up the code path for flushing
the journal and makes it more readable.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
</feed>
