[PATCH 000 of 2] knfsd: Close oopsable race in nfsd

2007-04-16 Thread NeilBrown
(and so it not being cc:ed to [EMAIL PROTECTED]). Thanks, NeilBrown [PATCH 001 of 2] knfsd: Use a spinlock to protect sk_info_authunix [PATCH 002 of 2] knfsd: Rename sk_defer_lock to sk_lock - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

[PATCH 001 of 2] knfsd: Use a spinlock to protect sk_info_authunix

2007-04-16 Thread NeilBrown
sk_info_authunix is not being protected properly so the object that it points to can be cache_put twice, leading to corruption. We borrow svsk-sk_defer_lock to provide the protection. We should probably rename that lock to have a more generic name - later. Thanks to Gabriel for reporting this.

[PATCH 002 of 2] knfsd: Rename sk_defer_lock to sk_lock

2007-04-16 Thread NeilBrown
Now that sk_defer_lock protects two different things, make the name more generic. Also don't bother with disabling _bh as the lock is only ever taken from process context. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./include/linux/sunrpc/svcsock.h |3 ++-

[PATCH 001 of 4] knfsd: Fix return value for writes to some files in 'nfsd' filesystem.

2007-02-11 Thread NeilBrown
Most files in the 'nfsd' filesystem are transactional. When you write, a reply is generated that can be read back only on the same 'file'. If the reply has zero length, the 'write' will incorrectly return a value of '0' instead of the length that was written. This causes 'rpc.nfsd' to give an

[PATCH 003 of 4] knfsd: Add some new fsid types.

2007-02-11 Thread NeilBrown
Add support for using a filesystem UUID to identify and export point in the filehandle. For NFSv2, this UUID is xor-ed down to 4 or 8 bytes so that it doesn't take up too much room. For NFSv3+, we use the full 16 bytes, and possibly also a 64bit inode number for exports beneath the root of a

[PATCH 000 of 4] knfsd: fixes and enhancements for 2.6.21

2007-02-11 Thread NeilBrown
Following are 4 patchs from knfsd suitable for 2.6.21. Numbers 3 and 4 provide new usability features that require a new nfs-utils to make full use of (all nfs-utils will ofcourse continue to work providing the functionality it always provided). (3) allows a 16 byte uuid to be used to identify

[PATCH 002 of 4] knfsd: Tidy up choice of filesystem-identifier when creating a filehandle.

2007-02-11 Thread NeilBrown
If we are using the same version/fsid as a current filehandle, then there is no need to verify the the numbers are valid for this export, and they must be (we used them to find this export). This allows us to simplify the fsid selection code. Also change ref_fh_version and ref_fh_fsid_type to

[PATCH 004 of 4] knfsd: Allow the server to provide a gid list when using AUTH_UNIX authentication.

2007-02-11 Thread NeilBrown
AUTH_UNIX authentication (the standard with NFS) has a limit of 16 groups ids. This causes problems for people in more than 16 groups. So allow the server to map a uid into a list of group ids based on local knowledge rather depending on the (possibly truncated) list from the client. If there

[PATCH 000 of 9] knfsd: NFSv4 ACL improvements and a couple of bug fixes.

2007-02-12 Thread NeilBrown
following are 9 patches from Bruce Fields for the NFSv4 server, mostly ACL related. Suitable for 2.6.21. Thanks, NeilBrown [PATCH 001 of 9] knfsd: nfsd4: fix non-terminated string [PATCH 002 of 9] knfsd: nfsd4: relax checking of ACL inheritance bits [PATCH 003 of 9] knfsd: nfsd4: simplify

[PATCH 001 of 9] knfsd: nfsd4: fix non-terminated string

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] The server name is expected to be a null-terminated string, so we can't pass in the raw client identifier. What's more, the client identifier is just a binary, not necessarily printable, blob. Let's just use the ip address instead. The server name

[PATCH 002 of 9] knfsd: nfsd4: relax checking of ACL inheritance bits

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] The rfc allows us to be more permissive about the ACL inheritance bits we accept: If the server supports a single inherit ACE flag that applies to both files and directories, the server may reject the request (i.e., requiring the

[PATCH 005 of 9] knfsd: nfsd4: fix memory leak on kmalloc failure in savemem

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] The wrong pointer is being kfree'd in savemem() when defer_free returns with an error. Signed-off-by: Benny Halevy [EMAIL PROTECTED] Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output

