summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kbuild: fix generic asm-offsets.h supportSam Ravnborg2005-09-102-3/+4
| | | | | | | | iThis fixes a bug where the generated asm-offsets.h file was saved in the source tree even with make O=. Thanks to Stephen Rothwell <sfr@canb.auug.org.au> for the report. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: add objectifySam Ravnborg2005-09-101-0/+3
| | | | | | | | Use foo := $(call objectify, $(foo)) to prefix $(foo) with $(obj)/ unless $(foo) is an absolute path. For now no in-tree users - soon to come. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] kbuild: ignore all debugging info sections in ↵Roland McGrath2005-09-101-6/+1
| | | | | | | | | | | | | scripts/reference_discarded.pl GCC 4 emits more DWARF debugging information than before and there is now a .debug_loc section as well. This causes "make buildcheck" to fail. Rather than just add that one to the special case list, I used a regexp to ignore any .debug_ANYTHING sections in case more show up in the future. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] kbuild: fix split-include dependencyJan Beulich2005-09-101-4/+6
| | | | | | | | | | | | | Splitting of autoconf.h requires that split-include was built before, and needs to be-re-done when split-include changes. This dependency was previously missing. Additionally, since autoconf.h is (suppoosed to be) generated as a side effect of executing config targets, include/linux should be created prior to running the respective sub-make. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] kbuild: adjust .version updatingJan Beulich2005-09-101-2/+8
| | | | | | | | | | | In order to maintain a more correct build number, updates to the version number should only be commited after a successful link of vmlinux, not before (so that errors in the link process don't lead to pointless increments). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] kbuild: CF=<arguments> passes arguments to sparseviro@ZenIV.linux.org.uk2005-09-101-1/+1
| | | | | | | | Allows to add to sparse arguments without mutilating makefiles - just pass CF=<arguments> and they will be added to CHECKFLAGS. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] kbuild: add kernelrelease to 'make help'Zach Brown2005-09-101-0/+1
| | | | | | | Dunno if there was a conscious decision to leave it out, but if you're happy with adding some help text for it here's a patch against 2.6.13-mm1.. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] md: fix BUG when raid10 rebuilds without enough drivesNeilBrown2005-09-091-1/+7
| | | | | | | | This shouldn't be a BUG. We should cope. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: fix raid10 assembly when too many devices are missingNeilBrown2005-09-091-3/+27
| | | | | | | | | | | | If you try to assemble an array with too many missing devices, raid10 will now reject the attempt, instead of allowing it. Also check when hot-adding a drive and refuse the hot-add if the array is beyond hope. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: really get sb_size setting right in all casesNeilBrown2005-09-091-2/+2
| | | | | | | | | | There was another case where sb_size wasn't being set, so instead do the sensible thing and set if when filling in the content of a superblock. That ensures that whenever we write a superblock, the sb_size MUST be set. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: make sure the new 'sb_size' is set properly device added without ↵NeilBrown2005-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | pre-existing superblock. There are two ways to add devices to an md/raid array. It can have superblock written to it, and then given to the md driver, which will read the superblock (the new way) or md can be told (through SET_ARRAY_INFO) the shape of the array, and the told about individual drives, and md will create the required superblock (the old way). The newly introduced sb_size was only set for drives being added the new way, not the old ways. Oops :-( Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: report spare drives in /proc/mdstatNeilBrown2005-09-091-1/+2
| | | | | | | | Just like failed drives have (F), so spare drives now have (S). Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: add information about superblock version to /proc/mdstatNeilBrown2005-09-091-0/+9
| | | | | | | | | Leave it unchanged if the original (0.90) is used, incase it might be a compatability problem. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: use queue_hardsect_size instead of block_size for md superblock ↵NeilBrown2005-09-091-1/+1
| | | | | | | | | | size calc. Doh. I want the physical hard-sector-size, not the current block size... Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: choose better default offset for bitmap.NeilBrown2005-09-091-2/+1
| | | | | | | | | | On reflection, a better default location for hot-adding bitmaps with version-1 superblocks is immediately after the superblock. There might not be much room there, but there is usually atleast 3k, and that is a good start. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: tidy up daemon stop/start code in md/bitmap.cNeilBrown2005-09-092-47/+28
| | | | | | | | | | | | The bitmap code used to have two daemons, so there is some 'common' start/stop code. But now there is only one, so the common code is just noise. This patch tidies this up somewhat. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: ensure bitmap_writeback_daemon handles shutdown properly.NeilBrown2005-09-091-0/+3
| | | | | | | | | | mddev->bitmap gets clearred before the writeback daemon is stopped. So the write_back daemon needs to be careful not to dereference the 'bitmap' if it is NULL. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: use kthread infrastructure in mdNeilBrown2005-09-091-38/+10
| | | | | | | | | | | | | Switch MD to use the kthread infrastructure, to simplify the code and get rid of tasklist_lock abuse in md_unregister_thread. Also don't flush signals in md_thread, as the called thread will always do that. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: write-intent bitmap support for raid6NeilBrown2005-09-092-11/+124
| | | | | | | | This is a direct port of the raid5 patch. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: add write-intent-bitmap support to raid5NeilBrown2005-09-093-13/+137
| | | | | | | | | | | | | | | | | | | | | | | Most awkward part of this is delaying write requests until bitmap updates have been flushed. To achieve this, we have a sequence number (seq_flush) which is incremented each time the raid5 is unplugged. If the raid thread notices that this has changed, it flushes bitmap changes, and assigned the value of seq_flush to seq_write. When a write request arrives, it is given the number from seq_write, and that write request may not complete until seq_flush is larger than the saved seq number. We have a new queue for storing stripes which are waiting for a bitmap flush and an extra flag for stripes to record if the write was 'degraded' and so should not clear the a bit in the bitmap. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: limit size of sb read/written to appropriate amountNeilBrown2005-09-092-5/+16
| | | | | | | | | | | | | version-1 superblocks are not (normally) 4K long, and can be of variable size. Writing the full 4K can cause corruption (but only in non-default configurations). With this patch the super-block-flavour can choose a size to read, and set a size to write based on what it finds. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: remove old cruft from md_k.h header fileNeilBrown2005-09-091-64/+0
| | | | | | | | These inlines haven't been used for ages, they should go. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: fix bitmap/read_sb_page so that it handles errors properly.NeilBrown2005-09-091-9/+10
| | | | | | | | | | | | read_sb_page() assumed that if sync_page_io fails, the device would be marked faultly. However it isn't. So in the face of error, read_sb_page would loop forever. Redo the logic so that this cannot happen. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: allow md to load a superblock with feature-bit '1' setNeilBrown2005-09-092-3/+8
| | | | | | | | | | As this is used to flag an internal bitmap. Also, introduce symbolic names for feature bits. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: allow hot-adding devices to arrays with non-persistant superblocks.NeilBrown2005-09-091-2/+5
| | | | | | | | | | | | | | | It is possibly (and occasionally useful) to have a raid1 without persistent superblocks. The code in add_new_disk for adding a device to such an array always tries to read a superblock. This will obviously fail. So do the appropriate test and call md_import_device with appropriate args. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: do not set mddev->bitmap until bitmap is fully initialisedNeilBrown2005-09-091-9/+24
| | | | | | | | | | | | When hot-adding a bitmap, bitmap_daemon_work could get called while the bitmap is being created, so don't set mddev->bitmap until the bitmap is ready. This requires freeing the bitmap inside bitmap_create if creation failed part-way through. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: make sure bitmap_daemon_work actually does work.NeilBrown2005-09-091-0/+1
| | | | | | | | | The 'lastrun' time wasn't being initialised, so it could be half a jiffie-cycle before it seemed to be time to do work again. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: raid1_quiesce is back to front, fix it.NeilBrown2005-09-091-2/+2
| | | | | | | | | | | A state of 0 mean 'not quiesced' A state of 1 means 'is quiesced' The original code got this wrong. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: support md/linear array with components greater than 2 terabytes.NeilBrown2005-09-092-31/+68
| | | | | | | | | | | | | | | linear currently uses division by the size of the smallest componenet device to find which device a request goes to. If that smallest device is larger than 2 terabytes, then the division will not work on some systems. So we introduce a pre-shift, and take care not to make the hash table too large, much like the code in raid0. Also get rid of conf->nr_zones, which is not needed. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: add write-behind support for md/raid1NeilBrown2005-09-095-16/+165
| | | | | | | | | | | | | | | | | | | If a device is flagged 'WriteMostly' and the array has a bitmap, and the bitmap superblock indicates that write_behind is allowed, then write_behind is enabled for WriteMostly devices. Write requests will be acknowledges as complete to the caller (via b_end_io) when all non-WriteMostly devices have completed the write, but will not be cleared from the bitmap until all devices complete. This requires memory allocation to make a local copy of the data being written. If there is insufficient memory, then we fall-back on normal write semantics. Signed-Off-By: Paul Clements <paul.clements@steeleye.com> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: support write-mostly device in raid1NeilBrown2005-09-094-26/+82
| | | | | | | | | This allows a device in a raid1 to be marked as "write mostly". Read requests will only be sent if there is no other option. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: all hot-add and hot-remove of md intent logging bitmapsNeilBrown2005-09-093-17/+127
| | | | | | | | | | | | | | Both file-bitmaps and superblock bitmaps are supported. If you add a bitmap file on the array device, you lose. This introduces a 'default_bitmap_offset' field in mddev, as the ioctl used for adding a superblock bitmap doesn't have room for giving an offset. Later, this value will be setable via sysfs. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: improve handling of bitmap initialisation.NeilBrown2005-09-091-7/+21
| | | | | | | | | | When we find a 'stale' bitmap, possibly because it is new, we should just assume every bit needs to be set, but rather base the setting of bits on the current state of the array (degraded and recovery_cp). Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: don't allow new md/bitmap file to be set if one already existsNeilBrown2005-09-091-1/+1
| | | | | | | | ... otherwise we loose a reference and can never free the file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] dm: fix rh_dec()/rh_inc() race in dm-raid1.cJun'ichi Nomura2005-09-091-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix another bug in dm-raid1.c that the dirty region may stay in or be moved to clean list and freed while in use. It happens as follows: CPU0 CPU1 ------------------------------------------------------------------------------ rh_dec() if (atomic_dec_and_test(pending)) <the region is still marked dirty> rh_inc() if the region is clean mark the region dirty and remove from clean list mark the region clean and move to clean list atomic_inc(pending) At this stage, the region is in clean list and will be mistakenly reclaimed by rh_update_states() later. Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: fail IO request to md that require a barrier.NeilBrown2005-09-097-0/+34
| | | | | | | | | md does not yet support BIO_RW_BARRIER, so be honest about it and fail (-EOPNOTSUPP) any such requests. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] md: fix minor error in raid10 read-balancing calculation.NeilBrown2005-09-091-1/+2
| | | | | | | | | | | | | 'this_sector' is a virtual (array) address while 'head_position' is a physical (device) address, so substraction doesn't make any sense. devs[slot].addr should be used instead of this_sector. However, this patch doesn't make much practical different to the read balancing due to the effects of later code. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild Linus Torvalds2005-09-09171-386/+247
|\
| * kbuild: um fix so it compile with generic asm-offsets.h supportSam Ravnborg2005-09-092-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | um has it own set of files for asm-offsets. So for now the gen-asm-offset macro is just duplicated in the um Makefile. This may well be the final solution since um is a bit special compared to other architectures - time will tell. Also added a dummy arch/um/kernel/asm-offsets.h file to keep kbuild happy. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: frv,m32r,sparc64 introduce fake asm-offsets.h fileSam Ravnborg2005-09-093-0/+3
| | | | | | | | | | | | | | Needed to get them to build. And a hint to avoid hardcoding to many constants in assembler. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: cris use generic asm-offsets.h supportSam Ravnborg2005-09-093-10/+4
| | | | | | | | | | | | | | | | | | | | Cris has a dedicated asm-offsets.c file per subarchitecture. So a symlink is created to put the desired asm-offsets.c file in $(ARCH)/kernel This is absolutely not good practice, but it was the trick used in the rest of the cris code. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: mips use generic asm-offsets.h supportSam Ravnborg2005-09-0920-52/+28
| | | | | | | | | | | | | | | | | | Removed obsolete stuff from arch makefile. mips had a special rule for generating asm-offsets.h so preserved it using an architecture specific hook in top-level Kbuild file. Renamed .h file to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: ia64 use generic asm-offsets.h supportSam Ravnborg2005-09-097-20/+13
| | | | | | | | | | | | | | | | | | Delete obsolete stuff from arch Makefile Rename file to asm-offsets.h The trick used in the arch Makefile to circumvent the circular dependency is kept. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: v850 use generic asm-offsets.h supportSam Ravnborg2005-09-093-14/+2
| | | | | | | | | | | | | | | | Deleted obsolete stuff from arch makefile Renamed .c file to asm-offsets.h Fix include of asm-offsets.h to use new name Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: alpha,x86_64 use generic asm-offsets.h supportSam Ravnborg2005-09-0915-34/+13
| | | | | | | | | | | | | | Delete obsolete stuff from arch makefiles Rename .h file to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: arm - use generic asm-offsets.h supportSam Ravnborg2005-09-0928-34/+29
| | | | | | | | | | | | | | Delete obsoleted stuff from arch Makefile and rename constants.h to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h supportSam Ravnborg2005-09-0963-112/+62
| | | | | | | | | | | | Delete obsoleted parts form arch makefiles and rename to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: arm26,sparc use generic asm-offset supportSam Ravnborg2005-09-0916-36/+16
| | | | | | | | | | | | Rename all includes to use asm-offsets.h to match generic name Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: h8300,m68knommu,sh,sh64 use generic asm-offsets.h supportSam Ravnborg2005-09-094-33/+4
| | | | | | | | | | | | | | h8300, m68knommu, sh and sh64 all used the name asm-offsets.h so minimal changes required. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: full dependency check on asm-offsets.hSam Ravnborg2005-09-098-42/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building asm-offsets.h has been moved to a seperate Kbuild file located in the top-level directory. This allow us to share the functionality across the architectures. The old rules in architecture specific Makefiles will die in subsequent patches. Furhtermore the usual kbuild dependency tracking is now used when deciding to rebuild asm-offsets.s. So we no longer risk to fail a rebuild caused by asm-offsets.c dependencies being touched. With this common rule-set we now force the same name across all architectures. Following patches will fix the rest. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
OpenPOWER on IntegriCloud