- 10 Jul, 2007 10 commits
-
-
Mark Fasheh authored
This can now be trivially supported with re-use of our existing extend code. ocfs2_allocate_unwritten_extents() takes a start offset and a byte length and iterates over the inode, adding extents (marked as unwritten) until len is reached. Existing extents are skipped over. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Update the write code to detect when the user is asking to write to an unwritten extent. Like writing to a hole, we must zero the region between the write and the cluster boundaries. Most of the existing cluster zeroing logic can be re-used with some additional checks for the unwritten flag on extent records. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Implement cluster consistent shared writeable mappings using the ->page_mkwrite() callback. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Use some ideas from the new-aops patch series and turn ocfs2_buffered_write_cluster() into a 2 stage operation with the caller copying data in between. The code now understands multiple cluster writes as a result of having to deal with a full page write for greater than 4k pages. This sets us up to easily call into the write path during ->page_mkwrite(). Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Use of the alloc sem during truncate was too narrow - we want to protect the i_size change and page truncation against mmap now. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Jens Axboe authored
The name 'pin' was badly chosen, it doesn't pin a pipe buffer in the most commonly used sense in the kernel. So change the name to 'confirm', after debating this issue with Hugh Dickins a bit. A good return from ->confirm() means that the buffer is really there, and that the contents are good. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Jens Axboe authored
We need to move even more stuff into the header so that folks can use the splice_to_pipe() implementation instead of open-coding a lot of pipe knowledge (see relay implementation), so move to our own header file finally. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Jens Axboe authored
They can use generic_file_splice_read() instead. Since sys_sendfile() now prefers that, there should be no change in behaviour. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Jens Axboe authored
A bit of a cheat, it actually just copies the data to userspace. But this makes the interface nice and symmetric and enables people to build on splice, with room for future improvement in performance. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Jens Axboe authored
For direct splicing (or private splicing), the output may not be a file. So abstract out the handling into a specified actor function and put the data in the splice_desc structure earlier, so we can build on top of that. This is the first step in better splice handling for drivers, and also for implementing vmsplice _to_ user memory. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 25 May, 2007 2 commits
-
-
Christoph Hellwig authored
Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We weren't calling this before, but since ocfs2 handles the entire truncate operation, we should. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- 02 May, 2007 3 commits
-
-
Mark Fasheh authored
None of these are actually harmful, but the noise makes looking for real problems difficult. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Adrian Bunk authored
This patch makes the following needlessly global functions static: - aops.c: ocfs2_write_data_page() - dlmglue.c: ocfs2_dump_meta_lvb_info() - file.c: ocfs2_set_inode_size() Signed-off-by:
Adrian Bunk <bunk@stusta.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We need this to support 32 bit system calls on 64 bit kernels. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- 26 Apr, 2007 11 commits
-
-
Mark Fasheh authored
Cluster locking might have been redone because a direct write won't complete, so this needs to be reflected in the iocb. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Older file systems which didn't support holes did a dumb calculation of i_blocks based on i_size. This is no longer accurate, so fix things up to take actual allocation into account. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Return an optional extent flags field from our lookup functions and wire up callers to treat unwritten regions as holes for the purpose of returning zeros to the user. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Due to the size of our group bitmaps, we'll never have a leaf node extent record with more than 16 bits worth of clusters. Split e_clusters up so that leaf nodes can get a flags field where we can mark unwritten extents. Interior nodes whose length references all the child nodes beneath it can't split their e_clusters field, so we use a union to preserve sizing there. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We need to fill holes during a splice write. Provide our own splice write actor which can call ocfs2_file_buffered_write() with a splice-specific callback. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Since we don't zero on extend anymore, truncate needs to be fixed up to zero the part of a file between i_size and and end of it's cluster. Otherwise a subsequent extend could expose bad data. This introduced a new helper, which can be used in ocfs2_write(). Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock() because allocating writes will require zeroing of pages adjacent to the I/O for cluster sizes greater than page size. Implement a custom file write here, which can order page locks for zeroing. This also has the advantage that cluster locks can easily be ordered outside of the page locks. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Right now, file allocation for ocfs2 is done within ocfs2_extend_file(), which is either called from ->setattr() (for an i_size change), or at the top of ocfs2_file_aio_write(). Inodes on file systems with sparse file support will want to do their allocation during the actual write call. In either case the cluster locking decisions are the same. We abstract out that code into a new function, ocfs2_lock_allocators() which will be used by a later patch to enable writing to sparse files. This also provides a nice cleanup of ocfs2_extend_allocation(). Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no longer exists since i_size is not tied to i_clusters. In ocfs2_extend_file(), we skip the allocation / page zeroing code for file systems which understand sparse files. The core truncate code is changed to do a bottom up tree traversal. This gets abstracted out into it's own function. To make things more readable, most of the special case handling for in-inode extents from ocfs2_do_truncate() is also removed. Though write support for sparse files comes in a later patch, we at least update ocfs2_prepare_inode_for_write() to skip allocation for sparse files. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Introduce tree rotations into the b-tree code. This will allow ocfs2 to support sparse files. Much of the added code is designed to be generic (in the ocfs2 sense) so that it can later be re-used to implement large extended attributes. This patch only adds the rotation code and does minimal updates to callers of the extent api. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We don't want to print anything at all in ocfs2_lookup() when getting an error from ocfs2_iget() - it could be something as innocuous as a signal being detected in the dlm. ocfs2_permission() should filter on -ENOENT which ocfs2_meta_lock() can return if the inode was deleted on another node. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- 12 Feb, 2007 1 commit
-
-
Arjan van de Ven authored
Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by:
Arjan van de Ven <arjan@linux.intel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 28 Dec, 2006 2 commits
-
-
Mark Fasheh authored
This can come from NFSD. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Errors from generic_permission() can happen in valid cases and shouldn't be reported. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- 13 Dec, 2006 1 commit
-
-
Mark Fasheh authored
Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and to test against mtime / ctime accordingly. [akpm@osdl.org: cleanups] Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com> Cc: Valerie Henson <val_henson@linux.intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 08 Dec, 2006 1 commit
-
-
Josef Sipek authored
Signed-off-by:
Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 01 Dec, 2006 9 commits
-
-
Tiger Yang authored
Implement .permission() in ocfs2_file_iops, ocfs2_special_file_iops and ocfs2_dir_iops. This helps us avoid some multi-node races with mode change and vfs operations. Signed-off-by:
Tiger Yang <tiger.yang@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Tiger Yang authored
Conditionally update atime in ocfs2_file_aio_read(), ocfs2_readdir() and ocfs2_mmap(). Signed-off-by:
Tiger Yang <tiger.yang@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Tiger Yang authored
This patch adds the core routines for updating atime in ocfs2. Signed-off-by:
Tiger Yang <tiger.yang@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Tiger Yang authored
Add splice read/write support in ocfs2. ocfs2_file_splice_read/write are very similar to ocfs2_file_aio_read/write. Signed-off-by:
Tiger Yang <tiger.yang@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Use should_remove_suid() instead. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
This is mostly a search and replace as ocfs2_journal_handle is now no more than a container for a handle_t pointer. ocfs2_commit_trans() becomes very straight forward, and we remove some out of date comments / code. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
All callers either pass in NULL directly, or a local variable that is already set to NULL. The internals of ocfs2_start_trans() get a nice cleanup as a result. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
This sets us up to remove handle->journal. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Now that this is unused and all callers pass NULL, we can safely remove it. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-