[PATCH 004 of 9] knfsd: nfsd4: represent nfsv4 acl with array instead of linked list

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] Simplify the memory management and code a bit by representing acls with an array instead of a linked list. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./fs/nfsd/nfs4acl.c| 153

[PATCH 006 of 9] knfsd: nfsd4: fix error return on unsupported acl

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] We should be returning ATTRNOTSUPP, not NOTSUPP, when acls are unsupported. Also fix a comment. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./fs/nfsd/nfs4xdr.c |2 +-

[PATCH 003 of 9] knfsd: nfsd4: simplify nfsv4-posix translation

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] The code that splits an incoming nfsv4 ACL into inheritable and effective parts can be combined with the the code that translates each to a posix acl, resulting in simpler code that requires one less pass through the ACL. Signed-off-by: J. Bruce Fields

[PATCH 009 of 9] knfsd: nfsd4: fix handling of directories without default ACLs

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] When setting an ACL that lacks inheritable ACEs on a directory, we should set a default ACL of zero length, not a default ACL with all bits denied. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat

[PATCH 007 of 9] knfsd: nfsd4: acls: don't return explicit mask

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] Return just the effective permissions, and forget about the mask. It isn't worth the complexity. WARNING: This breaks backwards compatibility with overly-picky nfsv4-posix acl translation, as may has been included in some patched versions of libacl. To

[PATCH 008 of 9] knfsd: nfsd4: acls: avoid unnecessary denies

2007-02-12 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] We're inserting deny's between some ACEs in order to enforce posix draft acl semantics which prevent permissions from accumulating across entries in an acl. That's fine, but we're doing that by inserting a deny after *every* allow, which is overkill. We

[PATCH] knfsd: Stop NFSD writes from being broken into lots of little writes to filesystem.

2007-02-12 Thread NeilBrown
Another nfsd patch for 2.6.21... ### Comments for Changeset When NFSD receives a write request, the data is typically in a number of 1448 byte segments and writev is used to collect them together. Unfortunately, generic_file_buffered_write passes these to the filesystem one at a time, so an

[PATCH 000 of 4] knfsd: 4 bugfixes for nfsd suitable for 2.6.21

2007-03-22 Thread NeilBrown
Following are 4 small bugfixes for nfsd that are suitable for 2.6.21. Thanks, NeilBrown [PATCH 001 of 4] knfsd: Allow nfsd READDIR to return 64bit cookies [PATCH 002 of 4] knfsd: nfsd4: fix inheritance flags on v4 ace derived from posix default ace [PATCH 003 of 4] knfsd: nfsd4: demote

[PATCH 001 of 4] knfsd: Allow nfsd READDIR to return 64bit cookies

2007-03-22 Thread NeilBrown
-readdir passes lofft_t offsets (used as nfs cookies) to nfs3svc_encode_entry{,_plus}, but when they pass it on to encode_entry it becomes an 'off_t', which isn't good. So filesystems that returned 64bit offsets would lose. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output

[PATCH 004 of 4] knfsd: nfsd4: remove superfluous cancel_delayed_work() call

2007-03-22 Thread NeilBrown
From: J. Bruce Fields [EMAIL PROTECTED] This cancel_delayed_work call is called from a function that is only called from a piece of code that immediate follows a cancel and destruction of the workqueue, so it's clearly a mistake. Cc: Oleg Nesterov [EMAIL PROTECTED] Signed-off-by: J. Bruce Fields

[PATCH 002 of 4] knfsd: nfsd4: fix inheritance flags on v4 ace derived from posix default ace

2007-03-22 Thread NeilBrown
From: Bruce Fields [EMAIL PROTECTED] A regression introduced in the last set of acl patches removed the INHERIT_ONLY flag from aces derived from the posix acl. Fix. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output

[PATCH 003 of 4] knfsd: nfsd4: demote clientid in use printk to a dprintk

2007-03-22 Thread NeilBrown
From: Bruce Fields [EMAIL PROTECTED] The reused clientid here is a more of a problem for the client than the server, and the client can report the problem itself if it's serious. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output

[PATCH 000 of 3] md: bug fixes for md for 2.6.21

2007-03-22 Thread NeilBrown
A minor new feature and 2 bug fixes for md suitable for 2.6.21 The minor feature is to make reshape (adding a drive to an array and restriping it) work for raid4. The code is all ready, it just wasn't used. Thanks, NeilBrown [PATCH 001 of 3] md: Allow raid4 arrays to be reshaped. [PATCH 002

