aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sysfs: Add support for tagged directories with untagged members.Eric W. Biederman2010-05-212-9/+5
| | | | | | | | | | | | I had hopped to avoid this but the bonding driver adds a file to /sys/class/net/ and the easiest way to handle that file is to make it untagged and to register it only once. So relax the rules on tagged directories, and make bonding work. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sysfs: Implement sysfs tagged directory support.Eric W. Biederman2010-05-2113-51/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem. When implementing a network namespace I need to be able to have multiple network devices with the same name. Currently this is a problem for /sys/class/net/*, /sys/devices/virtual/net/*, and potentially a few other directories of the form /sys/ ... /net/*. What this patch does is to add an additional tag field to the sysfs dirent structure. For directories that should show different contents depending on the context such as /sys/class/net/, and /sys/devices/virtual/net/ this tag field is used to specify the context in which those directories should be visible. Effectively this is the same as creating multiple distinct directories with the same name but internally to sysfs the result is nicer. I am calling the concept of a single directory that looks like multiple directories all at the same path in the filesystem tagged directories. For the networking namespace the set of directories whose contents I need to filter with tags can depend on the presence or absence of hotplug hardware or which modules are currently loaded. Which means I need a simple race free way to setup those directories as tagged. To achieve a reace free design all tagged directories are created and managed by sysfs itself. Users of this interface: - define a type in the sysfs_tag_type enumeration. - call sysfs_register_ns_types with the type and it's operations - sysfs_exit_ns when an individual tag is no longer valid - Implement mount_ns() which returns the ns of the calling process so we can attach it to a sysfs superblock. - Implement ktype.namespace() which returns the ns of a syfs kobject. Everything else is left up to sysfs and the driver layer. For the network namespace mount_ns and namespace() are essentially one line functions, and look to remain that. Tags are currently represented a const void * pointers as that is both generic, prevides enough information for equality comparisons, and is trivial to create for current users, as it is just the existing namespace pointer. The work needed in sysfs is more extensive. At each directory or symlink creating I need to check if the directory it is being created in is a tagged directory and if so generate the appropriate tag to place on the sysfs_dirent. Likewise at each symlink or directory removal I need to check if the sysfs directory it is being removed from is a tagged directory and if so figure out which tag goes along with the name I am deleting. Currently only directories which hold kobjects, and symlinks are supported. There is not enough information in the current file attribute interfaces to give us anything to discriminate on which makes it useless, and there are no potential users which makes it an uninteresting problem to solve. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobj: Add basic infrastructure for dealing with namespaces.Eric W. Biederman2010-05-215-14/+204
| | | | | | | | | | Move complete knowledge of namespaces into the kobject layer so we can use that information when reporting kobjects to userspace. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sysfs: Remove double free sysfs_get_sbEric W. Biederman2010-05-211-1/+0
| | | | | | Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sysfs: Basic support for multiple super blocksEric W. Biederman2010-05-212-2/+59
| | | | | | | | | | Add all of the necessary bioler plate to support multiple superblocks in sysfs. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* generate "change" uevent for loop deviceDavid Zeuthen2010-05-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Recent udev versions probe loop devices for filesystems meaning that the /dev/disk hierarchy may contain useful entries such as $ ls -l /dev/disk/by-label/Fedora-12-x86_64-Live lrwxrwxrwx 1 root root 11 Mar 11 13:41 /dev/disk/by-label/Fedora-12-x86_64-Live -> ../../loop0 Unfortunately, no "change" uevent is generated when the loop device is detached so the symlink persists. Additionally, no "change" uevent is guaranteed to be generated when attaching an fd or changing capacity. For example, user space could open the loop device O_RDONLY (in fact, recent util-linux-ng does this) so udev's OPTIONS+="watch" machinery may not trigger the "change" uevent. This patch ensures that the "change" uevent is generated in all of these cases. As a result, the /dev/disk hierarchy works as expected for loop devices. Signed-off-by: David Zeuthen <davidz@redhat.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: Protect device shutdown from hot unplug events.Hugh Daschbach2010-05-211-3/+22
| | | | | | | | | | | | | While device_shutdown() walks through devices_kset to shutdown all devices, device unplug events may race to shutdown individual devices. Specifically, sd_shutdown(), on behalf of fc_starget_delete(), has been observed deleting devices during device_shutdown()'s list traversal. So we factor out list_for_each_entry_safe_reverse(...) in favor of while (!list_empty(...)). Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware loader: do not allocate firmare id separatelyDmitry Torokhov2010-05-211-13/+4
| | | | | | | | | fw_id has the same life time as firmware_priv so it makes sense to move it into firmware_priv structure instead of allocating separately. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware loader: split out builtin firmware handlingDmitry Torokhov2010-05-211-26/+50
| | | | | | | | | Split builtin firmware handling into separate functions to clean up the main body of code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware loader: rely on driver core to create class attributeDmitry Torokhov2010-05-211-35/+24
| | | | | | | | | Do not create 'timeout' attribute manually, let driver core do it for us. This also ensures that attribute is cleaned up properly. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware class: export nowait to userspaceJohannes Berg2010-05-211-5/+11
| | | | | | | | | | | | | | | | | | When we use request_firmware_nowait(), userspace may not want to answer negatively right away when for example it is answering from an initrd only, but with request_firmware() it has to in order to not delay the kernel boot until the request times out. This allows userspace to differentiate between the two in order to be able to reply negatively to async requests only when all filesystems have been mounted and have been checked for the requested firmware file. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lockdep: Add novalidate class for dev->mutex conversionPeter Zijlstra2010-05-214-0/+25
| | | | | | | | | | | | | | | | The conversion of device->sem to device->mutex resulted in lockdep warnings. Create a novalidate class for now until the driver folks come up with separate classes. That way we have at least the basic mutex debugging coverage. Add a checkpatch error so the usage is reserved for device->mutex. [ tglx: checkpatch and compile fix for LOCKDEP=n ] Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/base: Convert dev->sem to mutexThomas Gleixner2010-05-215-8/+8
| | | | | | | | | | | The semaphore is semantically a mutex. Convert it to a real mutex and fix up a few places where code was relying on semaphore.h to be included by device.h, as well as the users of the trylock function, as that value is now reversed. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* platform_bus: allow custom extensions to system PM methodsKevin Hilman2010-05-211-4/+4
| | | | | | | | | | | | | | | | | | When runtime PM for platform_bus was added, it allowed for platforms to customize the runtime PM methods since they are defined as weak symbols. This patch allows platforms to also extend the system PM methods with custom hooks so runtime PM and system PM extensions can be managed together by custom platform-specific code. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Cc: Magnus Damm <damm@opensource.se> Cc: Rafael Wysocki <rjw@sisk.pl> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* devtmpfs: support !CONFIG_TMPFSPeter Korsgaard2010-05-214-3/+13
| | | | | | | | | | | | Make devtmpfs available on (embedded) configurations without SHMEM/TMPFS, using ramfs instead. Saves ~15KB. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: module.c: Use kasprintfJulia Lawall2010-05-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: don't initialize wakeup flagsAlan Stern2010-05-211-1/+0
| | | | | | | | | | | | This patch (as1351) removes an unnecessary and unwanted assignment from device_initialize(). The wakeup flags are set to 0 along with everything else when the device structure is allocated, so we don't need to do it again. Furthermore, the subsystem might already have set these flags to their correct values; we don't want to override it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver-core: fix potential race condition in drivers/base/dd.cStefani Seibold2010-05-211-2/+2
| | | | | | | | | | | | | | | This patch fix a potential race condition in the driver_bound() function in the file driver/base/dd.c. The broadcast of the BUS_NOTIFY_BOUND_DRIVER notifier should be done after adding the new device to the driver list. Otherwise notifier listener will fail if they use functions like usb_find_interface(). The patch is against kernel 2.6.33. Please merge it. Signed-off-by: Stefani Seibold <stefani@seibold.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: Reduce the level of request_firmware() messagesRafael J. Wysocki2010-05-211-3/+2
| | | | | | | | | | | | The messages from _request_firmware() informing that firmware is being requested or built-in firmware is going to be used are printed at KERN_INFO, which produces lots of noise on systems with huge numbers of AMD CPUs. Reduce the level of these messages to KERN_DEBUG to get rid of that noise. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kref: remove kref_setNeilBrown2010-05-214-18/+6
| | | | | | | | | | | | | | | | | | Of the three uses of kref_set in the kernel: One really should be kref_put as the code is letting go of a reference, Two really should be kref_init because the kref is being initialised. This suggests that making kref_set available encourages bad code. So fix the three uses and remove kref_set completely. Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: Mimi Zohar <zohar@us.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware_class: fix memory leak - free allocated pagesDavid Woodhouse2010-05-212-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | fix memory leak introduced by the patch 6e03a201bbe: firmware: speed up request_firmware() 1. vfree won't release pages there were allocated explicitly and mapped using vmap. The memory has to be vunmap-ed and the pages needs to be freed explicitly 2. page array is moved into the 'struct firmware' so that we can free it from release_firmware() and not only in fw_dev_release() The fix doesn't break the firmware load speed. Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Singed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offlineJan Beulich2010-05-211-1/+1
| | | | | | | | | | | | | | Without CONFIG_CPUMASK_OFFSTACK, simply inverting cpu_online_mask leads to CPUs beyond nr_cpu_ids to be displayed twice and CPUs not even possible to be displayed as offline. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2010-05-2114-350/+423
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (23 commits) nilfs2: disallow remount of snapshot from/to a regular mount nilfs2: use huge_encode_dev/huge_decode_dev nilfs2: update comment on deactivate_super at nilfs_get_sb nilfs2: replace MS_VERBOSE with MS_SILENT nilfs2: add missing initialization of s_mode nilfs2: fix misuse of open_bdev_exclusive/close_bdev_exclusive nilfs2: enlarge s_volume_name member in nilfs_super_block nilfs2: use checkpoint number instead of timestamp to select super block nilfs2: add missing endian conversion on super block magic number nilfs2: make nilfs_sc_*_ops static nilfs2: add kernel doc comments to persistent object allocator functions nilfs2: change sc_timer from a pointer to an embedded one in struct nilfs_sc_info nilfs2: remove nilfs_segctor_init() in segment.c nilfs2: insert checkpoint number in segment summary header nilfs2: add a print message after loading nilfs2 nilfs2: cleanup multi kmem_cache_{create,destroy} code nilfs2: move out checksum routines to segment buffer code nilfs2: move pointer to super root block into logs nilfs2: change default of 'errors' mount option to 'remount-ro' mode nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path() ...
| * nilfs2: disallow remount of snapshot from/to a regular mountRyusuke Konishi2010-05-101-34/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snapshots and regular ro/rw mounts are essentially-different within the meaning whether the checkpoint is static or not and is marked with a snapshot flag or not. The current implemenation, however, allows to remount a snapshot to a regular rw-mount if the checkpoint number equals the latest one. This transition is actually impossible since changing a checkpoint to a snapshot makes another checkpoint, thus the condition is never satisfied. This fixes the weird state of affairs, and specifically separates snapshots and regular rw/ro-mounts. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: use huge_encode_dev/huge_decode_devRyusuke Konishi2010-05-101-2/+2
| | | | | | | | | | | | | | | | | | This replaces uses of new_encode_dev/new_decode_dev with their 64-bit counterparts, huge_encode_dev/huge_decode_dev respectively. This is just for clarification and has no impact on the disk format. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: update comment on deactivate_super at nilfs_get_sbRyusuke Konishi2010-05-101-1/+1
| | | | | | | | | | | | | | deactivate_super was replaced with deactivate_locked_super, but the comment of nilfs_get_sb remain unchanged. This renews the comment. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: replace MS_VERBOSE with MS_SILENTRyusuke Konishi2010-05-101-1/+2
| | | | | | | | | | | | | | MS_VERBOSE is deprecated. This replaces it with MS_SILENT in reference to get_sb_bdev function. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add missing initialization of s_modeRyusuke Konishi2010-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | An fmode_t argument is passed to kill_block_super() through s_mode member of the super_block structure. This is used to release the block device with the same mode, however, nilfs does not set s_mode anywhere. This modifies nilfs_get_sb function to properly initialize the s_mode member. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: fix misuse of open_bdev_exclusive/close_bdev_exclusiveRyusuke Konishi2010-05-101-3/+7
| | | | | | | | | | | | | | The second argument of open_bdev_exclusive/close_bdev_exclusive takes fmode_t flags instead of mount flags. This fixes the misuse. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: enlarge s_volume_name member in nilfs_super_blockJiro SEKIBA2010-05-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current s_volume_name has 16 bytes, which is too small as modern filesystem. s_last_mounted resides just after s_volume_name and has 64 bytes. s_last_mounted is historically came from ext2, but not used in nilfs2 at all. Deleting s_last_mounted member and merging that space with s_volume_name enlarge s_volume_name upto 80 bytes for volume label. When user land tools see the old header for new disk, it will just ignore additional bytes stored in s_last_mounted. While, old disk format has only 16 bytes label, it doesn't affects in case seeing the new header for old disk. Signed-off-by: Jiro SEKIBA <jir@unicus.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: use checkpoint number instead of timestamp to select super blockRyusuke Konishi2010-05-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nilfs maintains two super blocks, and selects the new one on mount time if they both have valid checksums and their timestamps differ. However, this has potential for mis-selection since the system clock may be rewinded and the resolution of the timestamps is not high. Usually this doesn't become an issue because both super blocks are updated at the same time when the file system is unmounted. Even if the file system wasn't unmounted cleanly, the roll-forward recovery will find the proper log which stores the latest super root. Thus, the issue can appear only if update of one super block fails and the clock happens to be rewinded. This fixes the issue by using checkpoint numbers instead of timestamps to pick the super block storing the location of the latest log. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add missing endian conversion on super block magic numberRyusuke Konishi2010-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds missing endian conversions in comparision of the magic number of super blocks. It was coincidence that prior versions didn't incur problems; the upper byte of the magic number happened to be equal to the lower byte. But, semantically it's wrong to depend on this. This won't change anything else nor suffer any compatibility issues. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: make nilfs_sc_*_ops staticRyusuke Konishi2010-05-101-3/+3
| | | | | | | | | | | | | | | | | | | | This kills the following sparse warnings: fs/nilfs2/segment.c:567:28: warning: symbol 'nilfs_sc_file_ops' was not declared. Should it be static? fs/nilfs2/segment.c:617:28: warning: symbol 'nilfs_sc_dat_ops' was not declared. Should it be static? fs/nilfs2/segment.c:625:28: warning: symbol 'nilfs_sc_dsync_ops' was not declared. Should it be static? Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add kernel doc comments to persistent object allocator functionsRyusuke Konishi2010-05-102-1/+160
| | | | | | | | | | | | | | The implementation of persistent object allocator (alloc.c) is poorly documented. This adds kernel doc style comments on that functions. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: change sc_timer from a pointer to an embedded one in struct ↵Li Hong2010-05-102-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nilfs_sc_info In nilfs_segctor_thread(), timer is a local variable allocated on stack. Its address can't be set to sci->sc_timer and passed in several procedures. It works now by chance, just because other procedures are called by nilfs_segctor_thread() directly or indirectly and the stack hasn't been deallocated yet. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: remove nilfs_segctor_init() in segment.cLi Hong2010-05-101-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are only two lines of code in nilfs_segctor_init(). From a logic design view, the first line 'sci->sc_seq_done = sci->sc_seq_request;' should be put in nilfs_segctor_new(). Even in nilfs_segctor_new(), this initialization is needless because sci is kzalloc-ed. So nilfs_segctor_init() is only a wrap call to nilfs_segctor_start_thread(). Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: insert checkpoint number in segment summary headerRyusuke Konishi2010-05-105-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a field to record the latest checkpoint number in the nilfs_segment_summary structure. This will help to recover the latest checkpoint number from logs on disk. This field is intended for crucial cases in which super blocks have lost pointer to the latest log. Even though this will change the disk format, both backward and forward compatibility is preserved by a size field prepared in the segment summary header. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add a print message after loading nilfs2Li Hong2010-05-101-0/+1
| | | | | | | | | | | | | | | | Printing a message after loading a file system is a practice. Add this to provide a better user-friendly experience. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: cleanup multi kmem_cache_{create,destroy} codeLi Hong2010-05-107-164/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleanup patch gives several improvements: - Moving all kmem_cache_{create_destroy} calls into one place, which removes some small function calls, cleans up error check code and clarify the logic. - Mark all initial code in __init section. - Remove some very obvious comments. - Adjust some declarations. - Fix some space-tab issues. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: move out checksum routines to segment buffer codeRyusuke Konishi2010-05-103-36/+39
| | | | | | | | | | | | | | This moves out checksum routines in log writer to segbuf.c for cleanup. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: move pointer to super root block into logsRyusuke Konishi2010-05-104-26/+25
| | | | | | | | | | | | | | This moves a pointer to buffer storing super root block to each log buffer from nilfs_sc_info struct for simplicity. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: change default of 'errors' mount option to 'remount-ro' modeRyusuke Konishi2010-05-102-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Like ext3, nilfs has 'errors' mount option to allow specifying desired behavior on severe errors. Currently, the default action is 'errors=continue' and has potential to advance filesystem corruption for severe errors. This will change the action to 'errors=remount-ro' to avoid the issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path()Li Hong2010-05-101-17/+5
| | | | | | | | | | | | | | | | | | nilfs_btree_release_path() and nilfs_btree_free_path() are bound into each other tightly. Make them into one procedure to clearify the logic and avoid some misusages. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: Combine nilfs_btree_alloc_path() and nilfs_btree_init_path()Li Hong2010-05-101-22/+17
| | | | | | | | | | | | | | | | | | nilfs_btree_alloc_path() and nilfs_btree_init_path() are bound into each other tightly. Make them into one procedure to clearify the logic and avoid some misusages. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: fix style problems in nilfs2_fs.hRyusuke Konishi2010-05-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This kills the following checkpatch warnings: WARNING: please, no space before tabs +^I__le32^Is_first_ino; ^I^I/* First non-reserved inode */$ WARNING: please, no space before tabs +^I__le16 s_inode_size; ^I^I/* Size of an inode */$ WARNING: please, no space before tabs +^Ichar^Is_volume_name[16]; ^I/* volume name */$ WARNING: please, no space before tabs +^Ichar^Is_last_mounted[64]; ^I/* directory where last mounted */$ Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: update comment for struct nilfs_dat_entryQinghuang Feng2010-05-101-4/+4
| | | | | | | | | | | | | | The comment of struct nilfs_dat_entry is mismatched, fix it. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmwLinus Torvalds2010-05-2120-185/+368
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Fix typo GFS2: stuck in inode wait, no glocks stuck GFS2: Eliminate useless err variable GFS2: Fix writing to non-page aligned gfs2_quota structures GFS2: Add some useful messages GFS2: fix quota state reporting GFS2: Various gfs2_logd improvements GFS2: glock livelock GFS2: Clean up stuffed file copying GFS2: docs update GFS2: Remove space from slab cache name
| * | GFS2: Fix typoSteven Whitehouse2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | A missing ! in a test. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: stuck in inode wait, no glocks stuckBob Peterson2010-05-121-48/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the lock ordering when gfs2 reclaims unlinked dinodes, thereby avoiding a livelock. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: Eliminate useless err variableBob Peterson2010-05-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes an unneeded "err" variable that is always returned as zero. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>