<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/bitmap.c, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-05-22T03:55:34Z</updated>
<entry>
<title>md/bitmap: record the space available for the bitmap in the superblock.</title>
<updated>2012-05-22T03:55:34Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1dff2b87a34a1ac1d1898ea109bf97ed396aca53'/>
<id>urn:sha1:1dff2b87a34a1ac1d1898ea109bf97ed396aca53</id>
<content type='text'>
Now that bitmaps can grow and shrink it is best if we record
how much space is available.  This means that when
we reduce the size of the bitmap we won't "lose" the space
for late when we might want to increase the size of the bitmap
again.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: make sure reshape request are reflected in superblock.</title>
<updated>2012-05-22T03:55:26Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b81a040481233e5171cb3fbc62f44636d5ea18b2'/>
<id>urn:sha1:b81a040481233e5171cb3fbc62f44636d5ea18b2</id>
<content type='text'>
As a reshape may change the sync_size and/or chunk_size, we need
to update these whenever we write out the bitmap superblock.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: add bitmap_resize function to allow bitmap resizing.</title>
<updated>2012-05-22T03:55:25Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d60b479d177a5735b6b4db6ee5280ef6653f50e7'/>
<id>urn:sha1:d60b479d177a5735b6b4db6ee5280ef6653f50e7</id>
<content type='text'>
This function will allocate the new data structures and copy
bits across from old to new, allowing for the possibility that the
chunksize has changed.

Use the same function for performing the initial allocation
of the structures.  This improves test coverage.

When bitmap_resize is used to resize an existing bitmap, it
only copies '1' bits in, not '0' bits.
So when allocating the bitmap, ensure everything is initialised
to ZERO.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: use DIV_ROUND_UP instead of open-code</title>
<updated>2012-05-22T03:55:25Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15702d7fb6e7a6baf5a04286a227b0ad2fe4a03f'/>
<id>urn:sha1:15702d7fb6e7a6baf5a04286a227b0ad2fe4a03f</id>
<content type='text'>
Also take the opportunity to simplify CHUNK_BLOCK_RATIO.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: create a 'struct bitmap_counts' substructure of 'struct bitmap'</title>
<updated>2012-05-22T03:55:24Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40cffcc0e8f9f6e295630cb8b8d58a13baa6c7f9'/>
<id>urn:sha1:40cffcc0e8f9f6e295630cb8b8d58a13baa6c7f9</id>
<content type='text'>
The new "struct bitmap_counts" contains all the fields that are
related to counting the number of active writes in each bitmap chunk.

Having this separate will make it easier to change the chunksize
or overall size of a bitmap atomically.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: make bitmap bitops atomic.</title>
<updated>2012-05-22T03:55:23Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63c68268b2fc63f7f612dfebecb5c9cbbd3ebeaf'/>
<id>urn:sha1:63c68268b2fc63f7f612dfebecb5c9cbbd3ebeaf</id>
<content type='text'>
This allows us to remove spinlock protection which is
more heavy-weight than simple atomics.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: make _page_attr bitops atomic.</title>
<updated>2012-05-22T03:55:22Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdfd1140731a67c74fd74814f222c8078171adcd'/>
<id>urn:sha1:bdfd1140731a67c74fd74814f222c8078171adcd</id>
<content type='text'>
Using e.g. set_bit instead of __set_bit and using test_and_clear_bit
allow us to remove some locking and contract other locked ranges.

It is rare that we set or clear a lot of these bits, so gain should
outweigh any cost.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: merge bitmap_file_unmap and bitmap_file_put.</title>
<updated>2012-05-22T03:55:21Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fae7d326cd0905624c173337fdfcfe9b86b9e6e2'/>
<id>urn:sha1:fae7d326cd0905624c173337fdfcfe9b86b9e6e2</id>
<content type='text'>
There functions really do one thing together: release the
'bitmap_storage'.  So make them just one function.

Since we removed the locking (previous patch), we don't need to zero
any fields before freeing them, so it all becomes a bit simpler.


Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: remove async freeing of bitmap file.</title>
<updated>2012-05-22T03:55:21Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62f82faaceb483284ea938b3a092b9f0a4d2d029'/>
<id>urn:sha1:62f82faaceb483284ea938b3a092b9f0a4d2d029</id>
<content type='text'>
There is no real value in freeing things the moment there is an error.
It is just as good to free the bitmap file and pages when the bitmap
is explicitly removed (and replaced?) or at shutdown.

With this gone, the bitmap will only disappear when the array is
quiescent, so we can remove some locking.

As the 'filemap' doesn't disappear now, include extra checks before
trying to write any of it out.
Also remove the check for "has it disappeared" in
bitmap_daemon_write().


Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: convert some spin_lock_irqsave to spin_lock_irq</title>
<updated>2012-05-22T03:55:19Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-22T03:55:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7466712347c58c367636cc875801c8703bc729e7'/>
<id>urn:sha1:7466712347c58c367636cc875801c8703bc729e7</id>
<content type='text'>
All of these sites can only be called from process context with
irqs enabled, so using irqsave/irqrestore just adds noise.
Remove it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
