- Dec 05, 2007
-
-
Al Viro authored
endianness annotations in networking code had been in place for quite a while; in particular, sin_port and s_addr are annotated as big-endian. Code in ocfs2 had __force casts added apparently to shut the sparse warnings up; of course, these days they only serve to *produce* warnings for no reason whatsoever... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Nov 28, 2007
-
-
Mark Fasheh authored
ocfs2_truncate() and ocfs2_remove_inode_range() had reversed their "set i_size" arguments to ocfs2_truncate_inline(). Fix things so that truncate sets i_size, and punching a hole ignores it. This exposed a problem where punching a hole in an inline-data file wasn't updating the page cache, so fix that too. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
This was causing us to prematurely push out inline data by one byte. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
The existing bug statement didn't take into account unhashed dentries which might not have a cluster lock on them. This could happen if a node exporting the file system via NFS is rebooted, re-exported to nfs clients and then unmounted. It's fine in this case to not have a dentry cluster lock. Just remove the bug statement and replace it with an error print, which does the proper checks. Though we want to know if something has happened which might have prevented a cluster lock from being created, it's definitely not necessary to panic the machine for this. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Jan Kara authored
Enable expensive bitmap scanning only if DEBUG option is enabled. The bitmap scanning quite loads the CPU and on my machine the write throughput of dd if=/dev/zero of=/ocfs2/file bs=1M count=500 conv=sync improves from 37 MB/s to 45.4 MB/s in local mode... Signed-off-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
If the inode block isn't valid then we don't want to print the value from that, instead print the block number which was passed in (which should always be correct). Also, turn this into a debug print for now - folks who hit an actual problem always have other logs indicating what the source is. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
It's almost never worth printing in that situation and we keep forgetting to manually filter it out. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Joe Perches authored
Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Right now we're just setting them from the existing parameters, not the new ones that a remount specified. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- Nov 13, 2007
-
-
Trond Myklebust authored
...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers. Looking at the sock->op->shutdown() handlers, it looks as if all of them take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the RCV_SHUTDOWN/SEND_SHUTDOWN arguments. Add a helper, and then define the SHUT_* enum to ensure that kernel users of shutdown() don't get confused. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by:
Mark Fasheh <mark.fasheh@oracle.com> Acked-by:
David Howells <dhowells@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 07, 2007
-
-
Srinivas Eeda authored
If another node unlinks the destination while ocfs2_rename() is waiting on a cluster lock, ocfs2_rename() simply logs an error and continues. This causes a crash because the renaming node is now trying to delete a non-existent inode. The correct solution is to return -ENOENT. Signed-off-by:
Srinivas Eeda <srinivas.eeda@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Jan Kara authored
We should subtract start of our IO from PAGE_CACHE_SIZE to get the right length of the write we want to perform. Signed-off-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
On file systems which don't support sparse files, Ocfs2_map_page_blocks() was reading blocks on appending writes. This caused write performance to suffer dramatically. Fix this by detecting an appending write on a nonsparse fs and skipping the read. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We're missing a meta data commit for extending sync writes. In thoery, write could return with the meta data required to read the data uncommitted to disk. Fix that by detecting an allocating write and forcing a journal commit in the sync case. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Do this to avoid a theoretical (I haven't seen this in practice) race where the downconvert thread might drop the dentry lock, allowing a remote unlink to proceed before dropping the inode locks. This could bounce access to the orphan dir between nodes. There doesn't seem to be a need to do the same in ocfs2_dentry_iput() as that's never called for the last ref drop from the downconvert thread. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
If we have not yet created a cluster lock, ocfs2_cluster_lock() will first create it at NLMODE, and then convert the lock to either PRMODE or EXMODE (whichever is requested). Change ocfs2_cluster_lock() to just create the lock at the initially requested level. ocfs2_locking_ast() handles this case fine, so the only update required was in setup of locking state. This should reduce the number of network messages required for a new lock by one, providing an incremental performance enhancement. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Roel Kluin authored
Fixes priority mistakes similar to '!x & y' Signed-off-by:
Roel Kluin <12o3l@tiscali.nl> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Adrian Bunk authored
ocfs2_find_entry_el() can become static. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- Oct 22, 2007
-
-
Christoph Hellwig authored
Now that nfsd has stopped writing to the find_exported_dentry member we an mark the export_operations const Signed-off-by:
Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: <linux-ext4@vger.kernel.org> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: David Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh@veritas.com> Cc: Chris Mason <mason@suse.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: "Vladimir V. Saveliev" <vs@namesys.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
OCFS2 has it's own 64bit-firendly filehandle format so we can't use the generic helpers here. I'll add a struct for the types later. Signed-off-by:
Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 19, 2007
-
-
Robert P. J. Day authored
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by:
Robert P. J. Day <rpjday@mindspring.com> Signed-off-by:
Adrian Bunk <bunk@kernel.org>
-
Pavel Emelyanov authored
The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. [akpm@linux-foundation.org: git-drm went and changed lots of stuff] Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 17, 2007
-
-
Mathieu Desnoyers authored
Fix f_version type: should be u64 instead of long There is a type inconsistency between struct inode i_version and struct file f_version. fs.h: struct inode u64 i_version; and struct file unsigned long f_version; Users do: fs/ext3/dir.c: if (filp->f_version != inode->i_version) { So why isn't f_version a u64 ? It becomes a problem if versions gets higher than 2^32 and we are on an architecture where longs are 32 bits. This patch changes the f_version type to u64, and updates the users accordingly. It applies to 2.6.23-rc2-mm2. Signed-off-by:
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Martin Bligh <mbligh@google.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Cc: Al Viro <viro@ftp.linux.org.uk> Cc: <linux-ext4@vger.kernel.org> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Lameter authored
Slab constructors currently have a flags parameter that is never used. And the order of the arguments is opposite to other slab functions. The object pointer is placed before the kmem_cache pointer. Convert ctor(void *object, struct kmem_cache *s, unsigned long flags) to ctor(struct kmem_cache *s, void *object) throughout the kernel [akpm@linux-foundation.org: coupla fixes] Signed-off-by:
Christoph Lameter <clameter@sgi.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Peter Zijlstra authored
provide BDI constructor/destructor hooks [akpm@linux-foundation.org: compile fix] Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 16, 2007
-
-
Nicholas Piggin authored
Plug ocfs2 into the ->write_begin and ->write_end aops. A bunch of custom code is now gone - the iovec iteration stuff during write and the ocfs2 splice write actor. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 12, 2007
-
-
Greg Kroah-Hartman authored
A kset should not have its name set directly, so dynamically set the name at runtime. This is needed to remove the static array in the kobject structure which will be changed in a future patch. Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Mark Fasheh authored
Modify ocfs2_dir_foreach_blk() to optionally return any error from the filldir callback. This way ocfs2_dirforeach() can terminate early, as opposed to always passing through the entire directory. This fixes a bug introduced during a previous code refactor where ocfs2_empty_dir() would loop infinitely. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Create all new directories with OCFS2_INLINE_DATA_FL and the inline data bytes formatted as an empty directory. Inode size field reflects the actual amount of inline data available, which makes searching for dirent space very similar to the regular directory search. Inline-data directories are automatically pushed out to extents on any insert request which is too large for the available space. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
This splits out extent based directory read support and implements inline-data versions of those functions. All knowledge of inline-data versus extent based directories is internalized. For lookups the code uses ocfs2_find_entry_id(), full dir iterations make use of ocfs2_dir_foreach_blk_id(). Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
This fixes up write, truncate, mmap, and RESVSP/UNRESVP to understand inline inode data. For the most part, the changes to the core write code can be relied on to do the heavy lifting. Any code calling ocfs2_write_begin (including shared writeable mmap) can count on it doing the right thing with respect to growing inline data to an extent tree. Size reducing truncates, including UNRESVP can simply zero that portion of the inode block being removed. Size increasing truncatesm, including RESVP have to be a little bit smarter and grow the inode to an extent tree if necessary. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
This hooks up ocfs2_readpage() to populate a page with data from an inode block. Direct IO reads from inline data are modified to fall back to buffered I/O. Appropriate checks are also placed in the extent map code to avoid reading an extent list when inline data might be stored. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
Add the disk, network and memory structures needed to support data in inode. Struct ocfs2_inline_data is defined and embedded in ocfs2_dinode for storing inline data. A new inode field, i_dyn_features, is added to facilitate tracking of dynamic inode state. Since it will be used often, we want to mirror it on ocfs2_inode_info, and transfer it via the meta data lvb. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
The check to see if a new dirent would fit in an old one is pretty ugly, and it's done at least twice. Clean things up by putting this in it's own easier-to-read function. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
ocfs2_rename() does direct manipulation of the dirent it's gotten back from a directory search. Wrap this manipulation inside of a function so that we can transparently change directory update behavior in the future. As an added bonus, this gets rid of an ugly macro. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
A couple paths which needed to just match a parent dir + name pair to an inode number were a bit messy because they had to deal with ocfs2_find_files_on_disk() which returns a larger number of values. Provide a convenience function, ocfs2_lookup_ino_from_name() which internalizes all the extra accounting. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
We can preserve the behavior of ocfs2_empty_dir(), while getting rid of the open coded directory walk by just providing a smart filldir callback. This also automatically gets to use the dir readahead code, though in this case any advantage is minor at best. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
ocfs2_queue_orphans() has an open coded readdir loop which can easily just use a directory accessor function. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
filldir_t can take this, so don't turn de->inode into a 32 bit value. Right now this doesn't make a difference since no ocfs2 inodes overflow that, but it could be a nasty surprise later on if some kernel code is calling ocfs2_dir_foreach_blk() and expecting real inode numbers back... Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-
Mark Fasheh authored
Put this in it's own function so that the functionality can be overridden. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Reviewed-by:
Joel Becker <joel.becker@oracle.com>
-