[PATCH 001 of 3] md: Allow raid4 arrays to be reshaped.

2007-03-22 Thread NeilBrown
All that is missing the the function pointers in raid4_pers. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/raid5.c |4 1 file changed, 4 insertions(+) diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c --- .prev/drivers/md/raid5.c2007-03-23

[PATCH 002 of 3] md: Clear the congested_fn when stopping a raid5

2007-03-22 Thread NeilBrown
If this mddev and queue got reused for another array that doesn't register a congested_fn, this function would get called incorretly. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c|1 + ./drivers/md/raid5.c |3 ++- 2 files changed, 3

[PATCH 003 of 3] md: Convert compile time warnings into runtime warnings.

2007-03-22 Thread NeilBrown
... still not sure why we need this Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c| 41 +++-- ./drivers/md/raid5.c | 12 ++-- 2 files changed, 41 insertions(+), 12 deletions(-) diff

[PATCH 000 of 6] md: Assorted fixes and features for md for 2.6.21

2007-02-19 Thread NeilBrown
with the hardware-xor patches - one line of context is different. Patch 1 should probably go in -stable - the bug could cause data corruption in a fairly uncommon raid10 configuration, so that one and this intro are Cc:ed to [EMAIL PROTECTED] Thanks, NeilBrown [PATCH 001 of 6] md: Fix raid10 recovery problem

[PATCH 001 of 6] md: Fix raid10 recovery problem.

2007-02-19 Thread NeilBrown
There are two errors that can lead to recovery problems with raid10 when used in 'far' more (not the default). Due to a '' instead of '=' the wrong block is located which would result in garbage being written to some random location, quite possible outside the range of the device, causing the

[PATCH 003 of 6] md: Move warning about creating a raid array on partitions of the one device.

2007-02-19 Thread NeilBrown
md tries to warn the user if they e.g. create a raid1 using two partitions of the same device, as this does not provide true redundancy. However it also warns if a raid0 is created like this, and there is nothing wrong with that. At the place where the warning is currently printer, we don't

[PATCH 002 of 6] md: RAID6: clean up CPUID and FPU enter/exit code

