rpms/kernel/devel linux-2.6.27-ext4-stable-patch-queue.patch, NONE, 1.1 linux-2.6.27-fs-disable-fiemap.patch, NONE, 1.1 TODO, 1.18, 1.19 config-generic, 1.183, 1.184 kernel.spec, 1.1044, 1.1045 ext4-patch-queue.patch, 1.1, NONE percpu_counter_sum_cleanup.patch, 1.1, NONE
Eric Sandeen
sandeen at fedoraproject.org
Mon Oct 13 18:46:30 UTC 2008
- Previous message (by thread): rpms/latexmk/devel .cvsignore, 1.4, 1.5 latexmk-conf.patch, 1.3, 1.4 latexmk.conf, 1.3, 1.4 latexmk.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message (by thread): rpms/kernel/F-8 kernel.spec, 1.551, 1.552 linux-2.6-libata-pata_marvell-play-nice-with-ahci.patch, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: sandeen
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25719
Modified Files:
TODO config-generic kernel.spec
Added Files:
linux-2.6.27-ext4-stable-patch-queue.patch
linux-2.6.27-fs-disable-fiemap.patch
Removed Files:
ext4-patch-queue.patch percpu_counter_sum_cleanup.patch
Log Message:
* Mon Oct 13 2008 Eric Sandeen <sandeen at redhat.com>
- Update to upstream ext4 code destined for 2.6.28.
linux-2.6.27-ext4-stable-patch-queue.patch:
--- NEW FILE linux-2.6.27-ext4-stable-patch-queue.patch ---
This is a rolled up patch of the changes that were pushed to Linus as
of 2.6.27-git3.
---
Documentation/filesystems/ext4.txt | 19 +-
Documentation/filesystems/fiemap.txt | 228 ++++++
Documentation/filesystems/proc.txt | 73 +-
MAINTAINERS | 5 +-
fs/Kconfig | 88 ++-
fs/Makefile | 2 +-
fs/ext2/ext2.h | 2 +
fs/ext2/file.c | 1 +
fs/ext2/inode.c | 8 +
fs/ext3/file.c | 1 +
fs/ext3/inode.c | 8 +
fs/ext4/Makefile | 10 +-
fs/ext4/acl.h | 12 +-
fs/ext4/balloc.c | 1457 +++-------------------------------
fs/ext4/bitmap.c | 6 +-
fs/ext4/dir.c | 64 +-
fs/ext4/ext4.h | 133 ++--
fs/ext4/ext4_extents.h | 15 +
fs/ext4/ext4_i.h | 39 +-
fs/ext4/ext4_sb.h | 25 +-
fs/ext4/extents.c | 281 ++++++-
fs/ext4/file.c | 10 +-
fs/ext4/fsync.c | 7 +-
fs/ext4/hash.c | 8 +-
fs/ext4/ialloc.c | 71 +-
fs/ext4/inode.c | 620 +++++++++------
fs/ext4/ioctl.c | 96 +--
fs/ext4/mballoc.c | 220 ++----
fs/ext4/mballoc.h | 1 -
fs/ext4/migrate.c | 10 +-
fs/ext4/namei.c | 402 +++++-----
fs/ext4/resize.c | 33 +-
fs/ext4/super.c | 315 ++++++--
fs/ext4/symlink.c | 8 +-
fs/ext4/xattr.c | 14 +-
fs/ext4/xattr.h | 12 +-
fs/ioctl.c | 273 +++++++
fs/jbd2/checkpoint.c | 71 ++-
fs/jbd2/commit.c | 32 +-
fs/jbd2/journal.c | 103 ++-
fs/jbd2/recovery.c | 7 +-
fs/ocfs2/alloc.c | 9 -
fs/ocfs2/alloc.h | 9 +
fs/ocfs2/extent_map.c | 346 +++++++--
fs/ocfs2/extent_map.h | 3 +
fs/ocfs2/file.c | 1 +
include/linux/ext3_fs.h | 2 +
include/linux/fiemap.h | 64 ++
include/linux/fs.h | 21 +
include/linux/jbd2.h | 8 +-
include/linux/percpu_counter.h | 12 +-
lib/percpu_counter.c | 8 +-
52 files changed, 2710 insertions(+), 2563 deletions(-)
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 0d53949..eb154ef 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -32,9 +32,9 @@ Mailing list: linux-ext4 at vger.kernel.org
you will need to merge your changes with the version from e2fsprogs
1.41.x.
- - Create a new filesystem using the ext4dev filesystem type:
+ - Create a new filesystem using the ext4 filesystem type:
- # mke2fs -t ext4dev /dev/hda1
+ # mke2fs -t ext4 /dev/hda1
Or configure an existing ext3 filesystem to support extents and set
the test_fs flag to indicate that it's ok for an in-development
@@ -47,13 +47,13 @@ Mailing list: linux-ext4 at vger.kernel.org
# tune2fs -I 256 /dev/hda1
- (Note: we currently do not have tools to convert an ext4dev
+ (Note: we currently do not have tools to convert an ext4
filesystem back to ext3; so please do not do try this on production
filesystems.)
- Mounting:
- # mount -t ext4dev /dev/hda1 /wherever
+ # mount -t ext4 /dev/hda1 /wherever
- When comparing performance with other filesystems, remember that
ext3/4 by default offers higher data integrity guarantees than most.
@@ -177,6 +177,11 @@ barrier=<0|1(*)> This enables/disables the use of write barriers in
your disks are battery-backed in one way or another,
disabling barriers may safely improve performance.
+inode_readahead=n This tuning parameter controls the maximum
+ number of inode table blocks that ext4's inode
+ table readahead algorithm will pre-read into
+ the buffer cache. The default value is 32 blocks.
+
orlov (*) This enables the new Orlov block allocator. It is
enabled by default.
@@ -218,6 +223,11 @@ errors=remount-ro(*) Remount the filesystem read-only on an error.
errors=continue Keep going on a filesystem error.
errors=panic Panic and halt the machine if an error occurs.
+data_err=ignore(*) Just print an error message if an error occurs
+ in a file data buffer in ordered mode.
+data_err=abort Abort the journal if an error occurs in a file
+ data buffer in ordered mode.
+
grpid Give objects the same group ID as their creator.
bsdgroups
@@ -252,6 +262,7 @@ stripe=n Number of filesystem blocks that mballoc will try
delalloc (*) Deferring block allocation until write-out time.
nodelalloc Disable delayed allocation. Blocks are allocation
when data is copied from user to page cache.
+
Data Mode
=========
There are 3 different data modes:
diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt
new file mode 100644
index 0000000..1e3defc
--- /dev/null
+++ b/Documentation/filesystems/fiemap.txt
@@ -0,0 +1,228 @@
+============
+Fiemap Ioctl
+============
+
+The fiemap ioctl is an efficient method for userspace to get file
+extent mappings. Instead of block-by-block mapping (such as bmap), fiemap
+returns a list of extents.
+
+
+Request Basics
+--------------
+
+A fiemap request is encoded within struct fiemap:
+
+struct fiemap {
+ __u64 fm_start; /* logical offset (inclusive) at
+ * which to start mapping (in) */
+ __u64 fm_length; /* logical length of mapping which
+ * userspace cares about (in) */
+ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
+ __u32 fm_mapped_extents; /* number of extents that were
+ * mapped (out) */
+ __u32 fm_extent_count; /* size of fm_extents array (in) */
+ __u32 fm_reserved;
+ struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+};
+
+
+fm_start, and fm_length specify the logical range within the file
+which the process would like mappings for. Extents returned mirror
+those on disk - that is, the logical offset of the 1st returned extent
+may start before fm_start, and the range covered by the last returned
+extent may end after fm_length. All offsets and lengths are in bytes.
+
+Certain flags to modify the way in which mappings are looked up can be
+set in fm_flags. If the kernel doesn't understand some particular
+flags, it will return EBADR and the contents of fm_flags will contain
+the set of flags which caused the error. If the kernel is compatible
+with all flags passed, the contents of fm_flags will be unmodified.
+It is up to userspace to determine whether rejection of a particular
+flag is fatal to it's operation. This scheme is intended to allow the
+fiemap interface to grow in the future but without losing
+compatibility with old software.
+
+fm_extent_count specifies the number of elements in the fm_extents[] array
+that can be used to return extents. If fm_extent_count is zero, then the
+fm_extents[] array is ignored (no extents will be returned), and the
+fm_mapped_extents count will hold the number of extents needed in
+fm_extents[] to hold the file's current mapping. Note that there is
+nothing to prevent the file from changing between calls to FIEMAP.
+
+The following flags can be set in fm_flags:
+
+* FIEMAP_FLAG_SYNC
+If this flag is set, the kernel will sync the file before mapping extents.
+
+* FIEMAP_FLAG_XATTR
+If this flag is set, the extents returned will describe the inodes
+extended attribute lookup tree, instead of it's data tree.
+
+
+Extent Mapping
+--------------
+
+Extent information is returned within the embedded fm_extents array
+which userspace must allocate along with the fiemap structure. The
+number of elements in the fiemap_extents[] array should be passed via
+fm_extent_count. The number of extents mapped by kernel will be
+returned via fm_mapped_extents. If the number of fiemap_extents
+allocated is less than would be required to map the requested range,
+the maximum number of extents that can be mapped in the fm_extent[]
+array will be returned and fm_mapped_extents will be equal to
[...8854 lines suppressed...]
+ __u64 fe_reserved64[2];
+ __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
+ __u32 fe_reserved[3];
+};
+
+struct fiemap {
+ __u64 fm_start; /* logical offset (inclusive) at
+ * which to start mapping (in) */
+ __u64 fm_length; /* logical length of mapping which
+ * userspace wants (in) */
+ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
+ __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
+ __u32 fm_extent_count; /* size of fm_extents array (in) */
+ __u32 fm_reserved;
+ struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+};
+
+#define FIEMAP_MAX_OFFSET (~0ULL)
+
+#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
+#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
+
+#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
+
+#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
+#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
+#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending.
+ * Sets EXTENT_UNKNOWN. */
+#define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read
+ * while fs is unmounted */
+#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs.
+ * Sets EXTENT_NO_BYPASS. */
+#define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be
+ * block aligned. */
+#define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata.
+ * Sets EXTENT_NOT_ALIGNED.*/
+#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block.
+ * Sets EXTENT_NOT_ALIGNED.*/
+#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but
+ * no data (i.e. zero). */
+#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
+ * support extents. Result
+ * merged for efficiency. */
+
+#endif /* _LINUX_FIEMAP_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 580b513..385c9a1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -231,6 +231,7 @@ extern int dir_notify_enable;
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
#define FS_IOC_GETVERSION _IOR('v', 1, long)
#define FS_IOC_SETVERSION _IOW('v', 2, long)
+#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
@@ -291,6 +292,7 @@ extern int dir_notify_enable;
#include <linux/mutex.h>
#include <linux/capability.h>
#include <linux/semaphore.h>
+#include <linux/fiemap.h>
#include <asm/atomic.h>
#include <asm/byteorder.h>
@@ -1179,6 +1181,20 @@ extern void dentry_unhash(struct dentry *dentry);
extern int file_permission(struct file *, int);
/*
+ * VFS FS_IOC_FIEMAP helper definitions.
+ */
+struct fiemap_extent_info {
+ unsigned int fi_flags; /* Flags as passed from user */
+ unsigned int fi_extents_mapped; /* Number of mapped extents */
+ unsigned int fi_extents_max; /* Size of fiemap_extent array */
+ struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
+ * array */
+};
+int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
+ u64 phys, u64 len, u32 flags);
+int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
+
+/*
* File types
*
* NOTE! These match bits 12..15 of stat.st_mode
@@ -1287,6 +1303,8 @@ struct inode_operations {
void (*truncate_range)(struct inode *, loff_t, loff_t);
long (*fallocate)(struct inode *inode, int mode, loff_t offset,
loff_t len);
+ int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
+ u64 len);
};
struct seq_file;
@@ -1980,6 +1998,9 @@ extern int vfs_fstat(unsigned int, struct kstat *);
extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
unsigned long arg);
+extern int generic_block_fiemap(struct inode *inode,
+ struct fiemap_extent_info *fieinfo, u64 start,
+ u64 len, get_block_t *get_block);
extern void get_filesystem(struct file_system_type *fs);
extern void put_filesystem(struct file_system_type *fs);
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 3dd2090..d2e91ea 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -850,7 +850,8 @@ struct journal_s
*/
struct block_device *j_dev;
int j_blocksize;
- unsigned long long j_blk_offset;
+ unsigned long long j_blk_offset;
+ char j_devname[BDEVNAME_SIZE+24];
/*
* Device which holds the client fs. For internal journal this will be
@@ -966,6 +967,9 @@ struct journal_s
#define JBD2_FLUSHED 0x008 /* The journal superblock has been flushed */
#define JBD2_LOADED 0x010 /* The journal superblock has been loaded */
#define JBD2_BARRIER 0x020 /* Use IDE barriers */
+#define JBD2_ABORT_ON_SYNCDATA_ERR 0x040 /* Abort the journal on file
+ * data write error in ordered
+ * mode */
/*
* Function declarations for the journaling transaction and buffer
@@ -1059,7 +1063,7 @@ extern void jbd2_journal_clear_features
(journal_t *, unsigned long, unsigned long, unsigned long);
extern int jbd2_journal_create (journal_t *);
extern int jbd2_journal_load (journal_t *journal);
-extern void jbd2_journal_destroy (journal_t *);
+extern int jbd2_journal_destroy (journal_t *);
extern int jbd2_journal_recover (journal_t *journal);
extern int jbd2_journal_wipe (journal_t *, int);
extern int jbd2_journal_skip_recovery (journal_t *);
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index 2083888..9007ccd 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -35,7 +35,7 @@ int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount);
void percpu_counter_destroy(struct percpu_counter *fbc);
void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
-s64 __percpu_counter_sum(struct percpu_counter *fbc, int set);
+s64 __percpu_counter_sum(struct percpu_counter *fbc);
static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
{
@@ -44,19 +44,13 @@ static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
{
- s64 ret = __percpu_counter_sum(fbc, 0);
+ s64 ret = __percpu_counter_sum(fbc);
return ret < 0 ? 0 : ret;
}
-static inline s64 percpu_counter_sum_and_set(struct percpu_counter *fbc)
-{
- return __percpu_counter_sum(fbc, 1);
-}
-
-
static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
{
- return __percpu_counter_sum(fbc, 0);
+ return __percpu_counter_sum(fbc);
}
static inline s64 percpu_counter_read(struct percpu_counter *fbc)
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index 4a8ba4b..a866389 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -52,7 +52,7 @@ EXPORT_SYMBOL(__percpu_counter_add);
* Add up all the per-cpu counts, return the result. This is a more accurate
* but much slower version of percpu_counter_read_positive()
*/
-s64 __percpu_counter_sum(struct percpu_counter *fbc, int set)
+s64 __percpu_counter_sum(struct percpu_counter *fbc)
{
s64 ret;
int cpu;
@@ -62,11 +62,9 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc, int set)
for_each_online_cpu(cpu) {
s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
ret += *pcount;
- if (set)
- *pcount = 0;
+ *pcount = 0;
}
- if (set)
- fbc->count = ret;
+ fbc->count = ret;
spin_unlock(&fbc->lock);
return ret;
linux-2.6.27-fs-disable-fiemap.patch:
--- NEW FILE linux-2.6.27-fs-disable-fiemap.patch ---
Index: linux-2.6.27.noarch/fs/ioctl.c
===================================================================
--- linux-2.6.27.noarch.orig/fs/ioctl.c 2008-10-13 12:58:54.000000000 -0500
+++ linux-2.6.27.noarch/fs/ioctl.c 2008-10-13 13:08:06.861000990 -0500
@@ -352,7 +352,12 @@ static int file_ioctl(struct file *filp,
case FIBMAP:
return ioctl_fibmap(filp, p);
case FS_IOC_FIEMAP:
+#if 0
+ /* Until this is released in 2.6.28 we won't turn it on */
return ioctl_fiemap(filp, arg);
+#else
+ return -EINVAL;
+#endif
case FIGETBSZ:
return put_user(inode->i_sb->s_blocksize, p);
case FIONREAD:
Index: TODO
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/TODO,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- TODO 13 Oct 2008 16:44:10 -0000 1.18
+++ TODO 13 Oct 2008 18:46:00 -0000 1.19
@@ -146,11 +146,14 @@
DEBUG_SHIRQ causes an oops.
Needs testing, if it works, it'll go upstream soon.
-ext4-patch-queue.patch
-percpu_counter_sum_cleanup.patch
+linux-2.6.27-ext4-stable-patch-queue.patch
EXT4 bits for 2.6.28
Eric looks after this stuff.
+linux-2.6.27-fs-disable-fiemap.patch
+ Don't let this interface get out 'til it's official (and
+ released) upstream.
+
linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
from Ingo's x86/urgent tree, should have been in 2.6.27
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- config-generic 10 Oct 2008 18:50:42 -0000 1.183
+++ config-generic 13 Oct 2008 18:46:00 -0000 1.184
@@ -2904,6 +2904,7 @@
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
+CONFIG_EXT4DEV_COMPAT=y
CONFIG_JBD2_DEBUG=y
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1044
retrieving revision 1.1045
diff -u -r1.1044 -r1.1045
--- kernel.spec 13 Oct 2008 18:01:35 -0000 1.1044
+++ kernel.spec 13 Oct 2008 18:46:00 -0000 1.1045
@@ -682,8 +682,8 @@
Patch2803: linux-2.6-amd64-yes-i-know-you-live.patch
# ext4 fun - new & improved, now with less dev!
-Patch2900: percpu_counter_sum_cleanup.patch
-Patch2901: ext4-patch-queue.patch
+Patch2900: linux-2.6.27-ext4-stable-patch-queue.patch
+Patch2901: linux-2.6.27-fs-disable-fiemap.patch
# Fix for xfs wrongly disabling barriers and remount problems
Patch2902: linux-2.6.27-xfs-barrier-fix.patch
@@ -1089,10 +1089,11 @@
# bugfixes to drivers and filesystems
#
-# This is in -mm, acked by peterz, needed by ext4
-ApplyPatch percpu_counter_sum_cleanup.patch
# Pending ext4 patch queue, minus fiemap, includes s/ext4dev/ext4
-ApplyPatch ext4-patch-queue.patch
+ApplyPatch linux-2.6.27-ext4-stable-patch-queue.patch
+# Disable fiemap until it is really truly upstream & released
+ApplyPatch linux-2.6.27-fs-disable-fiemap.patch
+
# xfs
ApplyPatch linux-2.6.27-xfs-barrier-fix.patch
ApplyPatch linux-2.6.27-xfs-remount-fix.patch
@@ -1815,6 +1816,7 @@
* Mon Oct 13 2008 Eric Sandeen <sandeen at redhat.com>
- Add fix for xfs root mount failure when some options are used.
+- Update to upstream ext4 code destined for 2.6.28.
* Fri Oct 10 2008 Dave Airlie <airlied at redhat.com>
- rebase drm patches onto drm-next.patch which is going upstream
--- ext4-patch-queue.patch DELETED ---
--- percpu_counter_sum_cleanup.patch DELETED ---
- Previous message (by thread): rpms/latexmk/devel .cvsignore, 1.4, 1.5 latexmk-conf.patch, 1.3, 1.4 latexmk.conf, 1.3, 1.4 latexmk.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message (by thread): rpms/kernel/F-8 kernel.spec, 1.551, 1.552 linux-2.6-libata-pata_marvell-play-nice-with-ahci.patch, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list