[kernel] r14820 - in dists/lenny/linux-2.6/debian: . patches/features/all/openvz patches/series
Maximilian Attems
maks at alioth.debian.org
Mon Dec 28 22:52:06 UTC 2009
Author: maks
Date: Mon Dec 28 22:52:04 2009
New Revision: 14820
Log:
add stable openvz patches
commits from stable openvz branch, they fix various oops.
tested that none is an ABI breaker.
Added:
dists/lenny/linux-2.6/debian/patches/features/all/openvz/0087-cpt-dump-inode-content-for-shm_file_operations.patch
dists/lenny/linux-2.6/debian/patches/features/all/openvz/0088-cfq-unlink-queues-at-bc-destroy.patch
dists/lenny/linux-2.6/debian/patches/features/all/openvz/0089-inotify-unblock-umounting.patch
dists/lenny/linux-2.6/debian/patches/series/22-extra
Modified:
dists/lenny/linux-2.6/debian/changelog
Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog Sat Dec 26 18:12:56 2009 (r14819)
+++ dists/lenny/linux-2.6/debian/changelog Mon Dec 28 22:52:04 2009 (r14820)
@@ -1,3 +1,11 @@
+linux-2.6 (2.6.26-22) UNRELEASED; urgency=high
+
+ * [openvz] 1f7db8e checkpointing shared memory fails. (closes: #562891)
+ * [openvz] 1a6d795 Fix cfq related oops. (closes: #562892)
+ * [openvz] ddbec37 inotify: unblock umounting. (closes: #513537)
+
+ -- maximilian attems <maks at debian.org> Mon, 28 Dec 2009 23:44:19 +0100
+
linux-2.6 (2.6.26-21) stable; urgency=high
[ Ben Hutchings ]
Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0087-cpt-dump-inode-content-for-shm_file_operations.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0087-cpt-dump-inode-content-for-shm_file_operations.patch Mon Dec 28 22:52:04 2009 (r14820)
@@ -0,0 +1,56 @@
+From 1f7db8ea4a3e4be07047223a0c53fb501346aea7 Mon Sep 17 00:00:00 2001
+From: Vitaily Gusev <vgusev at openvz.org>
+Date: Mon, 12 Oct 2009 18:53:30 +0400
+Subject: [PATCH 87/90] cpt: dump inode content for shm_file_operations
+
+If file->f_op == shm_file_operations then cpt code doesn't
+dump inode content, and dump only for f_op == shmem_file_operations.
+
+Bug http://bugzilla.openvz.org/show_bug.cgi?id=1342
+
+Signed-off-by: Vitaliy Gusev <vgusev at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ kernel/cpt/cpt_files.c | 22 +++++++++++++---------
+ 1 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/kernel/cpt/cpt_files.c b/kernel/cpt/cpt_files.c
+index dd05814..866ca53 100644
+--- a/kernel/cpt/cpt_files.c
++++ b/kernel/cpt/cpt_files.c
+@@ -620,19 +620,23 @@ static int dump_content_regular(struct file *file, struct cpt_context *ctx)
+ return -EINVAL;
+
+ do_read = file->f_op->read;
+- if (file->f_op == &shm_file_operations) {
+- struct shm_file_data *sfd = file->private_data;
+
+- cpt_dump_content_sysvshm(sfd->file, ctx);
++ if (file->f_op == &shm_file_operations ||
++ file->f_op == &shmem_file_operations) {
++ struct file *shm_file = file;
+
+- return 0;
+- }
+- if (file->f_op == &shmem_file_operations) {
+- do_read = file->f_dentry->d_inode->i_fop->read;
+- cpt_dump_content_sysvshm(file, ctx);
++ /* shmget uses shm ops */
++ if (file->f_op == &shm_file_operations) {
++ struct shm_file_data *sfd = file->private_data;
++ shm_file = sfd->file;
++ }
++
++ cpt_dump_content_sysvshm(shm_file, ctx);
++
++ do_read = shm_file->f_dentry->d_inode->i_fop->read;
+ if (!do_read) {
+ wprintk_ctx("TMPFS is not configured?\n");
+- return dump_content_shm(file, ctx);
++ return dump_content_shm(shm_file, ctx);
+ }
+ }
+
+--
+1.6.5.7
+
Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0088-cfq-unlink-queues-at-bc-destroy.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0088-cfq-unlink-queues-at-bc-destroy.patch Mon Dec 28 22:52:04 2009 (r14820)
@@ -0,0 +1,93 @@
+From 1a6d795abc130bd356b10abbd91ef63ef23f01c4 Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Date: Thu, 24 Dec 2009 20:58:15 +0300
+Subject: [PATCH 88/90] cfq: unlink queues at bc destroy
+
+Unlink cfq-queues from cfq-io-contexts at cfq-bc-data destroy and
+always revalidate cached cfq-queues from cfq-io-context.
+
+Should fix pdflush oops in cfq_set_request after container stop.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1240
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ block/cfq-iosched.c | 20 +++++---------------
+ kernel/bc/io_prio.c | 11 +++++++++++
+ 2 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
+index b25b442..3a9992a 100644
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -2014,32 +2014,22 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
+ struct cfq_queue *cfqq;
+ unsigned long flags;
+ struct ub_iopriv *iopriv;
+- struct cfq_bc_data *cfq_bc = NULL;
+
+ might_sleep_if(gfp_mask & __GFP_WAIT);
+
+ cic = cfq_get_io_context(cfqd, gfp_mask);
+ iopriv = cfqq_ub_iopriv(cfqd, is_sync);
+- if (!is_sync)
+- cfq_bc = bc_findcreate_cfq_bc(iopriv, cfqd, gfp_mask);
+
+ spin_lock_irqsave(q->queue_lock, flags);
+
+- if (!cic || (!is_sync && cfq_bc == NULL))
++ if (!cic)
+ goto queue_fail;
+
+ cfqq = cic_to_cfqq(cic, is_sync);
+- if (!cfqq) {
+- cfqq = cfq_get_queue(cfqd, is_sync, cic->ioc, gfp_mask);
+-
+- if (!cfqq)
+- goto queue_fail;
+-
+- cic_set_cfqq(cic, cfqq, is_sync);
+- }
+-
+- if (!is_sync && cfqq->cfq_bc != cfq_bc) {
+- cfq_put_queue(cfqq);
++ if (!cfqq || cfqq->cfq_bc->ub_iopriv != iopriv) {
++ if (cfqq)
++ cfq_put_queue(cfqq);
++ cic_set_cfqq(cic, NULL, is_sync);
+ cfqq = cfq_get_queue(cfqd, is_sync, cic->ioc, gfp_mask);
+ cic_set_cfqq(cic, cfqq, is_sync);
+ if (!cfqq)
+diff --git a/kernel/bc/io_prio.c b/kernel/bc/io_prio.c
+index 5bb22e5..4a1ee2e 100644
+--- a/kernel/bc/io_prio.c
++++ b/kernel/bc/io_prio.c
+@@ -88,6 +88,7 @@ static void inline bc_cfq_bc_check_empty(struct cfq_bc_data *cfq_bc)
+
+ static void bc_release_cfq_bc(struct cfq_bc_data *cfq_bc)
+ {
++ struct cfq_io_context *cic;
+ struct cfq_data *cfqd;
+ elevator_t *eq;
+ int i;
+@@ -109,6 +110,16 @@ static void bc_release_cfq_bc(struct cfq_bc_data *cfq_bc)
+ eq->ops->put_queue(cfq_bc->async_idle_cfqq);
+ cfq_bc->async_idle_cfqq = NULL;
+ }
++ list_for_each_entry(cic, &cfqd->cic_list, queue_list) {
++ if (cic->cfqq[0] && cic->cfqq[0]->cfq_bc == cfq_bc) {
++ eq->ops->put_queue(cic->cfqq[0]);
++ cic->cfqq[0] = NULL;
++ }
++ if (cic->cfqq[1] && cic->cfqq[1]->cfq_bc == cfq_bc) {
++ eq->ops->put_queue(cic->cfqq[1]);
++ cic->cfqq[1] = NULL;
++ }
++ }
+ /*
+ * Note: this cfq_bc is already not in active list,
+ * but can be still pointed from cfqd as active.
+--
+1.6.5.7
+
Added: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0089-inotify-unblock-umounting.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0089-inotify-unblock-umounting.patch Mon Dec 28 22:52:04 2009 (r14820)
@@ -0,0 +1,125 @@
+From ddbec374c4beae6643db9297c2968f6dfaf43635 Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Date: Fri, 25 Dec 2009 21:39:51 +0300
+Subject: [PATCH 89/90] inotify: unblock umounting
+
+Replace getting vfsmount with pinning and unmounts watch
+at vfsmount umount time.
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ fs/inotify.c | 22 ++++++++++++++++++++--
+ fs/namespace.c | 2 ++
+ include/linux/inotify.h | 5 +++++
+ 3 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/fs/inotify.c b/fs/inotify.c
+index b2671b6..007734f 100644
+--- a/fs/inotify.c
++++ b/fs/inotify.c
+@@ -106,6 +106,7 @@ void put_inotify_watch(struct inotify_watch *watch)
+ struct inotify_handle *ih = watch->ih;
+
+ iput(watch->inode);
++ mnt_unpin(watch->path.mnt);
+ path_put(&watch->path);
+ watch->path.dentry = NULL;
+ watch->path.mnt = NULL;
+@@ -340,7 +341,7 @@ EXPORT_SYMBOL_GPL(inotify_get_cookie);
+ * of inodes, and with iprune_mutex held, keeping shrink_icache_memory() at bay.
+ * We temporarily drop inode_lock, however, and CAN block.
+ */
+-void inotify_unmount_inodes(struct list_head *list)
++void inotify_unmount_inodes_mnt(struct list_head *list, struct vfsmount *mnt)
+ {
+ struct inode *inode, *next_i, *need_iput = NULL;
+
+@@ -398,6 +399,10 @@ void inotify_unmount_inodes(struct list_head *list)
+ watches = &inode->inotify_watches;
+ list_for_each_entry_safe(watch, next_w, watches, i_list) {
+ struct inotify_handle *ih= watch->ih;
++
++ if (mnt && mnt != watch->path.mnt)
++ continue;
++
+ get_inotify_watch(watch);
+ mutex_lock(&ih->mutex);
+ ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
+@@ -412,8 +417,20 @@ void inotify_unmount_inodes(struct list_head *list)
+ spin_lock(&inode_lock);
+ }
+ }
++
++void inotify_unmount_inodes(struct list_head *list)
++{
++ inotify_unmount_inodes_mnt(list, NULL);
++}
+ EXPORT_SYMBOL_GPL(inotify_unmount_inodes);
+
++void inotify_unmount_mnt(struct vfsmount *mnt)
++{
++ spin_lock(&inode_lock);
++ inotify_unmount_inodes_mnt(&mnt->mnt_sb->s_inodes, mnt);
++ spin_unlock(&inode_lock);
++}
++
+ /**
+ * inotify_inode_is_dead - an inode has been deleted, cleanup any watches
+ * @inode: inode that is about to be removed
+@@ -641,7 +658,8 @@ s32 __inotify_add_watch(struct inotify_handle *ih, struct inotify_watch *watch,
+ * official. We hold a reference to nameidata, which makes this safe.
+ */
+ if (path) {
+- path_get(path);
++ mnt_pin(path->mnt);
++ dget(path->dentry);
+ watch->path = *path;
+ }
+ watch->inode = igrab(inode);
+diff --git a/fs/namespace.c b/fs/namespace.c
+index 6873efd..57308ab 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -27,6 +27,7 @@
+ #include <linux/ramfs.h>
+ #include <linux/log2.h>
+ #include <linux/idr.h>
++#include <linux/inotify.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+ #include "pnode.h"
+@@ -655,6 +656,7 @@ repeat:
+ spin_unlock(&vfsmount_lock);
+ acct_auto_close_mnt(mnt);
+ security_sb_umount_close(mnt);
++ inotify_unmount_mnt(mnt);
+ goto repeat;
+ }
+ }
+diff --git a/include/linux/inotify.h b/include/linux/inotify.h
+index a935bb3..a2a3cae 100644
+--- a/include/linux/inotify.h
++++ b/include/linux/inotify.h
+@@ -108,6 +108,7 @@ extern void inotify_inode_queue_event(struct inode *, __u32, __u32,
+ extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32,
+ const char *);
+ extern void inotify_unmount_inodes(struct list_head *);
++extern void inotify_unmount_mnt(struct vfsmount *);
+ extern void inotify_inode_is_dead(struct inode *);
+ extern u32 inotify_get_cookie(void);
+
+@@ -221,6 +222,10 @@ static inline void inotify_unmount_inodes(struct list_head *list)
+ {
+ }
+
++static inline void inotify_unmount_mnt(struct vfsmount *)
++{
++}
++
+ static inline void inotify_inode_is_dead(struct inode *inode)
+ {
+ }
+--
+1.6.5.7
+
Added: dists/lenny/linux-2.6/debian/patches/series/22-extra
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/series/22-extra Mon Dec 28 22:52:04 2009 (r14820)
@@ -0,0 +1,3 @@
++ features/all/openvz/0087-cpt-dump-inode-content-for-shm_file_operations.patch featureset=openvz
++ features/all/openvz/0088-cfq-unlink-queues-at-bc-destroy.patch featureset=openvz
++ features/all/openvz/0089-inotify-unblock-umounting.patch featureset=openvz
More information about the Kernel-svn-changes
mailing list