2007-02-19 Thread NeilBrown
From: H. Peter Anvin [EMAIL PROTECTED] - Use kernel_fpu_begin() and kernel_fpu_end() - Use boot_cpu_has() for feature testing even in userspace Signed-off-by: H. Peter Anvin [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/raid6mmx.c | 16 ---

[PATCH 005 of 6] md: Restart a (raid5) reshape that has been aborted due to a read/write error.

2007-02-19 Thread NeilBrown
An error always aborts any resync/recovery/reshape on the understanding that it will immediately be restarted if that still makes sense. However a reshape currently doesn't get restarted. With this patch it does. To avoid restarting when it is not possible to do work, we call into the

[PATCH 006 of 6] md: Add support for reshape of a raid6

2007-02-19 Thread NeilBrown
i.e. one or more drives can be added and the array will re-stripe while on-line. Most of the interesting work was already done for raid5. This just extends it to raid6. mdadm newer than 2.6 is needed for complete safety, however any version of mdadm which support raid5 reshape will do a good

[PATCH 004 of 6] md: Clean out unplug and other queue function on md shutdown

2007-02-19 Thread NeilBrown
The mddev and queue might be used for another array which does not set these, so they need to be cleared. Signed-off-by: NeilBrown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c |3 +++ 1 file changed, 3 insertions(+) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers

[PATCH] md: Fix for raid6 reshape.

2007-03-01 Thread NeilBrown
### Comments for Changeset Recent patch for raid6 reshape had a change missing that showed up in subsequent review. Many places in the raid5 code used conf-raid_disks-1 to mean number of data disks. With raid6 that had to be changed to conf-raid_disk - conf-max_degraded or similar. One place

[PATCH 000 of 3] knfsd: Resolve IPv6 related link error

2007-03-01 Thread NeilBrown
optimisation. Finally the last patch removes all the #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) from sunrpc as it really isn't needed and just hides this sort of problem. Patches 1 and 3 are suitable for 2.6.21. Patch 2 needs confirmation. Thanks, NeilBrown [PATCH 001 of 3

[PATCH 001 of 3] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying

2007-03-01 Thread NeilBrown
The sunrpc server code needs to know the source and destination address for UDP packets so it can reply properly. It currently copies code out of the network stack to pick the pieces out of the skb. This is ugly and causes compile problems with the IPv6 stuff. So, rip that out and use recv_msg

[PATCH 002 of 3] knfsd: Avoid checksum checks when collecting metadata for a UDP packet.

2007-03-01 Thread NeilBrown
When recv_msg is called with a size of 0 and MSG_PEEK (and sunrpc/svcsock.c does), it is clear that we only interested in metadata (from/to addresses) and not the data, so don't do any checksum checking at this point. Leave that until the data is requested. Signed-off-by: Neil Brown [EMAIL

[PATCH 003 of 3] knfsd: Remove CONFIG_IPV6 ifdefs from sunrpc server code.

2007-03-01 Thread NeilBrown
They don't really save that much, and aren't worth the hassle. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./include/linux/sunrpc/svc.h |2 -- ./net/sunrpc/svcsock.c | 13 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff

[PATCH 000 of 4] knfsd: revised patches to fix IPv6/sunrpc link error and other fixes

2007-03-05 Thread NeilBrown
where it can be optimal. Thanks, NeilBrown [PATCH 001 of 4] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying [PATCH 002 of 4] knfsd: Remove CONFIG_IPV6 ifdefs from sunrpc server code. [PATCH 003 of 4] knfsd: Fix recently introduced problem with shutting down a busy NFS

[PATCH 001 of 4] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying

2007-03-05 Thread NeilBrown
The sunrpc server code needs to know the source and destination address for UDP packets so it can reply properly. It currently copies code out of the network stack to pick the pieces out of the skb. This is ugly and causes compile problems with the IPv6 stuff. So, rip that out and use recv_msg

[PATCH 004 of 4] knfsd: Provide sunrpc pool_mode module option

2007-03-05 Thread NeilBrown
From: Greg Banks [EMAIL PROTECTED] Provide a module param pool_mode for sunrpc.ko which allows a sysadmin to choose the mode for mapping NFS thread service pools to CPUs. Values are: autochoose a mapping mode heuristically global (default, same as the pre-2.6.19 code) a single

[PATCH 003 of 4] knfsd: Fix recently introduced problem with shutting down a busy NFS server.

2007-03-05 Thread NeilBrown
When the last thread of nfsd exits, it shuts down all related sockets. It currently uses svc_close_socket to do this, but that only is immediately effective if the socket is not SK_BUSY. If the socket is busy - i.e. if a request has arrived that has not yet been processes - svc_close_socket is

[PATCH 002 of 4] knfsd: Remove CONFIG_IPV6 ifdefs from sunrpc server code.

2007-03-05 Thread NeilBrown
They don't really save that much, and aren't worth the hassle. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./include/linux/sunrpc/svc.h |2 -- ./net/sunrpc/svcsock.c | 13 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff

[PATCH] md: Avoid a deadlock when removing a device from an md array via sysfs.

2007-04-02 Thread NeilBrown
(This patch should go in 2.6.21 as it fixes a recent regression - NB) A device can be removed from an md array via e.g. echo remove /sys/block/md3/md/dev-sde/state This will try to remove the 'dev-sde' subtree which will deadlock since commit e7b0d26a86943370c04d6833c6edba2a72a6e240 With

[PATCH 000 of 6] md: various fixes for md

2008-01-13 Thread NeilBrown
, NeilBrown [PATCH 001 of 6] md: Fix an occasional deadlock in raid5 [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array. [PATCH 003 of 6] md: Change a few 'int' to 'size_t' in md [PATCH 004 of 6] md: Change INTERATE_MDDEV to for_each_mddev [PATCH 005 of 6] md: Change

[PATCH 001 of 6] md: Fix an occasional deadlock in raid5

2008-01-13 Thread NeilBrown
raid5's 'make_request' function calls generic_make_request on underlying devices and if we run out of stripe heads, it could end up waiting for one of those requests to complete. This is bad as recursive calls to generic_make_request go on a queue and are not even attempted until make_request

[PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.

2008-01-13 Thread NeilBrown
Due to possible deadlock issues we need to use a schedule work to kobject_del an 'rdev' object from a different thread. A recent change means that kobject_add no longer gets a refernce, and kobject_del doesn't put a reference. Consequently, we need to explicitly hold a reference to ensure that

[PATCH 003 of 6] md: Change a few 'int' to 'size_t' in md

2008-01-13 Thread NeilBrown
As suggested by Andrew Morton. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2008-01-14 12:24:17.0 +1100 +++

[PATCH 004 of 6] md: Change INTERATE_MDDEV to for_each_mddev

2008-01-13 Thread NeilBrown
As this is more consistent with kernel style. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2008-01-14

[PATCH 005 of 6] md: Change ITERATE_RDEV to rdev_for_each

2008-01-13 Thread NeilBrown
as this is morein line with common practice in the kernel. Also swap the args around to be more like list_for_each. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/bitmap.c |4 +- ./drivers/md/faulty.c |2 - ./drivers/md/linear.c |2 -

[PATCH 006 of 6] md: Change ITERATE_RDEV_GENERIC to rdev_for_each_list, and remove ITERATE_RDEV_PENDING.

2008-01-13 Thread NeilBrown
Finish ITERATE_ to for_each conversion. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c |8 ./include/linux/raid/md_k.h | 14 -- 2 files changed, 8 insertions(+), 14 deletions(-) diff .prev/drivers/md/md.c

[PATCH 002 of 3] md: raid6: clean up the style of raid6test/test.c

2007-12-06 Thread NeilBrown
From: H. Peter Anvin [EMAIL PROTECTED] Date: Fri, 26 Oct 2007 11:22:42 -0700 Clean up the coding style in raid6test/test.c. Break it apart into subfunctions to make the code more readable. Signed-off-by: H. Peter Anvin [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat

[PATCH 001 of 3] md: raid6: Fix mktable.c

2007-12-06 Thread NeilBrown
From: H. Peter Anvin [EMAIL PROTECTED] Make both mktables.c and its output CodingStyle compliant. Update the copyright notice. Signed-off-by: H. Peter Anvin [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/mktables.c | 43

[PATCH 003 of 3] md: Update md bitmap during resync.

2007-12-06 Thread NeilBrown
Currently and md array with a write-intent bitmap does not updated that bitmap to reflect successful partial resync. Rather the entire bitmap is updated when the resync completes. This is because there is no guarentee that resync requests will complete in order, and tracking each request

[PATCH 000 of 3] md: a few little patches

2007-12-06 Thread NeilBrown
Following 3 patches for md provide some code tidyup and a small functionality improvement. They do not need to go into 2.6.24 but are definitely appropriate 25-rc1. (Patches made against 2.6.24-rc3-mm2) Thanks, NeilBrown [PATCH 001 of 3] md: raid6: Fix mktable.c [PATCH 002 of 3] md: raid6

[PATCH] knfsd: Change mailing list for nfsd in MAINTAINERS

2007-12-09 Thread NeilBrown
[EMAIL PROTECTED] is being decommissioned. I wonder if the website should be changed to linux-nfs.org ... Cc: J. Bruce Fields [EMAIL PROTECTED] Cc: Trond Myklebust [EMAIL PROTECTED] Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./MAINTAINERS |2 +- 1 file changed, 1

[PATCH 000 of 7] md: Introduction EXPLAIN PATCH SET HERE

2007-12-13 Thread NeilBrown
Following are 7 md related patches are suitable for the next -mm and maybe for 2.6.25. They move towards giving user-space programs more fine control of an array so that we can add support for more complex metadata formats (e.g. DDF) without bothering the kernel with such things. The last patch

[PATCH 001 of 7] md: Support 'external' metadata for md arrays.

2007-12-13 Thread NeilBrown
- Add a state flag 'external' to indicate that the metadata is managed externally (by user-space) so important changes need to be left of user-space to handle. Alternates are non-persistant ('none') where there is no stable metadata - after the array is stopped there is no record of

[PATCH 002 of 7] md: Give userspace control over removing failed devices when external metdata in use

2007-12-13 Thread NeilBrown
When a device fails, we must not allow an further writes to the array until the device failure has been recorded in array metadata. When metadata is managed externally, this requires some synchronisation... Allow/require userspace to explicitly remove failed devices from active service in the

[PATCH 003 of 7] md: Allow a maximum extent to be set for resyncing.

2007-12-13 Thread NeilBrown
This allows userspace to control resync/reshape progress and synchronise it with other activities, such as shared access in a SAN, or backing up critical sections during a tricky reshape. Writing a number of sectors (which must be a multiple of the chunk size if such is meaningful) causes a

[PATCH 004 of 7] md: Allow devices to be shared between md arrays.

2007-12-13 Thread NeilBrown
Currently, a given device is claimed by a particular array so that it cannot be used by other arrays. This is not ideal for DDF and other metadata schemes which have their own partitioning concept. So for externally managed metadata, just claim the device for md in general, require that offset

[PATCH 005 of 7] md: Lock address when changing attributes of component devices.

2007-12-13 Thread NeilBrown
Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-12-14 16:09:01.0 +1100 +++ ./drivers/md/md.c 2007-12-14

[PATCH 006 of 7] md: Allow an md array to appear with 0 drives if it has external metadata.

2007-12-13 Thread NeilBrown
Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./drivers/md/md.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff .prev/drivers/md/md.c ./drivers/md/md.c --- .prev/drivers/md/md.c 2007-12-14 16:09:03.0 +1100 +++ ./drivers/md/md.c 2007-12-14

[PATCH 007 of 7] md: Get name for block device in sysfs

2007-12-13 Thread NeilBrown
Given an fd on a block device, returns a string like /block/sda/sda1 which can be used to find related information in /sys. Ideally we should have an ioctl that works on char devices as well, but that seems far from trivial, so it seems reasonable to have this until the later can be

[PATCH] md: Fix data corruption when a degraded raid5 array is reshaped.

2008-01-03 Thread NeilBrown
This patch fixes a fairly serious bug in md/raid5 in 2.6.23 and 24-rc. It would be great if it cold get into 23.13 and 24.final. Thanks. NeilBrown ### Comments for Changeset We currently do not wait for the block from the missing device to be computed from parity before copying data to the new

[PATCH 000 of 2] md: Fixes for md in 2.6.23

2007-10-22 Thread NeilBrown
It appears that a couple of bugs slipped in to md for 2.6.23. These two patches fix them and are appropriate for 2.6.23.y as well as 2.6.24-rcX Thanks, NeilBrown [PATCH 001 of 2] md: Fix an unsigned compare to allow creation of bitmaps with v1.0 metadata. [PATCH 002 of 2] md: raid5: fix

[PATCH 001 of 2] md: Fix an unsigned compare to allow creation of bitmaps with v1.0 metadata.

2007-10-22 Thread NeilBrown
As page-index is unsigned, this all becomes an unsigned comparison, which almost always returns an error. Signed-off-by: Neil Brown [EMAIL PROTECTED] Cc: Stable [EMAIL PROTECTED] ### Diffstat output ./drivers/md/bitmap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 002 of 2] md: raid5: fix clearing of biofill operations

2007-10-22 Thread NeilBrown
From: Dan Williams [EMAIL PROTECTED] ops_complete_biofill() runs outside of spin_lock(sh-lock) and clears the 'pending' and 'ack' bits. Since the test_and_ack_op() macro only checks against 'complete' it can get an inconsistent snapshot of pending work. Move the clearing of these bits to

[PULL REQUEST] md fixes (plus UAPI reorg) for 3.7

2012-10-30 Thread NeilBrown
): MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c NeilBrown (2): Merge tag 'disintegrate-raid-20121009' of git://git.infradead.org/users/dhowells/linux-headers into for-next md/raid1: Fix assembling of arrays containing Replacements. drivers/md/faulty.c

Problem with DISCARD and RAID5

2012-11-01 Thread NeilBrown
it is anything else, it will need to use sector_div(). Could you look into this please? Thanks, NeilBrown signature.asc Description: PGP signature

[PATCH] block: makes bio_split support bio without data

2012-09-23 Thread NeilBrown
take it though your 'block' tree? Thanks, NeilBrown From: Shaohua Li s...@fusionio.com Date: Thu, 20 Sep 2012 09:36:03 +1000 Subject: [PATCH] block: makes bio_split support bio without data discard bio hasn't data attached. We hit a BUG_ON with such bio. This makes bio_split works for such bio

Re: Conditional Unlink

2012-09-23 Thread NeilBrown
to the file, or will there only ever be one writer? NeilBrown signature.asc Description: PGP signature

Re: [PATCH] block: makes bio_split support bio without data

2012-09-24 Thread NeilBrown
On Mon, 24 Sep 2012 17:35:34 +0900 Namhyung Kim namhy...@kernel.org wrote: Hi, On Mon, 24 Sep 2012 14:56:39 +1000, NeilBrown wrote: Hi Jens, this patch has been sitting in my -next tree for a little while and I was hoping for it to go in for the next merge window. It simply allows

[PATCH] block: export trace_block_unplug

2012-09-24 Thread NeilBrown
Hi Jens, is there any chance this can be in the next merge window? I'm adding block tracing to md and found I need another export. Thanks, NeilBrown This allows stacked devices (like md/raid5) to provide blktrace tracing, including unplug events. Reported-by: Fengguang Wu fengguang

Re: linux-next: build failure after merge of the md tree

2012-09-24 Thread NeilBrown
14817e9a6dab (md/raid5: add blktrace calls). CONFIG_MD_RAID456=m I have used the md tree from next-20120924 for today. Thanks. I requires the following which I have already sent to Jens Axboe. I might pull my patch until this fix-up is resolve. Thanks, NeilBrown From

Re: WARNING: at fs/inode.c:280 drop_nlink+0x31/0x33()

2012-09-24 Thread NeilBrown
] 0x7f2a73a0d10f Is this suitable for -stable? It seems like it is just a harmless warning. NeilBrown Subject: NFS: avoid warning from nfs_drop_nlink If you remove a file which is open, NFS will 'silly-rename' it to a hidden file. If you then remove that hidden file, and then close the open file

Re: [PATCH v3 05/26] md: Convert md_trim_bio() to use bio_advance()

2012-09-25 Thread NeilBrown
On Mon, 24 Sep 2012 15:34:45 -0700 Kent Overstreet koverstr...@google.com wrote: Signed-off-by: Kent Overstreet koverstr...@google.com CC: Jens Axboe ax...@kernel.dk CC: NeilBrown ne...@suse.de --- drivers/md/md.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions

Re: [PATCH] block: export trace_block_unplug

2012-09-25 Thread NeilBrown
On Tue, 25 Sep 2012 14:50:34 +0200 Jens Axboe ax...@kernel.dk wrote: On 09/25/2012 01:57 AM, NeilBrown wrote: Hi Jens, is there any chance this can be in the next merge window? I'm adding block tracing to md and found I need another export. No problem, applied. Thanks. NeilBrown

[PULL REQUEST] 2 bugfixes for md in 3.6

2012-09-26 Thread NeilBrown
. The other has been present as long as raid10 has been supported, so is tagged for -stable. NeilBrown (2): md/raid5: add missing spin_lock_init. md/raid10: fix enough function for detecting if array is failed. drivers/md/raid10.c

Re: [PATCH 00/16] f2fs: introduce flash-friendly file system

2012-10-19 Thread NeilBrown
more detailed description. Maybe it is good for Linux Forum. But do you plan to publish more detailed description of F2FS architecture, advantages/disadvantages in the form of article? It makes sense from my point of view. plug https://lwn.net/Articles/518988/ /plug :-) NeilBrown

Re: [PATCH 02/16 v2] f2fs: add on-disk layout

2012-10-22 Thread NeilBrown
can certainly understand the desire to do that, but I wonder if it is entirely wise. There are some use-cases where i_mtime is a poor substitute. Also 'current_depth' looks a little odd without a 'i_' prefix. It wouldn't hurt to have a comment noting that it is for directories. Thanks, NeilBrown

Re: [PATCH 061/193] drivers/md: remove CONFIG_EXPERIMENTAL

2012-10-23 Thread NeilBrown
--- Enable the raid456 module to dispatch per-stripe raid operations to a thread pool. I'm happy to remove the depends on EXPERIMENTAL. I'm not so happy to remove the (EXPERIMENTAL) text. That code really shouldn't be used in production - just for experiments. Thanks, NeilBrown signature.asc

Re: [PATCH 06/16] f2fs: add node operations

2012-10-10 Thread NeilBrown
-1. I suspect that is not what is desired. I would suggest changing the test in the while loop to while (nr_shrink !list_empty(...)) { and add nr_shrink--; somewhere inside the loop. Regards, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 05/16] f2fs: add checkpoint operations

2012-10-10 Thread NeilBrown
if you would need to make a corresponding change to the recovery code, I haven't fully examined that yet. Regards, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 07/16] f2fs: add segment operations

2012-10-10 Thread NeilBrown
); Regards, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 03/16] f2fs: add superblock and major in-memory structures

2012-10-10 Thread NeilBrown
the 3 values are consistent, not once for each value. Regards, NeilBrown + +static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) +{ + unsigned int end_segno = SM_I(sbi)-segment_count - 1; + BUG_ON(segno end_segno); +} + +/* + * This function

[PULL REQUEST] md updates for 3.7

2012-10-13 Thread NeilBrown
MD updates for 3.7. Latish because I needed to wait for the block tree to get merged. Thanks, NeilBrown The following changes since commit 02f3939e1a9357b7c370a4a69717cf9c02452737: block: makes bio_split support bio without data (2012-09-28 10:38:48 +0200) are available in the git

Re: [PATCH] lib/raid6: Add AVX2 optimized recovery functions

2012-11-09 Thread NeilBrown
be able to assume that - surely the patches would not be posted if it were not true... But I like to avoid assuming when I can. Thanks, NeilBrown Paul Menzel pm.deb...@googlemail.com wrote: Dear Jim, Am Donnerstag, den 08.11.2012, 13:47 -0800 schrieb Jim Kukunas: Optimize RAID6 recovery

Re: [GIT PULL] Disintegrate UAPI for raid

2012-10-15 Thread NeilBrown
. Thanks, NeilBrown signature.asc Description: PGP signature

Re: [PATCH 07/16] f2fs: add segment operations

2012-10-15 Thread NeilBrown
On Sat, 13 Oct 2012 00:12:53 +0900 Jaegeuk Kim jaegeuk@gmail.com wrote: 2012-10-11 (목), 09:37 +1100, NeilBrown: On Fri, 05 Oct 2012 21:00:55 +0900 김재극 jaegeuk@samsung.com wrote: +/** + * Find a new segment from the free segments bitmap to right order + * This function

Re: [PATCH 05/16] f2fs: add checkpoint operations

2012-10-15 Thread NeilBrown
On Sat, 13 Oct 2012 00:49:06 +0900 Jaegeuk Kim jaegeuk@gmail.com wrote: 2012-10-11 (목), 09:24 +1100, NeilBrown: On Fri, 05 Oct 2012 20:59:29 +0900 김재극 jaegeuk@samsung.com wrote: +static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount) +{ + struct f2fs_checkpoint

Re: ext3 issue on 3.6.1

2012-10-18 Thread NeilBrown
on and hopefully apply this patch? Subject of original email was WARNING: at fs/inode.c:280 drop_nlink+0x31/0x33() Thanks, NeilBrown -- Subject: NFS: avoid warning from nfs_drop_nlink If you remove a file which is open, NFS will 'silly-rename' it to a hidden file. If you then remove that hidden

[PATCH 000 of 4] Change prototype for bi_end_io

2007-09-27 Thread NeilBrown
the right places, but any recently added device drivers might still be using the old bi_end_io prototype. I'll grep again after these patches are in your tree. That patches are against linux-block as of an hour ago. Thanks, NeilBrown Net result of the 4 patches: 46 files changed, 166 insertions

[PATCH 001 of 4] Remove flush_dry_bio_endio

2007-09-27 Thread NeilBrown
The entire function of flush_dry_bio_endio is to undo the effects of bio_endio (when called on a barrier request). So remove the function and the call to bio_endio. This allows us to remove bi_size from struct request_queue. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output

[PATCH 002 of 4] Only call bi_end_io once for any bio.

2007-09-27 Thread NeilBrown
Currently bi_end_io can be called multiple times as sub-requests complete. However no -bi_end_io function wants to know about that. So only call when the bio is complete. Signed-off-by: Neil Brown [EMAIL PROTECTED] ### Diffstat output ./fs/bio.c |4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 003 of 4] Don't decrement bi_size in bio_endio.

2007-09-27 Thread NeilBrown
The only caller of bio_endio that does not pass the full bi_size is end_that_request_first. Also, no -bi_end_io method is really interested in bi_size being decremented. So move the decrement and related code into ll_rw_blk and merge it with order_bio_endio to form req_bio_endio which does

[PATCH 004 of 4] Drop 'size' argument from bio_endio and bi_end_io.

2007-09-27 Thread NeilBrown
As bi_end_io is only called once when the reqeust is complete, the 'size' argument is now redundant. Remove it. Now there is no need for bio_endio to subtract the size completed from bi_size. So don't do that either. While we are at it, change bi_end_io to return void. Signed-off-by: Neil

[PATCH] md: Fix some bugs with growing raid5/raid6 arrays.

2007-08-30 Thread NeilBrown
. It applies to current -mm with quite a bit of fuzz... Thanks, NeilBrown ### Diffstat output ./drivers/md/raid5.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c --- .prev/drivers/md/raid5.c2007-08-30 15:58

  1   2   3   4   5   6   7   8   9   10   >