- 13 10月, 2007 11 次提交
-
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
ocfs2_queue_orphans() has an open coded readdir loop which can easily just use a directory accessor function. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
Put this in it's own function so that the functionality can be overridden. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
The code for adding, removing, deleting directory entries was splattered all over namei.c. I'd rather have this all centralized, so that it's easier to make changes for inline dir data, and eventually indexed directories. None of the code in any of the functions was changed. I only removed the static keyword from some prototypes so that they could be exported. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
- 11 7月, 2007 1 次提交
-
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
- 03 5月, 2007 1 次提交
-
-
由 Joel Becker 提交于
OCFS2_I(inode)->ip_alloc_sem is a read-write semaphore protecting local concurrent access of ocfs2 inodes. However, ocfs2 directories were not taking the semaphore while they accessed or modified the allocation tree. ocfs2_extend_dir() needs to take the semaphore in a write mode when it adds to the allocation. All other directory users get there via ocfs2_bread(), which takes the semaphore in read mode. Signed-off-by: NJoel Becker <joel.becker@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 27 4月, 2007 4 次提交
-
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
The code in extent_map.c is not prepared to deal with a subtree being rotated between lookups. This can happen when filling holes in sparse files. Instead of a lengthy patch to update the code (which would likely lose the benefit of caching subtree roots), we remove most of the algorithms and implement a simple path based lookup. A less ambitious extent caching scheme will be added in a later patch. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
- 09 12月, 2006 1 次提交
-
-
由 Josef Sipek 提交于
Signed-off-by: NJosef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 02 12月, 2006 6 次提交
-
-
由 Tiger Yang 提交于
Conditionally update atime in ocfs2_file_aio_read(), ocfs2_readdir() and ocfs2_mmap(). Signed-off-by: NTiger Yang <tiger.yang@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
This sets us up to remove handle->journal. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
Now that this is unused and all callers pass NULL, we can safely remove it. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
Instead we record our state on the allocation context structure which all callers already know about and lifetime correctly. This means the reservation functions don't need a handle passed in any more, and we can also take it off the alloc context. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 21 9月, 2006 1 次提交
-
-
由 Mark Fasheh 提交于
Uptodate.c now knows about read-ahead buffers. Use some more aggressive logic in ocfs2_readdir(). The two functions which currently use directory read-ahead are ocfs2_find_entry() and ocfs2_readdir(). Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 30 6月, 2006 1 次提交
-
-
由 Joel Becker 提交于
Give gcc the chance to compile out the debug logging code in ocfs2. This saves some size at the expense of being able to debug the code. Signed-off-by: NJoel Becker <joel.becker@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 25 3月, 2006 1 次提交
-
-
由 Mark Fasheh 提交于
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 10 1月, 2006 1 次提交
-
-
由 Jes Sorensen 提交于
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: NIngo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: NJes Sorensen <jes@sgi.com> Signed-off-by: NIngo Molnar <mingo@elte.hu>
-
- 04 1月, 2006 1 次提交
-
-
由 Mark Fasheh 提交于
The OCFS2 file system module. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Signed-off-by: NKurt Hackel <kurt.hackel@oracle.com>
-