<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/bitmap.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md/bitmap.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md/bitmap.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-10-21T20:35:05Z</updated>
<entry>
<title>[PATCH] md: endian annotations for the bitmap superblock</title>
<updated>2006-10-21T20:35:05Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-10-21T17:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f2e639af4bd5e152fc79256e333643d3dd6c10f'/>
<id>urn:sha1:4f2e639af4bd5e152fc79256e333643d3dd6c10f</id>
<content type='text'>
And a couple of bug fixes found by sparse.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: use BUILD_BUG_ON</title>
<updated>2006-10-11T18:14:26Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2006-10-11T08:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f6e3c836508926e50cebe17ad87f59666a7fb47'/>
<id>urn:sha1:5f6e3c836508926e50cebe17ad87f59666a7fb47</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: use ffz instead of find_first_set to convert multiplier to shift</title>
<updated>2006-10-03T15:04:18Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2006-10-03T08:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a638b2dc951c4cafea31b34a1db1c3d94809649e'/>
<id>urn:sha1:a638b2dc951c4cafea31b34a1db1c3d94809649e</id>
<content type='text'>
find_first_set doesn't find the least-significant bit on bigendian machines,
so it is really wrong to use it.

ffs is closer, but takes an 'int' and we have a 'unsigned long'.  So use
ffz(~X) to convert a chunksize into a chunkshift.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: new sysfs interface for setting bits in the write-intent-bitmap</title>
<updated>2006-10-03T15:04:17Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2006-10-03T08:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b1d1dac181d8c1b9492e05cee660a985d035a06'/>
<id>urn:sha1:9b1d1dac181d8c1b9492e05cee660a985d035a06</id>
<content type='text'>
Add a new sysfs interface that allows the bitmap of an array to be dirtied.
The interface is write-only, and is used as follows:

echo "1000" &gt; /sys/block/md2/md/bitmap

(dirty the bit for chunk 1000 [offset 0] in the in-memory and on-disk
bitmaps of array md2)

echo "1000-2000" &gt; /sys/block/md1/md/bitmap

(dirty the bits for chunks 1000-2000 in md1's bitmap)

This is useful, for example, in cluster environments where you may need to
combine two disjoint bitmaps into one (following a server failure, after a
secondary server has taken over the array).  By combining the bitmaps on
the two servers, a full resync can be avoided (This was discussed on the
list back on March 18, 2005, "[PATCH 1/2] md bitmap bug fixes" thread).

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Remove obsolete #include &lt;linux/config.h&gt;</title>
<updated>2006-06-30T17:25:36Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@wohnheim.fh-wedel.de</email>
</author>
<published>2006-06-30T17:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ab3d5624e172c553004ecc862bfeac16d9d68b7'/>
<id>urn:sha1:6ab3d5624e172c553004ecc862bfeac16d9d68b7</id>
<content type='text'>
Signed-off-by: Jörn Engel &lt;joern@wohnheim.fh-wedel.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] md: Change md/bitmap file handling to use bmap to file blocks-fix</title>
<updated>2006-06-26T16:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-06-26T07:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce25c31bdd3b39266debd86a7732007e05983a67'/>
<id>urn:sha1:ce25c31bdd3b39266debd86a7732007e05983a67</id>
<content type='text'>
Fix problems with new bmap based access to bitmap files.

1/ When not using a file based bitmap, attach a NULL list of buffers
   to each page so the common free_buffer routine can cope.
2/ Use submit_bh to read as well as write, rather than vfs_read.
   This makes read and write more symetric.
3/ sync the file before reading, to ensure that the page cache has no
   dirty pages that might get written out later.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md/bitmap: change md/bitmap file handling to use bmap to file blocks</title>
<updated>2006-06-26T16:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-06-26T07:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d785a06a0b9d0cd86b3cc1bf8e236e62af7b47ed'/>
<id>urn:sha1:d785a06a0b9d0cd86b3cc1bf8e236e62af7b47ed</id>
<content type='text'>
If md is asked to store a bitmap in a file, it tries to hold onto the page
cache pages for that file, manipulate them directly, and call a cocktail of
operations to write the file out.  I don't believe this is a supportable
approach.

This patch changes the approach to use the same approach as swap files.  i.e.
bmap is used to enumerate all the block address of parts of the file and we
write directly to those blocks of the device.

swapfile only uses parts of the file that provide a full pages at contiguous
addresses.  We don't have that luxury so we have to cope with pages that are
non-contiguous in storage.  To handle this we attach buffers to each page, and
store the addresses in those buffers.

With this approach the pagecache may contain data which is inconsistent with
what is on disk.  To alleviate the problems this can cause, md invalidates the
pagecache when releasing the file.  If the file is to be examined while the
array is active (a non-critical but occasionally useful function), O_DIRECT io
must be used.  And new version of mdadm will have support for this.

This approach simplifies a lot of code:
 - we no longer need to keep a list of pages which we need to wait for,
   as the b_endio function can keep track of how many outstanding
   writes there are.  This saves a mempool.
 - -EAGAIN returns from write_page are no longer possible (not sure if
    they ever were actually).

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md/bitmap: tidy up i_writecount handling in md/bitmap</title>
<updated>2006-06-26T16:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-06-26T07:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=acc55e220166a5ad898e66ad6153fd62eaaac76d'/>
<id>urn:sha1:acc55e220166a5ad898e66ad6153fd62eaaac76d</id>
<content type='text'>
md/bitmap modifies i_writecount of a bitmap file to make sure that no-one else
writes to it.  The reverting of the change is sometimes done twice, and there
is one error path where it is omitted.

This patch tidies that up.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md/bitmap: remove dead code from md/bitmap</title>
<updated>2006-06-26T16:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-06-26T07:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0cdd02cabd86b5d547f882005e23a93929f0ace9'/>
<id>urn:sha1:0cdd02cabd86b5d547f882005e23a93929f0ace9</id>
<content type='text'>
bitmap_active is never called, and the BITMAP_ACTIVE flag is never users or
tested, so discard them both.

Also remove some out-of-date 'todo' comments.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] md/bitmap: remove unnecessary page reference manipulations from md/bitmap code</title>
<updated>2006-06-26T16:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-06-26T07:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a647e4bc5ce697e25ff50d2e22de68a581b1ed38'/>
<id>urn:sha1:a647e4bc5ce697e25ff50d2e22de68a581b1ed38</id>
<content type='text'>
md/bitmap gets a collection of pages representing the bitmap when it
initialises the bitmap, and puts all the references when discarding the
bitmap.

It also occasionally takes extra references without any good reason, and
sometimes drops them ...  though it doesn't always drop them, which can result
in a memory leak.

This patch removes the unnecessary 'get_page' calls, and the corresponding
'put_page' calls.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
