<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/gfs2/bmap.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-12-05T14:26:52Z</updated>
<entry>
<title>gfs2: take jdata unstuff into account in do_grow</title>
<updated>2019-12-05T14:26:52Z</updated>
<author>
<name>Bob Peterson</name>
</author>
<published>2018-12-18T14:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84c5f3d78a3eac25847472a6f4c0e27a2e8a8d5a'/>
<id>urn:sha1:84c5f3d78a3eac25847472a6f4c0e27a2e8a8d5a</id>
<content type='text'>
[ Upstream commit bc0205612bbd4dd4026d4ba6287f5643c37366ec ]

Before this patch, function do_grow would not reserve enough journal
blocks in the transaction to unstuff jdata files while growing them.
This patch adds the logic to add one more block if the file to grow
is jdata.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Reviewed-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gfs2: Special-case rindex for gfs2_grow</title>
<updated>2018-09-26T06:35:05Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2018-07-25T17:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e8d585c52c5db4780c53f949cd3fdb9d6a50b54'/>
<id>urn:sha1:9e8d585c52c5db4780c53f949cd3fdb9d6a50b54</id>
<content type='text'>
[ Upstream commit 776125785a87ff05d49938bd5b9f336f2a05bff6 ]

To speed up the common case of appending to a file,
gfs2_write_alloc_required presumes that writing beyond the end of a file
will always require additional blocks to be allocated.  This assumption
is incorrect for preallocates files, but there are no negative
consequences as long as *some* space is still left on the filesystem.

One special file that always has some space preallocated beyond the end
of the file is the rindex: when growing a filesystem, gfs2_grow adds one
or more new resource groups and appends records describing those
resource groups to the rindex; the preallocated space ensures that this
is always possible.

However, when a filesystem is completely full, gfs2_write_alloc_required
will indicate that an additional allocation is required, and appending
the next record to the rindex will fail even though space for that
record has already been preallocated.  To fix that, skip the incorrect
optimization in gfs2_write_alloc_required, but for the rindex only.
Other writes to preallocated space beyond the end of the file are still
allowed to fail on completely full filesystems.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gfs2: perform quota checks against allocation parameters</title>
<updated>2015-03-18T17:46:54Z</updated>
<author>
<name>Abhi Das</name>
</author>
<published>2015-03-18T17:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8fbf471edb3dbf441716fd2a52a7ca76c381381'/>
<id>urn:sha1:b8fbf471edb3dbf441716fd2a52a7ca76c381381</id>
<content type='text'>
Use struct gfs2_alloc_parms as an argument to gfs2_quota_check()
and gfs2_quota_lock_check() to check for quota violations while
accounting for the new blocks requested by the current operation
in ap-&gt;target.

Previously, the number of new blocks requested during an operation
were not accounted for during quota_check and would allow these
operations to exceed quota. This was not very apparent since most
operations allocated only 1 block at a time and quotas would get
violated in the next operation. i.e. quota excess would only be by
1 block or so. With fallocate, (where we allocate a bunch of blocks
at once) the quota excess is non-trivial and is addressed by this
patch.

