automatic version update by autodist [release 3.14.5-1mamba;Sat Jun 07 2014]
This commit is contained in:
parent
94b2133739
commit
f84d74af13
@ -1,146 +0,0 @@
|
||||
From 241ccca7d4e91d2b9d7249bc0b2758d9470b4c65 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@suse.cz>
|
||||
Date: Thu, 27 Jun 2013 16:39:49 +0200
|
||||
Subject: [PATCH 1/9] vfs: add i_op->dentry_open()
|
||||
|
||||
Add a new inode operation i_op->dentry_open(). This is for stacked filesystems
|
||||
that want to return a struct file from a different filesystem.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
Documentation/filesystems/Locking | 2 ++
|
||||
Documentation/filesystems/vfs.txt | 7 +++++++
|
||||
fs/namei.c | 9 ++++++---
|
||||
fs/open.c | 23 +++++++++++++++++++++--
|
||||
include/linux/fs.h | 2 ++
|
||||
5 files changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
|
||||
index 0706d32..4331290 100644
|
||||
--- a/Documentation/filesystems/Locking
|
||||
+++ b/Documentation/filesystems/Locking
|
||||
@@ -66,6 +66,7 @@ prototypes:
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode, int *opened);
|
||||
+ int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
|
||||
|
||||
locking rules:
|
||||
all may block
|
||||
@@ -93,6 +94,7 @@ removexattr: yes
|
||||
fiemap: no
|
||||
update_time: no
|
||||
atomic_open: yes
|
||||
+dentry_open: no
|
||||
|
||||
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
|
||||
victim.
|
||||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
|
||||
index bc4b06b..f64a4d1 100644
|
||||
--- a/Documentation/filesystems/vfs.txt
|
||||
+++ b/Documentation/filesystems/vfs.txt
|
||||
@@ -362,6 +362,7 @@ struct inode_operations {
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode, int *opened);
|
||||
+ int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
|
||||
};
|
||||
|
||||
Again, all methods are called without any locks being held, unless
|
||||
@@ -681,6 +682,12 @@ struct address_space_operations {
|
||||
but instead uses bmap to find out where the blocks in the file
|
||||
are and uses those addresses directly.
|
||||
|
||||
+ dentry_open: this is an alternative to f_op->open(), the difference is that
|
||||
+ this method may open a file not necessarily originating from the same
|
||||
+ filesystem as the one i_op->open() was called on. It may be
|
||||
+ useful for stacking filesystems which want to allow native I/O directly
|
||||
+ on underlying files.
|
||||
+
|
||||
|
||||
invalidatepage: If a page has PagePrivate set, then invalidatepage
|
||||
will be called when part or all of the page is to be removed
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index 9ed9361..c06e521 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2867,9 +2867,12 @@ finish_open_created:
|
||||
error = may_open(&nd->path, acc_mode, open_flag);
|
||||
if (error)
|
||||
goto out;
|
||||
- file->f_path.mnt = nd->path.mnt;
|
||||
- error = finish_open(file, nd->path.dentry, NULL, opened);
|
||||
- if (error) {
|
||||
+
|
||||
+ BUG_ON(*opened & FILE_OPENED); /* once it's opened, it's opened */
|
||||
+ error = vfs_open(&nd->path, file, current_cred());
|
||||
+ if (!error) {
|
||||
+ *opened |= FILE_OPENED;
|
||||
+ } else {
|
||||
if (error == -EOPENSTALE)
|
||||
goto stale_open;
|
||||
goto out;
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 8c74100..ab07bc9 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -800,8 +800,7 @@ struct file *dentry_open(const struct path *path, int flags,
|
||||
f = get_empty_filp();
|
||||
if (!IS_ERR(f)) {
|
||||
f->f_flags = flags;
|
||||
- f->f_path = *path;
|
||||
- error = do_dentry_open(f, NULL, cred);
|
||||
+ error = vfs_open(path, f, cred);
|
||||
if (!error) {
|
||||
/* from now on we need fput() to dispose of f */
|
||||
error = open_check_o_direct(f);
|
||||
@@ -818,6 +817,26 @@ struct file *dentry_open(const struct path *path, int flags,
|
||||
}
|
||||
EXPORT_SYMBOL(dentry_open);
|
||||
|
||||
+/**
|
||||
+ * vfs_open - open the file at the given path
|
||||
+ * @path: path to open
|
||||
+ * @filp: newly allocated file with f_flag initialized
|
||||
+ * @cred: credentials to use
|
||||
+ */
|
||||
+int vfs_open(const struct path *path, struct file *filp,
|
||||
+ const struct cred *cred)
|
||||
+{
|
||||
+ struct inode *inode = path->dentry->d_inode;
|
||||
+
|
||||
+ if (inode->i_op->dentry_open)
|
||||
+ return inode->i_op->dentry_open(path->dentry, filp, cred);
|
||||
+ else {
|
||||
+ filp->f_path = *path;
|
||||
+ return do_dentry_open(filp, NULL, cred);
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL(vfs_open);
|
||||
+
|
||||
static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op)
|
||||
{
|
||||
int lookup_flags = 0;
|
||||
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||
index 65c2be2..0a87abc 100644
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -1575,6 +1575,7 @@ struct inode_operations {
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode, int *opened);
|
||||
+ int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
|
||||
} ____cacheline_aligned;
|
||||
|
||||
ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
|
||||
@@ -2008,6 +2009,7 @@ extern struct file *file_open_name(struct filename *, int, umode_t);
|
||||
extern struct file *filp_open(const char *, int, umode_t);
|
||||
extern struct file *file_open_root(struct dentry *, struct vfsmount *,
|
||||
const char *, int);
|
||||
+extern int vfs_open(const struct path *, struct file *, const struct cred *);
|
||||
extern struct file * dentry_open(const struct path *, int, const struct cred *);
|
||||
extern int filp_close(struct file *, fl_owner_t id);
|
||||
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,60 +0,0 @@
|
||||
From bbe04b17053d192844389840b6b981cd98417517 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@suse.cz>
|
||||
Date: Thu, 27 Jun 2013 16:39:49 +0200
|
||||
Subject: [PATCH 2/9] vfs: export do_splice_direct() to modules
|
||||
|
||||
Export do_splice_direct() to modules. Needed by overlay filesystem.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/internal.h | 6 ------
|
||||
fs/splice.c | 1 +
|
||||
include/linux/fs.h | 3 +++
|
||||
3 files changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/fs/internal.h b/fs/internal.h
|
||||
index 6812158..eaa75f7 100644
|
||||
--- a/fs/internal.h
|
||||
+++ b/fs/internal.h
|
||||
@@ -132,12 +132,6 @@ extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
|
||||
extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
|
||||
|
||||
/*
|
||||
- * splice.c
|
||||
- */
|
||||
-extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
||||
- loff_t *opos, size_t len, unsigned int flags);
|
||||
-
|
||||
-/*
|
||||
* pipe.c
|
||||
*/
|
||||
extern const struct file_operations pipefifo_fops;
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index 9eca476..8d415fc 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -1312,6 +1312,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(do_splice_direct);
|
||||
|
||||
static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
|
||||
struct pipe_inode_info *opipe,
|
||||
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||
index 0a87abc..80690b3 100644
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -2416,6 +2416,9 @@ extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
|
||||
struct file *, loff_t *, size_t, unsigned int);
|
||||
extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
|
||||
struct file *out, loff_t *, size_t len, unsigned int flags);
|
||||
+extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
||||
+ loff_t *opos, size_t len, unsigned int flags);
|
||||
+
|
||||
|
||||
extern void
|
||||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 268ab52e6c604555f81807307a845ffe654c3aa9 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@suse.cz>
|
||||
Date: Thu, 27 Jun 2013 16:39:49 +0200
|
||||
Subject: [PATCH 3/9] vfs: export __inode_permission() to modules
|
||||
|
||||
We need to be able to check inode permissions (but not filesystem implied
|
||||
permissions) for stackable filesystems. Expose this interface for overlayfs.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/internal.h | 5 -----
|
||||
fs/namei.c | 1 +
|
||||
include/linux/fs.h | 1 +
|
||||
3 files changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/fs/internal.h b/fs/internal.h
|
||||
index eaa75f7..6c9ec69 100644
|
||||
--- a/fs/internal.h
|
||||
+++ b/fs/internal.h
|
||||
@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait)
|
||||
extern void __init chrdev_init(void);
|
||||
|
||||
/*
|
||||
- * namei.c
|
||||
- */
|
||||
-extern int __inode_permission(struct inode *, int);
|
||||
-
|
||||
-/*
|
||||
* namespace.c
|
||||
*/
|
||||
extern int copy_mount_options(const void __user *, unsigned long *);
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index c06e521..df058f5 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -402,6 +402,7 @@ int __inode_permission(struct inode *inode, int mask)
|
||||
|
||||
return security_inode_permission(inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL(__inode_permission);
|
||||
|
||||
/**
|
||||
* sb_permission - Check superblock-level permissions
|
||||
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||
index 80690b3..8a6752b 100644
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -2210,6 +2210,7 @@ extern sector_t bmap(struct inode *, sector_t);
|
||||
#endif
|
||||
extern int notify_change(struct dentry *, struct iattr *);
|
||||
extern int inode_permission(struct inode *, int);
|
||||
+extern int __inode_permission(struct inode *, int);
|
||||
extern int generic_permission(struct inode *, int);
|
||||
|
||||
static inline bool execute_ok(struct inode *inode)
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 04c7737b94059b8935abd0c09ac8745eba89ad90 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@suse.cz>
|
||||
Date: Thu, 27 Jun 2013 16:39:49 +0200
|
||||
Subject: [PATCH 4/9] vfs: introduce clone_private_mount()
|
||||
|
||||
Overlayfs needs a private clone of the mount, so create a function for
|
||||
this and export to modules.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/namespace.c | 27 +++++++++++++++++++++++++++
|
||||
include/linux/mount.h | 3 +++
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index 7b1ca9b..455e6ea 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -1442,6 +1442,33 @@ void drop_collected_mounts(struct vfsmount *mnt)
|
||||
namespace_unlock();
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * clone_private_mount - create a private clone of a path
|
||||
+ *
|
||||
+ * This creates a new vfsmount, which will be the clone of @path. The new will
|
||||
+ * not be attached anywhere in the namespace and will be private (i.e. changes
|
||||
+ * to the originating mount won't be propagated into this).
|
||||
+ *
|
||||
+ * Release with mntput().
|
||||
+ */
|
||||
+struct vfsmount *clone_private_mount(struct path *path)
|
||||
+{
|
||||
+ struct mount *old_mnt = real_mount(path->mnt);
|
||||
+ struct mount *new_mnt;
|
||||
+
|
||||
+ if (IS_MNT_UNBINDABLE(old_mnt))
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+
|
||||
+ down_read(&namespace_sem);
|
||||
+ new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
|
||||
+ up_read(&namespace_sem);
|
||||
+ if (IS_ERR(new_mnt))
|
||||
+ return ERR_CAST(new_mnt);
|
||||
+
|
||||
+ return &new_mnt->mnt;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(clone_private_mount);
|
||||
+
|
||||
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
struct vfsmount *root)
|
||||
{
|
||||
diff --git a/include/linux/mount.h b/include/linux/mount.h
|
||||
index 73005f9..435f281 100644
|
||||
--- a/include/linux/mount.h
|
||||
+++ b/include/linux/mount.h
|
||||
@@ -68,6 +68,9 @@ extern void mnt_pin(struct vfsmount *mnt);
|
||||
extern void mnt_unpin(struct vfsmount *mnt);
|
||||
extern int __mnt_is_readonly(struct vfsmount *mnt);
|
||||
|
||||
+struct path;
|
||||
+extern struct vfsmount *clone_private_mount(struct path *path);
|
||||
+
|
||||
struct file_system_type;
|
||||
extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
|
||||
int flags, const char *name,
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,114 +0,0 @@
|
||||
From 57c8073caecaaaeb087d1bad0de1baa497189181 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Whitcroft <apw@canonical.com>
|
||||
Date: Thu, 27 Jun 2013 16:39:50 +0200
|
||||
Subject: [PATCH 6/9] overlayfs: add statfs support
|
||||
|
||||
Add support for statfs to the overlayfs filesystem. As the upper layer
|
||||
is the target of all write operations assume that the space in that
|
||||
filesystem is the space in the overlayfs. There will be some inaccuracy as
|
||||
overwriting a file will copy it up and consume space we were not expecting,
|
||||
but it is better than nothing.
|
||||
|
||||
Use the upper layer dentry and mount from the overlayfs root inode,
|
||||
passing the statfs call to that filesystem.
|
||||
|
||||
Signed-off-by: Andy Whitcroft <apw@canonical.com>
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/overlayfs/super.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
|
||||
index d209dd9..a9970b5 100644
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -17,15 +17,19 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/cred.h>
|
||||
#include <linux/sched.h>
|
||||
+#include <linux/statfs.h>
|
||||
#include "overlayfs.h"
|
||||
|
||||
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
|
||||
MODULE_DESCRIPTION("Overlay filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
+#define OVERLAYFS_SUPER_MAGIC 0x794c764f
|
||||
+
|
||||
struct ovl_fs {
|
||||
struct vfsmount *upper_mnt;
|
||||
struct vfsmount *lower_mnt;
|
||||
+ long lower_namelen;
|
||||
};
|
||||
|
||||
struct ovl_entry {
|
||||
@@ -406,9 +410,36 @@ static int ovl_remount_fs(struct super_block *sb, int *flagsp, char *data)
|
||||
return mnt_want_write(ufs->upper_mnt);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * ovl_statfs
|
||||
+ * @sb: The overlayfs super block
|
||||
+ * @buf: The struct kstatfs to fill in with stats
|
||||
+ *
|
||||
+ * Get the filesystem statistics. As writes always target the upper layer
|
||||
+ * filesystem pass the statfs to the same filesystem.
|
||||
+ */
|
||||
+static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
|
||||
+{
|
||||
+ struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
|
||||
+ struct dentry *root_dentry = dentry->d_sb->s_root;
|
||||
+ struct path path;
|
||||
+ int err;
|
||||
+
|
||||
+ ovl_path_upper(root_dentry, &path);
|
||||
+
|
||||
+ err = vfs_statfs(&path, buf);
|
||||
+ if (!err) {
|
||||
+ buf->f_namelen = max(buf->f_namelen, ofs->lower_namelen);
|
||||
+ buf->f_type = OVERLAYFS_SUPER_MAGIC;
|
||||
+ }
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
static const struct super_operations ovl_super_operations = {
|
||||
.put_super = ovl_put_super,
|
||||
.remount_fs = ovl_remount_fs,
|
||||
+ .statfs = ovl_statfs,
|
||||
};
|
||||
|
||||
struct ovl_config {
|
||||
@@ -474,6 +505,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
struct ovl_entry *oe;
|
||||
struct ovl_fs *ufs;
|
||||
struct ovl_config config;
|
||||
+ struct kstatfs statfs;
|
||||
int err;
|
||||
|
||||
err = ovl_parse_opt((char *) data, &config);
|
||||
@@ -508,6 +540,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
!S_ISDIR(lowerpath.dentry->d_inode->i_mode))
|
||||
goto out_put_lowerpath;
|
||||
|
||||
+ err = vfs_statfs(&lowerpath, &statfs);
|
||||
+ if (err) {
|
||||
+ pr_err("overlayfs: statfs failed on lowerpath\n");
|
||||
+ goto out_put_lowerpath;
|
||||
+ }
|
||||
+ ufs->lower_namelen = statfs.f_namelen;
|
||||
+
|
||||
ufs->upper_mnt = clone_private_mount(&upperpath);
|
||||
err = PTR_ERR(ufs->upper_mnt);
|
||||
if (IS_ERR(ufs->upper_mnt)) {
|
||||
@@ -556,6 +595,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
root_dentry->d_fsdata = oe;
|
||||
root_dentry->d_op = &ovl_dentry_operations;
|
||||
|
||||
+ sb->s_magic = OVERLAYFS_SUPER_MAGIC;
|
||||
sb->s_op = &ovl_super_operations;
|
||||
sb->s_root = root_dentry;
|
||||
sb->s_fs_info = ufs;
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,155 +0,0 @@
|
||||
From 4ff99cccd67514e258c97d71593ba495e1b2a89f Mon Sep 17 00:00:00 2001
|
||||
From: Erez Zadok <ezk@fsl.cs.sunysb.edu>
|
||||
Date: Thu, 27 Jun 2013 16:39:50 +0200
|
||||
Subject: [PATCH 7/9] overlayfs: implement show_options
|
||||
|
||||
This is useful because of the stacking nature of overlayfs. Users like to
|
||||
find out (via /proc/mounts) which lower/upper directory were used at mount
|
||||
time.
|
||||
|
||||
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/overlayfs/super.c | 63 +++++++++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 43 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
|
||||
index a9970b5..066ea5a 100644
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/cred.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/statfs.h>
|
||||
+#include <linux/seq_file.h>
|
||||
#include "overlayfs.h"
|
||||
|
||||
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
|
||||
@@ -26,12 +27,21 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
#define OVERLAYFS_SUPER_MAGIC 0x794c764f
|
||||
|
||||
+struct ovl_config {
|
||||
+ char *lowerdir;
|
||||
+ char *upperdir;
|
||||
+};
|
||||
+
|
||||
+/* private information held for overlayfs's superblock */
|
||||
struct ovl_fs {
|
||||
struct vfsmount *upper_mnt;
|
||||
struct vfsmount *lower_mnt;
|
||||
long lower_namelen;
|
||||
+ /* pathnames of lower and upper dirs, for show_options */
|
||||
+ struct ovl_config config;
|
||||
};
|
||||
|
||||
+/* private information held for every overlayfs dentry */
|
||||
struct ovl_entry {
|
||||
/*
|
||||
* Keep "double reference" on upper dentries, so that
|
||||
@@ -388,6 +398,8 @@ static void ovl_put_super(struct super_block *sb)
|
||||
mntput(ufs->upper_mnt);
|
||||
mntput(ufs->lower_mnt);
|
||||
|
||||
+ kfree(ufs->config.lowerdir);
|
||||
+ kfree(ufs->config.upperdir);
|
||||
kfree(ufs);
|
||||
}
|
||||
|
||||
@@ -436,15 +448,27 @@ static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
|
||||
return err;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * ovl_show_options
|
||||
+ *
|
||||
+ * Prints the mount options for a given superblock.
|
||||
+ * Returns zero; does not fail.
|
||||
+ */
|
||||
+static int ovl_show_options(struct seq_file *m, struct dentry *dentry)
|
||||
+{
|
||||
+ struct super_block *sb = dentry->d_sb;
|
||||
+ struct ovl_fs *ufs = sb->s_fs_info;
|
||||
+
|
||||
+ seq_printf(m, ",lowerdir=%s", ufs->config.lowerdir);
|
||||
+ seq_printf(m, ",upperdir=%s", ufs->config.upperdir);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static const struct super_operations ovl_super_operations = {
|
||||
.put_super = ovl_put_super,
|
||||
.remount_fs = ovl_remount_fs,
|
||||
.statfs = ovl_statfs,
|
||||
-};
|
||||
-
|
||||
-struct ovl_config {
|
||||
- char *lowerdir;
|
||||
- char *upperdir;
|
||||
+ .show_options = ovl_show_options,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -504,34 +528,33 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
struct dentry *root_dentry;
|
||||
struct ovl_entry *oe;
|
||||
struct ovl_fs *ufs;
|
||||
- struct ovl_config config;
|
||||
struct kstatfs statfs;
|
||||
int err;
|
||||
|
||||
- err = ovl_parse_opt((char *) data, &config);
|
||||
- if (err)
|
||||
+ err = -ENOMEM;
|
||||
+ ufs = kmalloc(sizeof(struct ovl_fs), GFP_KERNEL);
|
||||
+ if (!ufs)
|
||||
goto out;
|
||||
|
||||
+ err = ovl_parse_opt((char *) data, &ufs->config);
|
||||
+ if (err)
|
||||
+ goto out_free_ufs;
|
||||
+
|
||||
err = -EINVAL;
|
||||
- if (!config.upperdir || !config.lowerdir) {
|
||||
+ if (!ufs->config.upperdir || !ufs->config.lowerdir) {
|
||||
pr_err("overlayfs: missing upperdir or lowerdir\n");
|
||||
goto out_free_config;
|
||||
}
|
||||
|
||||
- err = -ENOMEM;
|
||||
- ufs = kmalloc(sizeof(struct ovl_fs), GFP_KERNEL);
|
||||
- if (!ufs)
|
||||
- goto out_free_config;
|
||||
-
|
||||
oe = ovl_alloc_entry();
|
||||
if (oe == NULL)
|
||||
- goto out_free_ufs;
|
||||
+ goto out_free_config;
|
||||
|
||||
- err = kern_path(config.upperdir, LOOKUP_FOLLOW, &upperpath);
|
||||
+ err = kern_path(ufs->config.upperdir, LOOKUP_FOLLOW, &upperpath);
|
||||
if (err)
|
||||
goto out_free_oe;
|
||||
|
||||
- err = kern_path(config.lowerdir, LOOKUP_FOLLOW, &lowerpath);
|
||||
+ err = kern_path(ufs->config.lowerdir, LOOKUP_FOLLOW, &lowerpath);
|
||||
if (err)
|
||||
goto out_put_upperpath;
|
||||
|
||||
@@ -615,11 +638,11 @@ out_put_upperpath:
|
||||
path_put(&upperpath);
|
||||
out_free_oe:
|
||||
kfree(oe);
|
||||
+out_free_config:
|
||||
+ kfree(ufs->config.lowerdir);
|
||||
+ kfree(ufs->config.upperdir);
|
||||
out_free_ufs:
|
||||
kfree(ufs);
|
||||
-out_free_config:
|
||||
- kfree(config.lowerdir);
|
||||
- kfree(config.upperdir);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,240 +0,0 @@
|
||||
From 4484d918c1b719ae6ee3999c8173077eb7a7864e Mon Sep 17 00:00:00 2001
|
||||
From: Neil Brown <neilb@suse.de>
|
||||
Date: Thu, 27 Jun 2013 16:39:50 +0200
|
||||
Subject: [PATCH 8/9] overlay: overlay filesystem documentation
|
||||
|
||||
Document the overlay filesystem.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
Documentation/filesystems/overlayfs.txt | 199 ++++++++++++++++++++++++++++++++
|
||||
MAINTAINERS | 7 ++
|
||||
2 files changed, 206 insertions(+)
|
||||
create mode 100644 Documentation/filesystems/overlayfs.txt
|
||||
|
||||
diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt
|
||||
new file mode 100644
|
||||
index 0000000..00dbab0
|
||||
--- /dev/null
|
||||
+++ b/Documentation/filesystems/overlayfs.txt
|
||||
@@ -0,0 +1,199 @@
|
||||
+Written by: Neil Brown <neilb@suse.de>
|
||||
+
|
||||
+Overlay Filesystem
|
||||
+==================
|
||||
+
|
||||
+This document describes a prototype for a new approach to providing
|
||||
+overlay-filesystem functionality in Linux (sometimes referred to as
|
||||
+union-filesystems). An overlay-filesystem tries to present a
|
||||
+filesystem which is the result over overlaying one filesystem on top
|
||||
+of the other.
|
||||
+
|
||||
+The result will inevitably fail to look exactly like a normal
|
||||
+filesystem for various technical reasons. The expectation is that
|
||||
+many use cases will be able to ignore these differences.
|
||||
+
|
||||
+This approach is 'hybrid' because the objects that appear in the
|
||||
+filesystem do not all appear to belong to that filesystem. In many
|
||||
+cases an object accessed in the union will be indistinguishable
|
||||
+from accessing the corresponding object from the original filesystem.
|
||||
+This is most obvious from the 'st_dev' field returned by stat(2).
|
||||
+
|
||||
+While directories will report an st_dev from the overlay-filesystem,
|
||||
+all non-directory objects will report an st_dev from the lower or
|
||||
+upper filesystem that is providing the object. Similarly st_ino will
|
||||
+only be unique when combined with st_dev, and both of these can change
|
||||
+over the lifetime of a non-directory object. Many applications and
|
||||
+tools ignore these values and will not be affected.
|
||||
+
|
||||
+Upper and Lower
|
||||
+---------------
|
||||
+
|
||||
+An overlay filesystem combines two filesystems - an 'upper' filesystem
|
||||
+and a 'lower' filesystem. When a name exists in both filesystems, the
|
||||
+object in the 'upper' filesystem is visible while the object in the
|
||||
+'lower' filesystem is either hidden or, in the case of directories,
|
||||
+merged with the 'upper' object.
|
||||
+
|
||||
+It would be more correct to refer to an upper and lower 'directory
|
||||
+tree' rather than 'filesystem' as it is quite possible for both
|
||||
+directory trees to be in the same filesystem and there is no
|
||||
+requirement that the root of a filesystem be given for either upper or
|
||||
+lower.
|
||||
+
|
||||
+The lower filesystem can be any filesystem supported by Linux and does
|
||||
+not need to be writable. The lower filesystem can even be another
|
||||
+overlayfs. The upper filesystem will normally be writable and if it
|
||||
+is it must support the creation of trusted.* extended attributes, and
|
||||
+must provide valid d_type in readdir responses, at least for symbolic
|
||||
+links - so NFS is not suitable.
|
||||
+
|
||||
+A read-only overlay of two read-only filesystems may use any
|
||||
+filesystem type.
|
||||
+
|
||||
+Directories
|
||||
+-----------
|
||||
+
|
||||
+Overlaying mainly involves directories. If a given name appears in both
|
||||
+upper and lower filesystems and refers to a non-directory in either,
|
||||
+then the lower object is hidden - the name refers only to the upper
|
||||
+object.
|
||||
+
|
||||
+Where both upper and lower objects are directories, a merged directory
|
||||
+is formed.
|
||||
+
|
||||
+At mount time, the two directories given as mount options are combined
|
||||
+into a merged directory:
|
||||
+
|
||||
+ mount -t overlayfs overlayfs -olowerdir=/lower,upperdir=/upper /overlay
|
||||
+
|
||||
+Then whenever a lookup is requested in such a merged directory, the
|
||||
+lookup is performed in each actual directory and the combined result
|
||||
+is cached in the dentry belonging to the overlay filesystem. If both
|
||||
+actual lookups find directories, both are stored and a merged
|
||||
+directory is created, otherwise only one is stored: the upper if it
|
||||
+exists, else the lower.
|
||||
+
|
||||
+Only the lists of names from directories are merged. Other content
|
||||
+such as metadata and extended attributes are reported for the upper
|
||||
+directory only. These attributes of the lower directory are hidden.
|
||||
+
|
||||
+whiteouts and opaque directories
|
||||
+--------------------------------
|
||||
+
|
||||
+In order to support rm and rmdir without changing the lower
|
||||
+filesystem, an overlay filesystem needs to record in the upper filesystem
|
||||
+that files have been removed. This is done using whiteouts and opaque
|
||||
+directories (non-directories are always opaque).
|
||||
+
|
||||
+The overlay filesystem uses extended attributes with a
|
||||
+"trusted.overlay." prefix to record these details.
|
||||
+
|
||||
+A whiteout is created as a symbolic link with target
|
||||
+"(overlay-whiteout)" and with xattr "trusted.overlay.whiteout" set to "y".
|
||||
+When a whiteout is found in the upper level of a merged directory, any
|
||||
+matching name in the lower level is ignored, and the whiteout itself
|
||||
+is also hidden.
|
||||
+
|
||||
+A directory is made opaque by setting the xattr "trusted.overlay.opaque"
|
||||
+to "y". Where the upper filesystem contains an opaque directory, any
|
||||
+directory in the lower filesystem with the same name is ignored.
|
||||
+
|
||||
+readdir
|
||||
+-------
|
||||
+
|
||||
+When a 'readdir' request is made on a merged directory, the upper and
|
||||
+lower directories are each read and the name lists merged in the
|
||||
+obvious way (upper is read first, then lower - entries that already
|
||||
+exist are not re-added). This merged name list is cached in the
|
||||
+'struct file' and so remains as long as the file is kept open. If the
|
||||
+directory is opened and read by two processes at the same time, they
|
||||
+will each have separate caches. A seekdir to the start of the
|
||||
+directory (offset 0) followed by a readdir will cause the cache to be
|
||||
+discarded and rebuilt.
|
||||
+
|
||||
+This means that changes to the merged directory do not appear while a
|
||||
+directory is being read. This is unlikely to be noticed by many
|
||||
+programs.
|
||||
+
|
||||
+seek offsets are assigned sequentially when the directories are read.
|
||||
+Thus if
|
||||
+ - read part of a directory
|
||||
+ - remember an offset, and close the directory
|
||||
+ - re-open the directory some time later
|
||||
+ - seek to the remembered offset
|
||||
+
|
||||
+there may be little correlation between the old and new locations in
|
||||
+the list of filenames, particularly if anything has changed in the
|
||||
+directory.
|
||||
+
|
||||
+Readdir on directories that are not merged is simply handled by the
|
||||
+underlying directory (upper or lower).
|
||||
+
|
||||
+
|
||||
+Non-directories
|
||||
+---------------
|
||||
+
|
||||
+Objects that are not directories (files, symlinks, device-special
|
||||
+files etc.) are presented either from the upper or lower filesystem as
|
||||
+appropriate. When a file in the lower filesystem is accessed in a way
|
||||
+the requires write-access, such as opening for write access, changing
|
||||
+some metadata etc., the file is first copied from the lower filesystem
|
||||
+to the upper filesystem (copy_up). Note that creating a hard-link
|
||||
+also requires copy_up, though of course creation of a symlink does
|
||||
+not.
|
||||
+
|
||||
+The copy_up may turn out to be unnecessary, for example if the file is
|
||||
+opened for read-write but the data is not modified.
|
||||
+
|
||||
+The copy_up process first makes sure that the containing directory
|
||||
+exists in the upper filesystem - creating it and any parents as
|
||||
+necessary. It then creates the object with the same metadata (owner,
|
||||
+mode, mtime, symlink-target etc.) and then if the object is a file, the
|
||||
+data is copied from the lower to the upper filesystem. Finally any
|
||||
+extended attributes are copied up.
|
||||
+
|
||||
+Once the copy_up is complete, the overlay filesystem simply
|
||||
+provides direct access to the newly created file in the upper
|
||||
+filesystem - future operations on the file are barely noticed by the
|
||||
+overlay filesystem (though an operation on the name of the file such as
|
||||
+rename or unlink will of course be noticed and handled).
|
||||
+
|
||||
+
|
||||
+Non-standard behavior
|
||||
+---------------------
|
||||
+
|
||||
+The copy_up operation essentially creates a new, identical file and
|
||||
+moves it over to the old name. The new file may be on a different
|
||||
+filesystem, so both st_dev and st_ino of the file may change.
|
||||
+
|
||||
+Any open files referring to this inode will access the old data and
|
||||
+metadata. Similarly any file locks obtained before copy_up will not
|
||||
+apply to the copied up file.
|
||||
+
|
||||
+On a file opened with O_RDONLY fchmod(2), fchown(2), futimesat(2) and
|
||||
+fsetxattr(2) will fail with EROFS.
|
||||
+
|
||||
+If a file with multiple hard links is copied up, then this will
|
||||
+"break" the link. Changes will not be propagated to other names
|
||||
+referring to the same inode.
|
||||
+
|
||||
+Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory
|
||||
+object in overlayfs will not contain valid absolute paths, only
|
||||
+relative paths leading up to the filesystem's root. This will be
|
||||
+fixed in the future.
|
||||
+
|
||||
+Some operations are not atomic, for example a crash during copy_up or
|
||||
+rename will leave the filesystem in an inconsistent state. This will
|
||||
+be addressed in the future.
|
||||
+
|
||||
+Changes to underlying filesystems
|
||||
+---------------------------------
|
||||
+
|
||||
+Offline changes, when the overlay is not mounted, are allowed to either
|
||||
+the upper or the lower trees.
|
||||
+
|
||||
+Changes to the underlying filesystems while part of a mounted overlay
|
||||
+filesystem are not allowed. If the underlying filesystem is changed,
|
||||
+the behavior of the overlay is undefined, though it will not result in
|
||||
+a crash or deadlock.
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 5be702c..8911997 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -6019,6 +6019,13 @@ F: drivers/scsi/osd/
|
||||
F: include/scsi/osd_*
|
||||
F: fs/exofs/
|
||||
|
||||
+OVERLAYFS FILESYSTEM
|
||||
+M: Miklos Szeredi <miklos@szeredi.hu>
|
||||
+L: linux-fsdevel@vger.kernel.org
|
||||
+S: Supported
|
||||
+F: fs/overlayfs/*
|
||||
+F: Documentation/filesystems/overlayfs.txt
|
||||
+
|
||||
P54 WIRELESS DRIVER
|
||||
M: Christian Lamparter <chunkeey@googlemail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 094e2fc56d5a0dd9d5c579e08bd4df3013bb171a Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@suse.cz>
|
||||
Date: Thu, 27 Jun 2013 16:39:50 +0200
|
||||
Subject: [PATCH 9/9] fs: limit filesystem stacking depth
|
||||
|
||||
Add a simple read-only counter to super_block that indicates deep this
|
||||
is in the stack of filesystems. Previously ecryptfs was the only
|
||||
stackable filesystem and it explicitly disallowed multiple layers of
|
||||
itself.
|
||||
|
||||
Overlayfs, however, can be stacked recursively and also may be stacked
|
||||
on top of ecryptfs or vice versa.
|
||||
|
||||
To limit the kernel stack usage we must limit the depth of the
|
||||
filesystem stack. Initially the limit is set to 2.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/ecryptfs/main.c | 7 +++++++
|
||||
fs/overlayfs/super.c | 10 ++++++++++
|
||||
include/linux/fs.h | 11 +++++++++++
|
||||
3 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
|
||||
index e924cf4..8b0957e 100644
|
||||
--- a/fs/ecryptfs/main.c
|
||||
+++ b/fs/ecryptfs/main.c
|
||||
@@ -567,6 +567,13 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
|
||||
s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
|
||||
s->s_blocksize = path.dentry->d_sb->s_blocksize;
|
||||
s->s_magic = ECRYPTFS_SUPER_MAGIC;
|
||||
+ s->s_stack_depth = path.dentry->d_sb->s_stack_depth + 1;
|
||||
+
|
||||
+ rc = -EINVAL;
|
||||
+ if (s->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
|
||||
+ pr_err("eCryptfs: maximum fs stacking depth exceeded\n");
|
||||
+ goto out_free;
|
||||
+ }
|
||||
|
||||
inode = ecryptfs_get_inode(path.dentry->d_inode, s);
|
||||
rc = PTR_ERR(inode);
|
||||
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
|
||||
index 066ea5a..9473e79 100644
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -570,6 +570,16 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
}
|
||||
ufs->lower_namelen = statfs.f_namelen;
|
||||
|
||||
+ sb->s_stack_depth = max(upperpath.mnt->mnt_sb->s_stack_depth,
|
||||
+ lowerpath.mnt->mnt_sb->s_stack_depth) + 1;
|
||||
+
|
||||
+ err = -EINVAL;
|
||||
+ if (sb->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
|
||||
+ pr_err("overlayfs: maximum fs stacking depth exceeded\n");
|
||||
+ goto out_put_lowerpath;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
ufs->upper_mnt = clone_private_mount(&upperpath);
|
||||
err = PTR_ERR(ufs->upper_mnt);
|
||||
if (IS_ERR(ufs->upper_mnt)) {
|
||||
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
||||
index 8a6752b..72d04f8 100644
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -244,6 +244,12 @@ struct iattr {
|
||||
*/
|
||||
#include <linux/quota.h>
|
||||
|
||||
+/*
|
||||
+ * Maximum number of layers of fs stack. Needs to be limited to
|
||||
+ * prevent kernel stack overflow
|
||||
+ */
|
||||
+#define FILESYSTEM_MAX_STACK_DEPTH 2
|
||||
+
|
||||
/**
|
||||
* enum positive_aop_returns - aop return codes with specific semantics
|
||||
*
|
||||
@@ -1322,6 +1328,11 @@ struct super_block {
|
||||
|
||||
/* Being remounted read-only */
|
||||
int s_readonly_remount;
|
||||
+
|
||||
+ /*
|
||||
+ * Indicates how deep in a filesystem stack this SB is
|
||||
+ */
|
||||
+ int s_stack_depth;
|
||||
};
|
||||
|
||||
/* superblock cache pruning functions */
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,44 +0,0 @@
|
||||
diff -Nru kernel-2.6.33mamba.orig//include/linux/decompress/unlzo_mm.h kernel-2.6.33mamba/include/linux/decompress/unlzo_mm.h
|
||||
--- kernel-2.6.33mamba.orig//include/linux/decompress/unlzo_mm.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ kernel-2.6.33mamba/include/linux/decompress/unlzo_mm.h 2010-07-03 20:40:21.186641845 +0200
|
||||
@@ -0,0 +1,20 @@
|
||||
+#ifndef UNLZO_MM_H
|
||||
+#define UNLZO_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZO_NEEDED)
|
||||
+
|
||||
+/* Make it available to non initramfs/initrd code */
|
||||
+#define INIT
|
||||
+#include <linux/module.h>
|
||||
+#else
|
||||
+
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff -Nru kernel-2.6.33mamba.orig//lib/decompress_unlzo.c kernel-2.6.33mamba/lib/decompress_unlzo.c
|
||||
--- kernel-2.6.33mamba.orig//lib/decompress_unlzo.c 2010-02-24 19:52:17.000000000 +0100
|
||||
+++ kernel-2.6.33mamba/lib/decompress_unlzo.c 2010-07-03 20:40:29.169641772 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/lzo.h>
|
||||
+#include <linux/decompress/unlzo_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#include <linux/compiler.h>
|
||||
@@ -87,7 +88,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
-STATIC inline int INIT unlzo(u8 *input, int in_len,
|
||||
+STATIC int INIT unlzo(u8 *input, int in_len,
|
||||
int (*fill) (void *, unsigned int),
|
||||
int (*flush) (void *, unsigned int),
|
||||
u8 *output, int *posp,
|
@ -1,219 +0,0 @@
|
||||
From f49e1efdd179d54e814ff2a8e8f469496583062c Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Tue, 20 Oct 2009 10:54:36 +0100
|
||||
Subject: [PATCH] Squashfs: add LZMA compression
|
||||
|
||||
Add support for LZMA compressed filesystems. This is an initial
|
||||
implementation.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 5 ++
|
||||
fs/squashfs/Makefile | 1 +
|
||||
fs/squashfs/decompressor.c | 4 +
|
||||
fs/squashfs/lzma_wrapper.c | 151 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
fs/squashfs/squashfs.h | 3 +
|
||||
5 files changed, 164 insertions(+), 0 deletions(-)
|
||||
create mode 100644 fs/squashfs/lzma_wrapper.c
|
||||
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -26,6 +26,11 @@ config SQUASHFS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config SQUASHFS_LZMA
|
||||
+ bool "Include support for LZMA compressed file systems"
|
||||
+ depends on SQUASHFS
|
||||
+ select DECOMPRESS_LZMA
|
||||
+
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
bool "Additional option for memory-constrained systems"
|
||||
--- a/fs/squashfs/Makefile
|
||||
+++ b/fs/squashfs/Makefile
|
||||
@@ -5,5 +5,5 @@
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
||||
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
|
||||
-squashfs-$(CONFIG_SQUASHFS_XATTRS) += xattr.o xattr_id.o
|
||||
+squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o
|
||||
|
||||
--- a/fs/squashfs/decompressor.c
|
||||
+++ b/fs/squashfs/decompressor.c
|
||||
@@ -50,7 +50,11 @@ static const struct squashfs_decompresso
|
||||
|
||||
static const struct squashfs_decompressor *decompressor[] = {
|
||||
&squashfs_zlib_comp_ops,
|
||||
+#ifdef CONFIG_SQUASHFS_LZMA
|
||||
+ &squashfs_lzma_comp_ops,
|
||||
+#else
|
||||
&squashfs_lzma_unsupported_comp_ops,
|
||||
+#endif
|
||||
&squashfs_lzo_unsupported_comp_ops,
|
||||
&squashfs_unknown_comp_ops
|
||||
};
|
||||
--- /dev/null
|
||||
+++ b/fs/squashfs/lzma_wrapper.c
|
||||
@@ -0,0 +1,152 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
+ *
|
||||
+ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
+ * Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version 2,
|
||||
+ * or (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+ *
|
||||
+ * lzma_wrapper.c
|
||||
+ */
|
||||
+
|
||||
+#include <asm/unaligned.h>
|
||||
+#include <linux/buffer_head.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
+#include <linux/decompress/unlzma.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#include "squashfs_fs.h"
|
||||
+#include "squashfs_fs_sb.h"
|
||||
+#include "squashfs_fs_i.h"
|
||||
+#include "squashfs.h"
|
||||
+#include "decompressor.h"
|
||||
+
|
||||
+struct squashfs_lzma {
|
||||
+ void *input;
|
||||
+ void *output;
|
||||
+};
|
||||
+
|
||||
+/* decompress_unlzma.c is currently non re-entrant... */
|
||||
+DEFINE_MUTEX(lzma_mutex);
|
||||
+
|
||||
+/* decompress_unlzma.c doesn't provide any context in its callbacks... */
|
||||
+static int lzma_error;
|
||||
+
|
||||
+static void error(char *m)
|
||||
+{
|
||||
+ ERROR("unlzma error: %s\n", m);
|
||||
+ lzma_error = 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void *lzma_init(struct squashfs_sb_info *msblk)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = kzalloc(sizeof(*stream), GFP_KERNEL);
|
||||
+ if (stream == NULL)
|
||||
+ goto failed;
|
||||
+ stream->input = vmalloc(msblk->block_size);
|
||||
+ if (stream->input == NULL)
|
||||
+ goto failed;
|
||||
+ stream->output = vmalloc(msblk->block_size);
|
||||
+ if (stream->output == NULL)
|
||||
+ goto failed2;
|
||||
+
|
||||
+ return stream;
|
||||
+
|
||||
+failed2:
|
||||
+ vfree(stream->input);
|
||||
+failed:
|
||||
+ ERROR("failed to allocate lzma workspace\n");
|
||||
+ kfree(stream);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void lzma_free(void *strm)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = strm;
|
||||
+
|
||||
+ if (stream) {
|
||||
+ vfree(stream->input);
|
||||
+ vfree(stream->output);
|
||||
+ }
|
||||
+ kfree(stream);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int lzma_uncompress(struct squashfs_sb_info *msblk, void **buffer,
|
||||
+ struct buffer_head **bh, int b, int offset, int length, int srclength,
|
||||
+ int pages)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = msblk->stream;
|
||||
+ void *buff = stream->input;
|
||||
+ int avail, i, bytes = length, res;
|
||||
+
|
||||
+ mutex_lock(&lzma_mutex);
|
||||
+
|
||||
+ for (i = 0; i < b; i++) {
|
||||
+ wait_on_buffer(bh[i]);
|
||||
+ if (!buffer_uptodate(bh[i]))
|
||||
+ goto block_release;
|
||||
+
|
||||
+ avail = min(bytes, msblk->devblksize - offset);
|
||||
+ memcpy(buff, bh[i]->b_data + offset, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ offset = 0;
|
||||
+ put_bh(bh[i]);
|
||||
+ }
|
||||
+
|
||||
+ lzma_error = 0;
|
||||
+ res = unlzma(stream->input, length, NULL, NULL, stream->output, NULL,
|
||||
+ error);
|
||||
+ if (res || lzma_error)
|
||||
+ goto failed;
|
||||
+
|
||||
+ /* uncompressed size is stored in the LZMA header (5 byte offset) */
|
||||
+ res = bytes = get_unaligned_le32(stream->input + 5);
|
||||
+ for (i = 0, buff = stream->output; bytes && i < pages; i++) {
|
||||
+ avail = min_t(int, bytes, PAGE_CACHE_SIZE);
|
||||
+ memcpy(buffer[i], buff, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ }
|
||||
+ if (bytes)
|
||||
+ goto failed;
|
||||
+
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+ return res;
|
||||
+
|
||||
+block_release:
|
||||
+ for (; i < b; i++)
|
||||
+ put_bh(bh[i]);
|
||||
+
|
||||
+failed:
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+
|
||||
+ ERROR("lzma decompression failed, data probably corrupt\n");
|
||||
+ return -EIO;
|
||||
+}
|
||||
+
|
||||
+const struct squashfs_decompressor squashfs_lzma_comp_ops = {
|
||||
+ .init = lzma_init,
|
||||
+ .free = lzma_free,
|
||||
+ .decompress = lzma_uncompress,
|
||||
+ .id = LZMA_COMPRESSION,
|
||||
+ .name = "lzma",
|
||||
+ .supported = 1
|
||||
+};
|
||||
+
|
||||
--- a/fs/squashfs/squashfs.h
|
||||
+++ b/fs/squashfs/squashfs.h
|
||||
@@ -94,3 +94,6 @@ extern const struct address_space_operat
|
||||
|
||||
/* zlib_wrapper.c */
|
||||
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
|
||||
+
|
||||
+/* lzma wrapper.c */
|
||||
+extern const struct squashfs_decompressor squashfs_lzma_comp_ops;
|
@ -1,165 +0,0 @@
|
||||
From fdf23ed283bc6ef5c25076ce2065f892120ff556 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Thu, 22 Oct 2009 04:57:38 +0100
|
||||
Subject: [PATCH] Squashfs: Make unlzma available to non initramfs/initrd code
|
||||
|
||||
Add a config option DECOMPRESS_LZMA_NEEDED which allows subsystems to
|
||||
specify they need the unlzma code. Normally decompress_unlzma.c is
|
||||
compiled with __init and unlzma is not exported to modules.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 1 +
|
||||
include/linux/decompress/bunzip2_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/inflate_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/mm.h | 3 ---
|
||||
include/linux/decompress/unlzma_mm.h | 20 ++++++++++++++++++++
|
||||
lib/Kconfig | 3 +++
|
||||
lib/decompress_bunzip2.c | 1 +
|
||||
lib/decompress_inflate.c | 1 +
|
||||
lib/decompress_unlzma.c | 5 ++++-
|
||||
9 files changed, 54 insertions(+), 4 deletions(-)
|
||||
create mode 100644 include/linux/decompress/bunzip2_mm.h
|
||||
create mode 100644 include/linux/decompress/inflate_mm.h
|
||||
create mode 100644 include/linux/decompress/unlzma_mm.h
|
||||
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -30,6 +30,7 @@ config SQUASHFS_LZMA
|
||||
bool "Include support for LZMA compressed file systems"
|
||||
depends on SQUASHFS
|
||||
select DECOMPRESS_LZMA
|
||||
+ select DECOMPRESS_LZMA_NEEDED
|
||||
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/bunzip2_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef BUNZIP2_MM_H
|
||||
+#define BUNZIP2_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/inflate_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef INFLATE_MM_H
|
||||
+#define INFLATE_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- a/include/linux/decompress/mm.h
|
||||
+++ b/include/linux/decompress/mm.h
|
||||
@@ -63,8 +63,6 @@ static void free(void *where)
|
||||
|
||||
#define set_error_fn(x)
|
||||
|
||||
-#define INIT
|
||||
-
|
||||
#else /* STATIC */
|
||||
|
||||
/* Code active when compiled standalone for use when loading ramdisk: */
|
||||
@@ -87,7 +85,6 @@ static void free(void *where)
|
||||
static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
-#define INIT __init
|
||||
#define STATIC
|
||||
|
||||
#include <linux/init.h>
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/unlzma_mm.h
|
||||
@@ -0,0 +1,20 @@
|
||||
+#ifndef UNLZMA_MM_H
|
||||
+#define UNLZMA_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
|
||||
+
|
||||
+/* Make it available to non initramfs/initrd code */
|
||||
+#define INIT
|
||||
+#include <linux/module.h>
|
||||
+#else
|
||||
+
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -121,6 +121,9 @@ config DECOMPRESS_LZO
|
||||
select LZO_DECOMPRESS
|
||||
tristate
|
||||
|
||||
+config DECOMPRESS_LZMA_NEEDED
|
||||
+ boolean
|
||||
+
|
||||
#
|
||||
# Generic allocator support is selected if needed
|
||||
#
|
||||
--- a/lib/decompress_bunzip2.c
|
||||
+++ b/lib/decompress_bunzip2.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/bunzip2_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#ifndef INT_MAX
|
||||
--- a/lib/decompress_inflate.c
|
||||
+++ b/lib/decompress_inflate.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/inflate_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define GZIP_IOBUF_SIZE (16*1024)
|
||||
--- a/lib/decompress_unlzma.c
|
||||
+++ b/lib/decompress_unlzma.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/unlzma_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
@@ -531,7 +532,7 @@ static inline void INIT process_bit1(str
|
||||
|
||||
|
||||
|
||||
-STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
|
||||
+STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
@@ -664,4 +665,6 @@ STATIC int INIT decompress(unsigned char
|
||||
{
|
||||
return unlzma(buf, in_len - 4, fill, flush, output, posp, error_fn);
|
||||
}
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
|
||||
+EXPORT_SYMBOL(unlzma);
|
||||
#endif
|
@ -1,249 +0,0 @@
|
||||
--- a/fs/squashfs/decompressor.c
|
||||
+++ b/fs/squashfs/decompressor.c
|
||||
@@ -40,11 +40,9 @@ static const struct squashfs_decompresso
|
||||
NULL, NULL, NULL, LZMA_COMPRESSION, "lzma", 0
|
||||
};
|
||||
|
||||
-#ifndef CONFIG_SQUASHFS_LZO
|
||||
static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
|
||||
NULL, NULL, NULL, LZO_COMPRESSION, "lzo", 0
|
||||
};
|
||||
-#endif
|
||||
|
||||
static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
|
||||
NULL, NULL, NULL, 0, "unknown", 0
|
||||
@@ -53,11 +51,7 @@ static const struct squashfs_decompresso
|
||||
static const struct squashfs_decompressor *decompressor[] = {
|
||||
&squashfs_zlib_comp_ops,
|
||||
&squashfs_lzma_unsupported_comp_ops,
|
||||
-#ifdef CONFIG_SQUASHFS_LZO
|
||||
- &squashfs_lzo_comp_ops,
|
||||
-#else
|
||||
&squashfs_lzo_unsupported_comp_ops,
|
||||
-#endif
|
||||
&squashfs_unknown_comp_ops
|
||||
};
|
||||
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -5,13 +5,13 @@ config SQUASHFS
|
||||
help
|
||||
Saying Y here includes support for SquashFS 4.0 (a Compressed
|
||||
Read-Only File System). Squashfs is a highly compressed read-only
|
||||
- filesystem for Linux. It uses zlib/lzo compression to compress both
|
||||
+ filesystem for Linux. It uses zlib compression to compress both
|
||||
files, inodes and directories. Inodes in the system are very small
|
||||
and all blocks are packed to minimise data overhead. Block sizes
|
||||
greater than 4K are supported up to a maximum of 1 Mbytes (default
|
||||
block size 128K). SquashFS 4.0 supports 64 bit filesystems and files
|
||||
(larger than 4GB), full uid/gid information, hard links and
|
||||
- timestamps.
|
||||
+ timestamps.
|
||||
|
||||
Squashfs is intended for general read-only filesystem use, for
|
||||
archival use (i.e. in cases where a .tar.gz file may be used), and in
|
||||
@@ -26,7 +26,7 @@ config SQUASHFS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
-config SQUASHFS_XATTR
|
||||
+config SQUASHFS_XATTRS
|
||||
bool "Squashfs XATTR support"
|
||||
depends on SQUASHFS
|
||||
default n
|
||||
@@ -37,24 +37,9 @@ config SQUASHFS_XATTR
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
-config SQUASHFS_LZO
|
||||
- bool "Include support for LZO compressed file systems"
|
||||
- depends on SQUASHFS
|
||||
- default n
|
||||
- select LZO_DECOMPRESS
|
||||
- help
|
||||
- Saying Y here includes support for reading Squashfs file systems
|
||||
- compressed with LZO compresssion. LZO compression is mainly
|
||||
- aimed at embedded systems with slower CPUs where the overheads
|
||||
- of zlib are too high.
|
||||
-
|
||||
- LZO is not the standard compression used in Squashfs and so most
|
||||
- file systems will be readable without selecting this option.
|
||||
-
|
||||
- If unsure, say N.
|
||||
-
|
||||
config SQUASHFS_EMBEDDED
|
||||
- bool "Additional option for memory-constrained systems"
|
||||
+
|
||||
+ bool "Additional option for memory-constrained systems"
|
||||
depends on SQUASHFS
|
||||
default n
|
||||
help
|
||||
--- a/fs/squashfs/lzo_wrapper.c
|
||||
+++ /dev/null
|
||||
@@ -1,136 +0,0 @@
|
||||
-/*
|
||||
- * Squashfs - a compressed read only filesystem for Linux
|
||||
- *
|
||||
- * Copyright (c) 2010 LG Electronics
|
||||
- * Chan Jeong <chan.jeong@lge.com>
|
||||
- *
|
||||
- * This program is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU General Public License
|
||||
- * as published by the Free Software Foundation; either version 2,
|
||||
- * or (at your option) any later version.
|
||||
- *
|
||||
- * This program is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License
|
||||
- * along with this program; if not, write to the Free Software
|
||||
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
- *
|
||||
- * lzo_wrapper.c
|
||||
- */
|
||||
-
|
||||
-#include <linux/mutex.h>
|
||||
-#include <linux/buffer_head.h>
|
||||
-#include <linux/slab.h>
|
||||
-#include <linux/vmalloc.h>
|
||||
-#include <linux/lzo.h>
|
||||
-
|
||||
-#include "squashfs_fs.h"
|
||||
-#include "squashfs_fs_sb.h"
|
||||
-#include "squashfs_fs_i.h"
|
||||
-#include "squashfs.h"
|
||||
-#include "decompressor.h"
|
||||
-
|
||||
-struct squashfs_lzo {
|
||||
- void *input;
|
||||
- void *output;
|
||||
-};
|
||||
-
|
||||
-static void *lzo_init(struct squashfs_sb_info *msblk)
|
||||
-{
|
||||
- int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE);
|
||||
-
|
||||
- struct squashfs_lzo *stream = kzalloc(sizeof(*stream), GFP_KERNEL);
|
||||
- if (stream == NULL)
|
||||
- goto failed;
|
||||
- stream->input = vmalloc(block_size);
|
||||
- if (stream->input == NULL)
|
||||
- goto failed;
|
||||
- stream->output = vmalloc(block_size);
|
||||
- if (stream->output == NULL)
|
||||
- goto failed2;
|
||||
-
|
||||
- return stream;
|
||||
-
|
||||
-failed2:
|
||||
- vfree(stream->input);
|
||||
-failed:
|
||||
- ERROR("Failed to allocate lzo workspace\n");
|
||||
- kfree(stream);
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void lzo_free(void *strm)
|
||||
-{
|
||||
- struct squashfs_lzo *stream = strm;
|
||||
-
|
||||
- if (stream) {
|
||||
- vfree(stream->input);
|
||||
- vfree(stream->output);
|
||||
- }
|
||||
- kfree(stream);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int lzo_uncompress(struct squashfs_sb_info *msblk, void **buffer,
|
||||
- struct buffer_head **bh, int b, int offset, int length, int srclength,
|
||||
- int pages)
|
||||
-{
|
||||
- struct squashfs_lzo *stream = msblk->stream;
|
||||
- void *buff = stream->input;
|
||||
- int avail, i, bytes = length, res;
|
||||
- size_t out_len = srclength;
|
||||
-
|
||||
- mutex_lock(&msblk->read_data_mutex);
|
||||
-
|
||||
- for (i = 0; i < b; i++) {
|
||||
- wait_on_buffer(bh[i]);
|
||||
- if (!buffer_uptodate(bh[i]))
|
||||
- goto block_release;
|
||||
-
|
||||
- avail = min(bytes, msblk->devblksize - offset);
|
||||
- memcpy(buff, bh[i]->b_data + offset, avail);
|
||||
- buff += avail;
|
||||
- bytes -= avail;
|
||||
- offset = 0;
|
||||
- put_bh(bh[i]);
|
||||
- }
|
||||
-
|
||||
- res = lzo1x_decompress_safe(stream->input, (size_t)length,
|
||||
- stream->output, &out_len);
|
||||
- if (res != LZO_E_OK)
|
||||
- goto failed;
|
||||
-
|
||||
- res = bytes = (int)out_len;
|
||||
- for (i = 0, buff = stream->output; bytes && i < pages; i++) {
|
||||
- avail = min_t(int, bytes, PAGE_CACHE_SIZE);
|
||||
- memcpy(buffer[i], buff, avail);
|
||||
- buff += avail;
|
||||
- bytes -= avail;
|
||||
- }
|
||||
-
|
||||
- mutex_unlock(&msblk->read_data_mutex);
|
||||
- return res;
|
||||
-
|
||||
-block_release:
|
||||
- for (; i < b; i++)
|
||||
- put_bh(bh[i]);
|
||||
-
|
||||
-failed:
|
||||
- mutex_unlock(&msblk->read_data_mutex);
|
||||
-
|
||||
- ERROR("lzo decompression failed, data probably corrupt\n");
|
||||
- return -EIO;
|
||||
-}
|
||||
-
|
||||
-const struct squashfs_decompressor squashfs_lzo_comp_ops = {
|
||||
- .init = lzo_init,
|
||||
- .free = lzo_free,
|
||||
- .decompress = lzo_uncompress,
|
||||
- .id = LZO_COMPRESSION,
|
||||
- .name = "lzo",
|
||||
- .supported = 1
|
||||
-};
|
||||
--- a/fs/squashfs/Makefile
|
||||
+++ b/fs/squashfs/Makefile
|
||||
@@ -5,5 +5,5 @@
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
||||
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
|
||||
-squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
|
||||
-squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
|
||||
+squashfs-$(CONFIG_SQUASHFS_XATTRS) += xattr.o xattr_id.o
|
||||
+
|
||||
--- a/fs/squashfs/squashfs.h
|
||||
+++ b/fs/squashfs/squashfs.h
|
||||
@@ -104,6 +104,3 @@ extern const struct xattr_handler *squas
|
||||
|
||||
/* zlib_wrapper.c */
|
||||
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
|
||||
-
|
||||
-/* lzo_wrapper.c */
|
||||
-extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
|
||||
--- a/fs/squashfs/xattr.h
|
||||
+++ b/fs/squashfs/xattr.h
|
||||
@@ -21,7 +21,7 @@
|
||||
* xattr.h
|
||||
*/
|
||||
|
||||
-#ifdef CONFIG_SQUASHFS_XATTR
|
||||
+#ifdef CONFIG_SQUASHFS_XATTRS
|
||||
extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
|
||||
u64 *, int *);
|
||||
extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6411
kernel-3.14-mamba-arm-dove-config
Normal file
6411
kernel-3.14-mamba-arm-dove-config
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
310
kernel.spec
310
kernel.spec
@ -21,7 +21,7 @@
|
||||
|
||||
# Don't parametrize this, it's a check to avoid build a kernel without having
|
||||
# edited the obsoletes needed for multiple kernel support
|
||||
%define KERNEL_OBSOLETES_ARE_FOR_VERSION 3.10.38
|
||||
%define KERNEL_OBSOLETES_ARE_FOR_VERSION 3.14.5
|
||||
|
||||
#% define kernel_longterm 1
|
||||
%define kernel_ver %(echo %version | cut -d. -f1-2)
|
||||
@ -56,7 +56,12 @@
|
||||
%endif
|
||||
|
||||
%if "%{_target_cpu}" == "arm"
|
||||
%define KIMAGE arch/arm/boot/zImage
|
||||
%if "%{KERNEL_TARGET}" == "mamba-arm-dove"
|
||||
%define KIMAGE arch/arm/boot/uImage
|
||||
%define KIMAGE_DEST uImage
|
||||
%else
|
||||
%define KIMAGE arch/arm/boot/zImage
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if "%{_target_cpu}" == "x86_64"
|
||||
@ -76,7 +81,7 @@
|
||||
%define _use_internal_dependency_generator 1
|
||||
|
||||
Name: kernel
|
||||
Version: 3.10.38
|
||||
Version: 3.14.5
|
||||
Release: 1mamba
|
||||
Summary: The Linux Kernel, the operating system core itself
|
||||
Group: System/Kernel and Hardware
|
||||
@ -98,11 +103,12 @@ Source11: %{name}-%{kernel_ver}-mamba-i586-config
|
||||
Source12: %{name}-%{kernel_ver}-mamba-x86_64-config
|
||||
Source13: %{name}-%{kernel_ver}-mamba-64GB-i586-config
|
||||
Source14: %{name}-%{kernel_ver}-mamba-xen-x86_64-config
|
||||
Source15: %{name}-%{kernel_ver}.6-mamba-arm-config
|
||||
Source16: %{name}-%{kernel_ver}.5-mamba-64GB-rt-i586-config
|
||||
Source17: %{name}-%{kernel_ver}.5-mamba-rt-i586-config
|
||||
Source15: %{name}-%{kernel_ver}-mamba-arm-config
|
||||
Source16: %{name}-%{kernel_ver}-mamba-64GB-rt-i586-config
|
||||
Source17: %{name}-%{kernel_ver}-mamba-rt-i586-config
|
||||
Source18: %{name}-%{kernel_ver}-mamba-arm-kirkwood-config
|
||||
Source19: %{name}-%{kernel_ver}-mamba-x86_64-rt-config
|
||||
Source20: %{name}-%{kernel_ver}-mamba-arm-dove-config
|
||||
Patch0: kernel-2.6.35-430-scsi_header_fix.patch
|
||||
# Ingo Molnar's RT patch
|
||||
Patch1: http://www.kernel.org/pub/linux/kernel/projects/rt/%{maj_rt_ver}/patch-%{rt_ver}.patch.xz
|
||||
@ -125,17 +131,6 @@ Patch37: kernel-2.6.30-wmi_fix.patch
|
||||
#Patch38: http://gentoo-xen-kernel.googlecode.com/files/xen-patches-%{kernel_ver}-%{xen_patchver}.tar.bz2
|
||||
Patch39: kernel-3.2.1-rtl8139too.patch
|
||||
Patch40: %{name}-2.6.33-lzo_decompressor_fix.patch
|
||||
# SquashFS with LZMA patches from
|
||||
# https://dev.openwrt.org/browser/trunk/target/linux/generic-2.6/patches-2.6.35?rev=21696
|
||||
#Patch41: %{name}-2.6.33-001-squashfs_move_zlib_decomp.patch
|
||||
#Patch42: %{name}-2.6.33-002-squashfs_factor_out_remaining_zlib.patch
|
||||
#Patch43: %{name}-2.6.33-003-squashfs_add_decompressor_framework.patch
|
||||
#Patch44: %{name}-2.6.33-004-squashfs_add_decompressor_lzma_lzo.patch
|
||||
#Patch45: %{name}-2.6.33-005-squashfs_extra_parameter.patch
|
||||
Patch45: %{name}-2.6.37-005-squashfs_revert_to_2.6.35.patch
|
||||
Patch46: %{name}-2.6.35-006-squashfs_add_lzma.patch
|
||||
Patch47: %{name}-2.6.35-007-squashfs_make_lzma_available.patch
|
||||
Patch48: %{name}-2.6.33.5-squashfs-fixes.patch
|
||||
#Patch50: %{name}-2.6.33-arm-copypage-gcc4.patch
|
||||
#Patch51: %{name}-2.6.33-mcp52xx_gpt_fix_build.patch
|
||||
Patch52: %{name}-2.6.33.7-make-3.82.patch
|
||||
@ -161,19 +156,19 @@ Patch72: kernel-3.4.24-ACPI_do_not_use_Lid_and_Sleep_button_for_S5_wakeup.
|
||||
Patch73: kernel-3.8.3-arm-exynosdrm-buildfix.patch
|
||||
Patch74: kernel-3.8.3-arm-imx-drm-buildfix.patch
|
||||
Patch75: kernel-3.10.2-arm-mtd_omap2_allow_building_as_a_module.patch
|
||||
# https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.7/100-overlayfs.patch?order=name
|
||||
#Patch100: kernel-3.7.1-overlayfs.patch
|
||||
# https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/100-overlayfs.patch?order=name
|
||||
Patch100: kernel-3.14.2-overlayfs.patch
|
||||
## overlayfs: get the 12 patches above Linux 3.6 tag from:
|
||||
## http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=shortlog;h=refs/heads/overlayfs.v14
|
||||
Patch100: 0001-vfs-add-i_op-dentry_open.patch
|
||||
Patch101: 0002-vfs-export-do_splice_direct-to-modules.patch
|
||||
Patch102: 0003-vfs-export-__inode_permission-to-modules.patch
|
||||
Patch103: 0004-vfs-introduce-clone_private_mount.patch
|
||||
Patch104: 0005-overlay-filesystem.patch
|
||||
Patch105: 0006-overlayfs-add-statfs-support.patch
|
||||
Patch106: 0007-overlayfs-implement-show_options.patch
|
||||
Patch107: 0008-overlay-overlay-filesystem-documentation.patch
|
||||
Patch108: 0009-fs-limit-filesystem-stacking-depth.patch
|
||||
#Patch100: 0001-vfs-add-i_op-dentry_open.patch
|
||||
#Patch101: 0002-vfs-export-do_splice_direct-to-modules.patch
|
||||
#Patch102: 0003-vfs-export-__inode_permission-to-modules.patch
|
||||
#Patch103: 0004-vfs-introduce-clone_private_mount.patch
|
||||
#Patch104: 0005-overlay-filesystem.patch
|
||||
#Patch105: 0006-overlayfs-add-statfs-support.patch
|
||||
#Patch106: 0007-overlayfs-implement-show_options.patch
|
||||
#Patch107: 0008-overlay-overlay-filesystem-documentation.patch
|
||||
#Patch108: 0009-fs-limit-filesystem-stacking-depth.patch
|
||||
URL: http://www.kernel.org
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
@ -221,34 +216,11 @@ Obsoletes: kernel-%{KERNEL_TARGET}-atl1e
|
||||
Provides: kernel-%{KERNEL_TARGET}-drbd
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-drbd
|
||||
Provides: kernel = %{version}
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET} = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
%ifarch %ix86
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-nongpl-nvidia_173xx
|
||||
@ -276,34 +248,11 @@ Obsoletes: kernel26-smp-source
|
||||
Obsoletes: kernel26-preempt-source
|
||||
Obsoletes: kernel26-std-source
|
||||
%endif
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-source = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-source = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Provides: kernel_%{KERNEL_TARGET}_%{kernel_ver}-source
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-source
|
||||
@ -317,34 +266,11 @@ This kernel sources are configured for %{TARGET_CPU} architecture and the follow
|
||||
Group: Development/Kernel
|
||||
Summary: Headers, scripts, configuration and Makefile for the linux kernel
|
||||
Provides: kernelheaders = %{version}
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-headers
|
||||
|
||||
@ -357,34 +283,11 @@ This kernel headers are configured for %{TARGET_CPU} architecture and the follow
|
||||
Group: Development/Kernel
|
||||
Summary: Sanitised kernel headers used for glibc build
|
||||
Provides: kernelsanitisedheaders = %{version}
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-headers-sanitised = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-headers-sanitised = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Provides: kernel_%{KERNEL_TARGET}_%{kernel_ver}-headers-sanitised
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-headers-sanitised
|
||||
@ -398,34 +301,11 @@ Group: System/Kernel and Hardware
|
||||
Summary: The kernel sound subsystem
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
Provides: kernelsound-%{KERNEL_TARGET}-%{kernel_ver} = %{version}
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-sound = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-sound = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Provides: kernel_%{KERNEL_TARGET}_%{kernel_ver}-sound
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-sound
|
||||
@ -440,34 +320,11 @@ Summary: The kernel wireless subsystem
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
Provides: kernelwireless-%{KERNEL_TARGET}-%{kernel_ver} = %{version}
|
||||
Requires: iwlwifi-firmware
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-wireless = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-wireless = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Provides: kernel_%{KERNEL_TARGET}_%{kernel_ver}-wireless
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-wireless
|
||||
@ -481,34 +338,11 @@ This is packaged apart because more up-to-date drivers are provides by kernel-%{
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: Firmware files used by the Linux Kernel
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
## KERNELOBSOLETES-BEGIN 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware < 3.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = 3.8.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = 3.8.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = 3.8.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = 3.8.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = 3.8.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}.1
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-rt-firmware = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.1
|
||||
## KERNELOBSOLETES-BEGIN 3.14
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware < 3.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.2
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.3
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.4
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.5
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.6
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.7
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.9
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.10
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.12
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.17
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.27
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.32
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-firmware = %{kernel_ver}.34
|
||||
## KERNELOBSOLETES-END
|
||||
Provides: kernel_%{KERNEL_TARGET}_%{kernel_ver}-firmware
|
||||
Obsoletes: kernel_%{KERNEL_TARGET}_%{kernel_ver}-firmware
|
||||
@ -607,6 +441,7 @@ make mrproper
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba-arm) kernel_cfg=%{SOURCE15} ;;
|
||||
mamba-arm-kirkwood) kernel_cfg=%{SOURCE18} ;;
|
||||
mamba-arm-dove) kernel_cfg=%{SOURCE20} ;;
|
||||
esac
|
||||
## apply arm copypage gcc4 patch
|
||||
# patch -p1 < %{PATCH50}
|
||||
@ -651,14 +486,14 @@ cp $kernel_cfg ./.config
|
||||
|
||||
# overlayfs patches
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
#% patch101 -p1
|
||||
#% patch102 -p1
|
||||
#% patch103 -p1
|
||||
#% patch104 -p1
|
||||
#% patch105 -p1
|
||||
#% patch106 -p1
|
||||
#% patch107 -p1
|
||||
#% patch108 -p1
|
||||
|
||||
%build
|
||||
#:<< ___EOF
|
||||
@ -671,6 +506,15 @@ cp Makefile Makefile.orig
|
||||
sed -i "s/\(EXTRAVERSION =\).*/\1 %{?KERNEL_TARGET}/" Makefile
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} %{?DISTCC} all %{?KIMAGE_TARGET}
|
||||
|
||||
if [ "%{?KERNEL_TARGET}" = "mamba-arm-dove" ]; then
|
||||
# See www.solid-run.com/mw/index.php?title=Device_Tree
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} %{?DISTCC} uImage
|
||||
cp arch/arm/boot/zImage arch/arm/boot/zImage.orig
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} %{?DISTCC} dtbs
|
||||
cat arch/arm/boot/zImage.orig arch/arm/boot/dts/dove-cubox.dtb > arch/arm/boot/zImage
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} %{?DISTCC} uImage
|
||||
fi
|
||||
|
||||
#%if %{_target_cpu} == arm
|
||||
#ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} %{?DISTCC} uImage
|
||||
#%endif
|
||||
@ -734,6 +578,7 @@ ARCH=%{target_cpu} make mrproper
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba-arm) kernel_cfg=%{SOURCE15} ;;
|
||||
mamba-arm-kirkwood) kernel_cfg=%{SOURCE18} ;;
|
||||
mamba-arm-dove) kernel_cfg=%{SOURCE20} ;;
|
||||
esac
|
||||
%endif
|
||||
%if %{_target_cpu} == ppc
|
||||
@ -1188,17 +1033,44 @@ exit 0
|
||||
/lib/firmware/*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 29 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.38-1mamba
|
||||
- update to 3.10.38
|
||||
* Sat Jun 07 2014 Automatic Build System <autodist@mambasoft.it> 3.14.5-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Fri Mar 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.34-1mamba
|
||||
- update to 3.10.34
|
||||
* Sun May 18 2014 Automatic Build System <autodist@mambasoft.it> 3.14.4-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Mar 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.32-1mamba
|
||||
- update to 3.10.32
|
||||
* Wed May 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.14.3-1mamba
|
||||
- update to 3.14.3
|
||||
|
||||
* Sat Jan 18 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.27-1mamba
|
||||
- update to 3.10.27
|
||||
* Sat May 03 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.14.2-1mamba
|
||||
- update to 3.14.2
|
||||
|
||||
* Thu Mar 27 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.15-1mamba
|
||||
- update to 3.12.15
|
||||
|
||||
* Sat Mar 01 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.13-1mamba
|
||||
- update to 3.12.13
|
||||
|
||||
* Fri Jan 17 2014 Automatic Build System <autodist@mambasoft.it> 3.12.8-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Jan 12 2014 Automatic Build System <autodist@mambasoft.it> 3.12.7-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Dec 23 2013 Automatic Build System <autodist@mambasoft.it> 3.12.6-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sun Dec 15 2013 Automatic Build System <autodist@mambasoft.it> 3.12.5-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Dec 09 2013 Automatic Build System <autodist@mambasoft.it> 3.12.4-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Dec 07 2013 Automatic Build System <autodist@mambasoft.it> 3.12.3-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Nov 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.2-1mamba
|
||||
- update to 3.12.2
|
||||
|
||||
* Wed Oct 30 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.17-1mamba
|
||||
- update to 3.10.17
|
||||
|
BIN
patch-3.10.38.xz
BIN
patch-3.10.38.xz
Binary file not shown.
BIN
patch-3.14.5.xz
Normal file
BIN
patch-3.14.5.xz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user