Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Ocfs2/move_extents: Add basic framework and source files for extent moving.

Adding new files move_extents.[c|h] and fill it with nothing but
only a context structure.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>

+77
+1
fs/ocfs2/Makefile
··· 30 30 namei.o \ 31 31 refcounttree.o \ 32 32 reservations.o \ 33 + move_extents.o \ 33 34 resize.o \ 34 35 slot_map.o \ 35 36 suballoc.o \
+56
fs/ocfs2/move_extents.c
··· 1 + /* -*- mode: c; c-basic-offset: 8; -*- 2 + * vim: noexpandtab sw=8 ts=8 sts=0: 3 + * 4 + * move_extents.c 5 + * 6 + * Copyright (C) 2011 Oracle. All rights reserved. 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public 10 + * License version 2 as published by the Free Software Foundation. 11 + * 12 + * This program is distributed in the hope that it will be useful, 13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 + * General Public License for more details. 16 + */ 17 + #include <linux/fs.h> 18 + #include <linux/types.h> 19 + #include <linux/mount.h> 20 + #include <linux/swap.h> 21 + 22 + #include <cluster/masklog.h> 23 + 24 + #include "ocfs2.h" 25 + #include "ocfs2_ioctl.h" 26 + 27 + #include "alloc.h" 28 + #include "aops.h" 29 + #include "dlmglue.h" 30 + #include "extent_map.h" 31 + #include "inode.h" 32 + #include "journal.h" 33 + #include "suballoc.h" 34 + #include "uptodate.h" 35 + #include "super.h" 36 + #include "dir.h" 37 + #include "buffer_head_io.h" 38 + #include "sysfile.h" 39 + #include "suballoc.h" 40 + #include "refcounttree.h" 41 + #include "move_extents.h" 42 + 43 + struct ocfs2_move_extents_context { 44 + struct inode *inode; 45 + struct file *file; 46 + int auto_defrag; 47 + int credits; 48 + u32 new_phys_cpos; 49 + u32 clusters_moved; 50 + u64 refcount_loc; 51 + struct ocfs2_move_extents *range; 52 + struct ocfs2_extent_tree et; 53 + struct ocfs2_alloc_context *meta_ac; 54 + struct ocfs2_alloc_context *data_ac; 55 + struct ocfs2_cached_dealloc_ctxt dealloc; 56 + };
+20
fs/ocfs2/move_extents.h
··· 1 + /* -*- mode: c; c-basic-offset: 8; -*- 2 + * vim: noexpandtab sw=8 ts=8 sts=0: 3 + * 4 + * move_extents.h 5 + * 6 + * Copyright (C) 2011 Oracle. All rights reserved. 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public 10 + * License version 2 as published by the Free Software Foundation. 11 + * 12 + * This program is distributed in the hope that it will be useful, 13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 + * General Public License for more details. 16 + */ 17 + #ifndef OCFS2_MOVE_EXTENTS_H 18 + #define OCFS2_MOVE_EXTENTS_H 19 + 20 + #endif /* OCFS2_MOVE_EXTENTS_H */