Signed-off-by: Abhi Das &lt;adas@redhat.com&gt;
Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Change maxlen variables to size_t</title>
<updated>2014-08-21T09:22:23Z</updated>
<author>
<name>Bob Peterson</name>
</author>
<published>2014-08-06T13:08:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b650738cd093a9f9e9551db9ce5cd68acd842dc0'/>
<id>urn:sha1:b650738cd093a9f9e9551db9ce5cd68acd842dc0</id>
<content type='text'>
This patch changes some variables (especially maxlen in function
gfs2_block_map) from unsigned int to size_t. We need 64-bit arithmetic
for very large files (e.g. 1PB) where the variables otherwise get
shifted to all 0's.

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: fs/gfs2/bmap.c: kernel-doc warning fixes</title>
<updated>2014-05-16T08:34:21Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2014-05-14T16:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c62baf65bfb683d976a92c59661c0dbb18f41239'/>
<id>urn:sha1:c62baf65bfb683d976a92c59661c0dbb18f41239</id>
<content type='text'>
Fix 2 typos and move one definition which was between function
comments and function definition (yet another kernel-doc warning)

Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Clean up journal extent mapping</title>
<updated>2014-03-03T13:50:12Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2014-03-03T13:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b50f227bddf110ae4ea2df1ebdf7e282ad481803'/>
<id>urn:sha1:b50f227bddf110ae4ea2df1ebdf7e282ad481803</id>
<content type='text'>
This patch fixes a long standing issue in mapping the journal
extents. Most journals will consist of only a single extent,
and although the cache took account of that by merging extents,
it did not actually map large extents, but instead was doing a
block by block mapping. Since the journal was only being mapped
on mount, this was not normally noticeable.

With the updated code, it is now possible to use the same extent
mapping system during journal recovery (which will be added in a
later patch). This will allow checking of the integrity of the
journal before any reply of the journal content is attempted. For
this reason the code is moving to bmap.c, since it will be used
more widely in due course.

An exercise left for the reader is to compare the new function
gfs2_map_journal_extents() with gfs2_write_alloc_required()

Additionally, should there be a failure, the error reporting is
also updated to show more detail about what went wrong.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Add allocation parameters structure</title>
<updated>2013-10-02T10:13:25Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2013-10-02T10:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b9cff467144c8c62268db1b0948df089caa0999'/>
<id>urn:sha1:7b9cff467144c8c62268db1b0948df089caa0999</id>
<content type='text'>
This patch adds a structure to contain allocation parameters with
the intention of future expansion of this structure. The idea is
that we should be able to add more information about the allocation
in the future in order to allow the allocator to make a better job
of placing the requests on-disk.

There is no functional difference from applying this patch.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>GFS2: Clean up reservation removal</title>
<updated>2013-09-27T11:49:33Z</updated>
<author>
<name>Steven Whitehouse</name>
</author>
<published>2013-09-27T11:49:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af5c269799feaef110e59ce55b497cdd08712b0c'/>
<id>urn:sha1:af5c269799feaef110e59ce55b497cdd08712b0c</id>
<content type='text'>
The reservation for an inode should be cleared when it is truncated so
that we can start again at a different offset for future allocations.
We could try and do better than that, by resetting the search based on
where the truncation started from, but this is only a first step.

In addition, there are three callers of gfs2_rs_delete() but only one
of those should really be testing the value of i_writecount. While
we get away with that in the other cases currently, I think it would
be better if we made that test specific to the one case which
requires it.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>truncate: drop 'oldsize' truncate_pagecache() parameter</title>
<updated>2013-09-12T22:38:02Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2013-09-12T22:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7caef26767c1727d7abfbbbfbe8b2bb473430d48'/>
<id>urn:sha1:7caef26767c1727d7abfbbbfbe8b2bb473430d48</id>
<content type='text'>
truncate_pagecache() doesn't care about old size since commit
cedabed49b39 ("vfs: Fix vmtruncate() regression").  Let's drop it.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&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: Reserve journal space for quota change in do_grow</title>
<updated>2013-06-27T17:16:27Z</updated>
<author>
<name>Bob Peterson</name>
</author>
<published>2013-06-27T16:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a01aedfe21637c965a7046271fedfdd681eba646'/>
<id>urn:sha1:a01aedfe21637c965a7046271fedfdd681eba646</id>
<content type='text'>
If a GFS2 file system is mounted with quotas and a file is grown
in such a way that its free blocks for the allocation are represented
in a secondary bitmap, GFS2 ran out of blocks in the transaction.
That resulted in "fatal: assertion "tr-&gt;tr_num_buf &lt;= tr-&gt;tr_blocks".
This patch reserves extra blocks for the quota change so the
transaction has enough space.

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

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