- 13 10月, 2007 23 次提交
-
-
由 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 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
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: 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>
-
由 Mark Fasheh 提交于
We'll want to reuse most of this when pushing inline data back out to an extent. Keeping this part as a seperate patch helps to keep the upcoming changes for write support uncluttered. The core portion of ocfs2_zero_cluster_pages() responsible for making sure a page is mapped and properly dirtied is abstracted out into it's own function, ocfs2_map_and_dirty_page(). Actual functionality doesn't change, though zeroing becomes optional. We also turn part of ocfs2_free_write_ctxt() into a common function for unlocking and freeing a page array. This operation is very common (and uniform) for Ocfs2 cluster sizes greater than page size, so it makes sense to keep the code in one place. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
By doing this, we can remove any higher level logic which has to have knowledge of btree functionality - any callers of ocfs2_write_begin() can now expect it to do anything necessary to prepare the inode for new data. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com> Reviewed-by: NJoel Becker <joel.becker@oracle.com>
-
由 Mark Fasheh 提交于
ocfs2-tools added some on-disk fields and flags which are used by tunefs.ocfs2. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Denis Cheng 提交于
Signed-off-by: NDenis Cheng <crquan@gmail.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Sunil Mushran 提交于
Implement sops->show_options() so as to allow /proc/mounts to show the mount options. Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
This is technically harmless (recovery will clean it out later), but leaves a bogus entry in the slot_map which really shouldn't be there. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
c_used_tail_recs in struct ocfs2_merge_ctxt is only ever set, so we can remove it. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Tao Mao 提交于
delete_tail_recs in ocfs2_try_to_merge_extent() was only ever set, remove it. Signed-off-by: NTao Mao <tao.ma@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Tao Mao 提交于
ocfs2_insert_type->ins_free_records was only used in one place, and was set incorrectly in most places. We can free up some memory and lose some code by removing this. * Small warning fixup contributed by Andrew Mortom <akpm@linux-foundation.org> Signed-off-by: NTao Mao <tao.ma@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 12 10月, 2007 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 10 10月, 2007 1 次提交
-
-
由 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: NNeil Brown <neilb@suse.de> Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
- 04 10月, 2007 1 次提交
-
-
由 Sunil Mushran 提交于
The fs was not unlocking the local alloc inode mutex in the code path in which it failed to find a window of free bits in the global bitmap. Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 21 9月, 2007 4 次提交
-
-
由 Sunil Mushran 提交于
The ocfs2_vote_msg and ocfs2_response_msg structs needed to be packed to ensure similar sizeofs in 32-bit and 64-bit arches. Without this, we had inadvertantly broken 32/64 bit cross mounts. Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
The target page offsets were being incorrectly set a second time in ocfs2_prepare_page_for_write(), which was causing problems on a 16k page size kernel. Additionally, ocfs2_write_failure() was incorrectly using those parameters instead of the parameters for the individual page being cleaned up. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
This was broken for file systems whose cluster size is greater than page size. Pos needs to be incremented as we loop through the descriptors, and len needs to be capped to the size of a single cluster. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
The ocfs2 write code loops through a page much like the block code, except that ocfs2 allocation units can be any size, including larger than page size. Typically it's equal to or larger than page size - most kernels run 4k pages, the minimum ocfs2 allocation (cluster) size. Some changes introduced during 2.6.23 changed the way writes to pages are handled, and inadvertantly broke support for > 4k page size. Instead of just writing one cluster at a time, we now handle the whole page in one pass. This means that multiple (small) seperate allocations might happen in the same pass. The allocation code howver typically optimizes by getting the maximum which was reserved. This triggered a BUG_ON in the extend code where it'd ask for a single bit (for one part of a > 4k page) and get back more than it asked for. Fix this by providing a variant of the high level allocation function which allows the caller to specify a maximum. The traditional function remains and just calls the new one with a maximum determined from the initial reservation. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 12 9月, 2007 3 次提交
-
-
由 Mark Fasheh 提交于
We were setting i_blocks too early - before truncating any allocation. Correct things to set i_blocks after the allocation change. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 tao.ma@oracle.com 提交于
In ocfs2_alloc_write_write_ctxt, the written clusters length is calculated by the byte length only. This may cause some problems if we start to write at some position in the end of one cluster and last to a second cluster while the "len" is smaller than a cluster size. In that case, we have to write 2 clusters actually. So we have to take the start position into consideration also. Signed-off-by: NTao Ma <tao.ma@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Tiger Yang 提交于
For some mount option types, ocfs2_parse_options() will try to access sb->s_fs_info to get at the ocfs2 private superblock. Unfortunately, that hasn't been allocated yet and will cause a kernel crash. Fix this by storing options in a struct which can then get pushed into the ocfs2_super once it's been allocated later. If we need more options which store to the ocfs2_super in the future, we can just fields to this struct. Signed-off-by: NTiger Yang <tiger.yang@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
- 10 8月, 2007 7 次提交
-
-
由 Mark Fasheh 提交于
We need to manually set this to '1' during mount, otherwise inode_setattr() will chop off the nanosecond portion of our timestamps. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Sunil Mushran 提交于
Instead of treating EAGAIN, returned from sendpage(), as an error, this patch retries the operation. Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Sunil Mushran 提交于
If one process is extending a file while another is renaming it, there exists a window when rename could flush the old inode's stale i_size to disk. This patch recognizes the fact that rename is only updating the old inode's ctime, so it ensures only that value is flushed to disk. Signed-off-by: NSunil Mushran <sunil.musran@oracle.com> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Adrian Bunk 提交于
This patch removes some now dead code. Spotted by the Coverity checker. Signed-off-by: NAdrian Bunk <bunk@stusta.de> Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
ocfs2_max_file_offset() was over-estimating the largest file size for several cases. This wasn't really a problem before, but now that we support sparse files, it needs to be more accurate. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
We have to manually check the requested truncate size as the check in vmtruncate() comes too late for Ocfs2. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-
由 Mark Fasheh 提交于
ocfs2_align_clusters_to_page_index() needs to cast the clusters shift to pgoff_t and ocfs2_file_buffered_write() needs loff_t when calculating destination start for memcpy. Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
-