#
0764147b |
| 12-Jul-2007 |
Milan Broz <mbroz@redhat.com> |
dm snapshot: permit invalid activation
Allow invalid snapshots to be activated instead of failing.
This allows userspace to reinstate any given snapshot state - for example after an unscheduled reb
dm snapshot: permit invalid activation
Allow invalid snapshots to be activated instead of failing.
This allows userspace to reinstate any given snapshot state - for example after an unscheduled reboot - and clean up the invalid snapshot at its leisure.
Cc: stable@kernel.org Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
028867ac |
| 12-Jul-2007 |
Alasdair G Kergon <agk@redhat.com> |
dm: use kmem_cache macro
Use new KMEM_CACHE() macro and make the newly-exposed structure names more meaningful. Also remove some superfluous casts and inlines (let a modern compiler be the judge).
dm: use kmem_cache macro
Use new KMEM_CACHE() macro and make the newly-exposed structure names more meaningful. Also remove some superfluous casts and inlines (let a modern compiler be the judge).
Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v2.6.22, v2.6.22-rc7, v2.6.22-rc6, v2.6.22-rc5, v2.6.22-rc4, v2.6.22-rc3, v2.6.22-rc2, v2.6.22-rc1, v2.6.21, v2.6.21-rc7, v2.6.21-rc6, v2.6.21-rc5, v2.6.21-rc4, v2.6.21-rc3, v2.6.21-rc2, v2.6.21-rc1, v2.6.20, v2.6.20-rc7, v2.6.20-rc6, v2.6.20-rc5, v2.6.20-rc4, v2.6.20-rc3, v2.6.20-rc2, v2.6.20-rc1 |
|
#
c642f9e0 |
| 08-Dec-2006 |
Adrian Bunk <bunk@stusta.de> |
[PATCH] make drivers/md/dm-snap.c:ksnapd static
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: L
[PATCH] make drivers/md/dm-snap.c:ksnapd static
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
31c93a0c |
| 08-Dec-2006 |
Milan Broz <mbroz@redhat.com> |
[PATCH] dm: snapshot: abstract memory release
Move the code that releases memory used by a snapshot into a separate function.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G
[PATCH] dm: snapshot: abstract memory release
Move the code that releases memory used by a snapshot into a separate function.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
d2a7ad29 |
| 08-Dec-2006 |
Kiyoshi Ueda <k-ueda@ct.jp.nec.com> |
[PATCH] dm: map and endio symbolic return codes
Update existing targets to use the new symbols for return values from target map and end_io functions.
There is no effect on behaviour.
Test results
[PATCH] dm: map and endio symbolic return codes
Update existing targets to use the new symbols for return values from target map and end_io functions.
There is no effect on behaviour.
Test results: Done build test without errors.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
e18b890b |
| 06-Dec-2006 |
Christoph Lameter <clameter@sgi.com> |
[PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.
The patch was generated using the following script:
#!/bin/sh # # Replace one string by another in all
[PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.
The patch was generated using the following script:
#!/bin/sh # # Replace one string by another in all the kernel sources. #
set -e
for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done
The script was run like this
sh replace kmem_cache_t "struct kmem_cache"
Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
Revision tags: v2.6.19 |
|
#
c4028958 |
| 22-Nov-2006 |
David Howells <dhowells@redhat.com> |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
|
Revision tags: v2.6.19-rc6, v2.6.19-rc5, v2.6.19-rc4, v2.6.19-rc3, v2.6.19-rc2, v2.6.19-rc1 |
|
#
695368ac |
| 03-Oct-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: fix freeing pending exception
If a snapshot became invalid while there are outstanding pending_exceptions, when pending_complete() processes each one it forgets to remove the co
[PATCH] dm snapshot: fix freeing pending exception
If a snapshot became invalid while there are outstanding pending_exceptions, when pending_complete() processes each one it forgets to remove the corresponding exception from its exception table before freeing it.
Fix this by moving the 'out:' label up one statement so that remove_exception() is always called. Then __invalidate_exception() no longer needs to call it and its 'pe' argument become superfluous.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
4b832e8d |
| 03-Oct-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: tidy pe ref counting
Rename sibling_count to ref_count and introduce get and put functions.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm
[PATCH] dm snapshot: tidy pe ref counting
Rename sibling_count to ref_count and introduce get and put functions.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
ca3a931f |
| 03-Oct-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: add workqueue
Add a workqueue so that I/O can be queued up to be flushed from a separate thread (e.g. if local interrupts are disabled).
A new per-snapshot spinlock pe_lock is
[PATCH] dm snapshot: add workqueue
Add a workqueue so that I/O can be queued up to be flushed from a separate thread (e.g. if local interrupts are disabled).
A new per-snapshot spinlock pe_lock is introduced to protect queued_bios.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
9d493fa8 |
| 03-Oct-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: tidy pending_complete
This patch rearranges the pending_complete() code so that the functional changes in subsequent patches are clearer.
By consolidating the error and the non
[PATCH] dm snapshot: tidy pending_complete
This patch rearranges the pending_complete() code so that the functional changes in subsequent patches are clearer.
By consolidating the error and the non-error paths, we can move error_snapshot_bios() and __flush_bios() in line.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
ba40a2aa |
| 03-Oct-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: tidy snapshot_map
This patch rearranges the snapshot_map code so that the functional changes in subsequent patches are clearer.
The only functional change is to replace the exi
[PATCH] dm snapshot: tidy snapshot_map
This patch rearranges the snapshot_map code so that the functional changes in subsequent patches are clearer.
The only functional change is to replace the existing read lock with a write lock which the next patch needs.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
f9cea4f7 |
| 03-Oct-2006 |
Mark McLoughlin <markmc@redhat.com> |
[PATCH] dm snapshot: fix metadata error handling
Fix the error handling when store.read_metadata is called: the error should be returned immediately.
Signed-off-by: Mark McLoughlin <markmc@redhat.c
[PATCH] dm snapshot: fix metadata error handling
Fix the error handling when store.read_metadata is called: the error should be returned immediately.
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
4c7e3bf4 |
| 03-Oct-2006 |
Mark McLoughlin <markmc@redhat.com> |
[PATCH] dm snapshot: allow zero chunk_size
The chunk size of snapshots cannot be changed so it is redundant to require it as a parameter when activating an existing snapshot. Allow a value of zero
[PATCH] dm snapshot: allow zero chunk_size
The chunk size of snapshots cannot be changed so it is redundant to require it as a parameter when activating an existing snapshot. Allow a value of zero in this case and ignore it. For a new snapshot, use a default value if zero is specified.
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
92c060a6 |
| 03-Oct-2006 |
Milan Broz <mbroz@redhat.com> |
[PATCH] dm snapshot: fix invalidation ENOMEM
Fix ENOMEM error sign.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm
[PATCH] dm snapshot: fix invalidation ENOMEM
Fix ENOMEM error sign.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
Revision tags: v2.6.18, v2.6.18-rc7, v2.6.18-rc6, v2.6.18-rc5, v2.6.18-rc4, v2.6.18-rc3, v2.6.18-rc2, v2.6.18-rc1 |
|
#
6ab3d562 |
| 30-Jun-2006 |
Jörn Engel <joern@wohnheim.fh-wedel.de> |
Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
#
72d94861 |
| 26-Jun-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm: improve error message consistency
Tidy device-mapper error messages to include context information automatically.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew
[PATCH] dm: improve error message consistency
Tidy device-mapper error messages to include context information automatically.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
c51c2752 |
| 26-Jun-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: unify chunk_size
Persistent snapshots currently store a private copy of the chunk size. Userspace also supplies the chunk size when loading a snapshot. Ensure consistency by on
[PATCH] dm snapshot: unify chunk_size
Persistent snapshots currently store a private copy of the chunk size. Userspace also supplies the chunk size when loading a snapshot. Ensure consistency by only storing the chunk_size in one place instead of two.
Currently the two sizes will differ if the chunk size supplied by userspace does not match the chunk size an existing snapshot actually uses. Amongst other problems, this causes an incorrect 'percentage full' to be reported.
The patch ensures consistency by only storing the chunk_size in one place, removing it from struct pstore. Some initialisation is delayed until the correct chunk_size is known. If read_header() discovers that the wrong chunk size was supplied, the 'area' buffer (which the header already got read into) is reinitialised to the correct size.
[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
Revision tags: v2.6.17, v2.6.17-rc6, v2.6.17-rc5, v2.6.17-rc4, v2.6.17-rc3, v2.6.17-rc2, v2.6.17-rc1 |
|
#
138728dc |
| 27-Mar-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] dm snapshot: fix kcopyd destructor
Before removing a snapshot, wait for the completion of any kcopyd jobs using it.
Do this by maintaining a count (nr_jobs) of how many outstanding jobs eac
[PATCH] dm snapshot: fix kcopyd destructor
Before removing a snapshot, wait for the completion of any kcopyd jobs using it.
Do this by maintaining a count (nr_jobs) of how many outstanding jobs each kcopyd_client has.
The snapshot destructor first unregisters the snapshot so that no new kcopyd jobs (created by writes to the origin) will reference that particular snapshot. kcopyd_client_destroy() is now run next to wait for the completion of any outstanding jobs before the snapshot exception structures (that those jobs reference) are freed.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
4ee218cd |
| 27-Mar-2006 |
Andrew Morton <akpm@osdl.org> |
[PATCH] dm: remove SECTOR_FORMAT
We don't know what type sector_t has. Sometimes it's unsigned long, sometimes it's unsigned long long. For example on ppc64 it's unsigned long with CONFIG_LBD=n an
[PATCH] dm: remove SECTOR_FORMAT
We don't know what type sector_t has. Sometimes it's unsigned long, sometimes it's unsigned long long. For example on ppc64 it's unsigned long with CONFIG_LBD=n and on x86_64 it's unsigned long long with CONFIG_LBD=n.
The way to handle all of this is to always use unsigned long long and to always typecast the sector_t when printing it.
Acked-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
76df1c65 |
| 27-Mar-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] device-mapper snapshot: fix invalidation
When a snapshot becomes invalid, s->valid is set to 0. In this state, a snapshot can no longer be accessed.
When s->lock is acquired, before doing
[PATCH] device-mapper snapshot: fix invalidation
When a snapshot becomes invalid, s->valid is set to 0. In this state, a snapshot can no longer be accessed.
When s->lock is acquired, before doing anything else, s->valid must be checked to ensure the snapshot remains valid.
This patch eliminates some races (that may cause panics) by adding some missing checks. At the same time, some unnecessary levels of indentation are removed and snapshot invalidation is moved into a single function that always generates a device-mapper event.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
b4b610f6 |
| 27-Mar-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] device-mapper snapshot: replace sibling list
The siblings "list" is used unsafely at the moment.
Firstly, only the element on the list being changed gets locked (via the snapshot lock), not
[PATCH] device-mapper snapshot: replace sibling list
The siblings "list" is used unsafely at the moment.
Firstly, only the element on the list being changed gets locked (via the snapshot lock), not the next and previous elements which have pointers that are also being changed.
Secondly, if you have two or more snapshots and write to the same chunk a second time before every snapshot has finished making its private copy of the data, if you're unlucky, _origin_write() could attempt its list_merge() and dereference a 'last' pointer to a pending_exception structure that has just been freed.
Analysis reveals that the list is actually only there for reference counting. If 5 pending_exceptions are needed in origin_write, then the 5 are joined together into a 5-element list - without a separate list head because there's nowhere suitable to store it. As the pending_exceptions complete, they are removed from the list one-by-one and any contents of origin_bios get moved across to one of the remaining pending_exceptions on the list. Whichever one is last is detected because list_empty() is then true and the origin_bios get submitted.
The fix proposed here uses an alternative reference counting mechanism by choosing one of the pending_exceptions as primary and maintaining an atomic counter there.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
eccf0817 |
| 27-Mar-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] device-mapper snapshot: fix origin_write pending_exception submission
Say you have several snapshots of the same origin and then you issue a write to some place in the origin for the first t
[PATCH] device-mapper snapshot: fix origin_write pending_exception submission
Say you have several snapshots of the same origin and then you issue a write to some place in the origin for the first time.
Before the device-mapper snapshot target lets the write go through to the underlying device, it needs to make a copy of the data that is about to be overwritten. Each snapshot is independent, so it makes one copy for each snapshot.
__origin_write() loops through each snapshot and checks to see whether a copy is needed for that snapshot. (A copy is only needed the first time that data changes.)
If a copy is needed, the code allocates a 'pending_exception' structure holding the details. It links these together for all the snapshots, then works its way through this list and submits the copying requests to the kcopyd thread by calling start_copy(). When each request is completed, the original pending_exception structure gets freed in pending_complete().
If you're very unlucky, this structure can get freed *before* the submission process has finished walking the list.
This patch:
1) Creates a new temporary list pe_queue to hold the pending exception structures;
2) Does all the bookkeeping up-front, then walks through the new list safely and calls start_copy() for each pending_exception that needed it;
3) Avoids attempting to add pe->siblings to the list if it's already connected.
[NB This does not fix all the races in this code. More patches will follow.]
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
#
93d2341c |
| 26-Mar-2006 |
Matthew Dobson <colpatch@us.ibm.com> |
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool() rather than calling mempool_create() with extra arguments, saving about 30 l
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool() rather than calling mempool_create() with extra arguments, saving about 30 lines of code and increasing readability.
Signed-off-by: Matthew Dobson <colpatch@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|
Revision tags: v2.6.16, v2.6.16-rc6, v2.6.16-rc5, v2.6.16-rc4, v2.6.16-rc3, v2.6.16-rc2 |
|
#
4aac0a63 |
| 01-Feb-2006 |
Alasdair G Kergon <agk@redhat.com> |
[PATCH] device-mapper snapshot: barriers not supported
The snapshot and origin targets are incapable of handling barriers and need to indicate this.
Signed-off-by: Alasdair G Kergon <agk@redhat.com
[PATCH] device-mapper snapshot: barriers not supported
The snapshot and origin targets are incapable of handling barriers and need to indicate this.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
show more ...
|