Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/856/?format=api
{ "id": 856, "url": "http://patchwork.ozlabs.org/api/patches/856/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20080922195847t-sato@mail.jp.nec.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20080922195847t-sato@mail.jp.nec.com>", "list_archive_url": null, "date": "2008-09-22T10:58:47", "name": "[10/10] Add timeout feature", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "48cdf4c4627019e256d0674a7b65f4e76087f852", "submitter": { "id": 391, "url": "http://patchwork.ozlabs.org/api/people/391/?format=api", "name": "Takashi Sato", "email": "t-sato@yk.jp.nec.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20080922195847t-sato@mail.jp.nec.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/856/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/856/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-ext4-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id C758CDDF09\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 22 Sep 2008 21:00:58 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754051AbYIVK7g (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 06:59:36 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1753675AbYIVK7f\n\t(ORCPT <rfc822;linux-ext4-outgoing>);\n\tMon, 22 Sep 2008 06:59:35 -0400", "from TYO201.gate.nec.co.jp ([202.32.8.193]:38231 \"EHLO\n\ttyo201.gate.nec.co.jp\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753421AbYIVK7d (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Mon, 22 Sep 2008 06:59:33 -0400", "from mailgate3.nec.co.jp ([10.7.69.160])\n\tby tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8MAwoeJ002509;\n\tMon, 22 Sep 2008 19:58:50 +0900 (JST)", "(from root@localhost) by mailgate3.nec.co.jp\n\t(8.11.7/3.7W-MAILGATE-NEC)\n\tid m8MAwoH03366; Mon, 22 Sep 2008 19:58:50 +0900 (JST)", "from kaishu.jp.nec.com (kaishu.jp.nec.com [10.26.220.5])\n\tby mailsv3.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8MAwonx014115;\n\tMon, 22 Sep 2008 19:58:50 +0900 (JST)", "from TNESB07336 ([10.64.168.65] [10.64.168.65]) by mail.jp.nec.com\n\twith ESMTP; Mon, 22 Sep 2008 19:58:47 +0900" ], "To": "Andrew Morton <akpm@linux-foundation.org>,\n\tChristoph Hellwig <hch@infradead.org>,\n\t\"linux-fsdevel@vger.kernel.org\" <linux-fsdevel@vger.kernel.org>,\n\t\"dm-devel@redhat.com\" <dm-devel@redhat.com>,\n\t\"viro@ZenIV.linux.org.uk\" <viro@ZenIV.linux.org.uk>,\n\t\"linux-ext4@vger.kernel.org\" <linux-ext4@vger.kernel.org>,\n\t\"xfs@oss.sgi.com\" <xfs@oss.sgi.com>, \"axboe@kernel.dk\" <axboe@kernel.dk>,\n\t\"mtk.manpages@googlemail.com\" <mtk.manpages@googlemail.com>", "Cc": "\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>", "Subject": "[PATCH 10/10] Add timeout feature", "Message-Id": "<20080922195847t-sato@mail.jp.nec.com>", "Mime-Version": "1.0", "X-Mailer": "WeMail32[2.51] ID:1K0086", "From": "Takashi Sato <t-sato@yk.jp.nec.com>", "Date": "Mon, 22 Sep 2008 19:58:47 +0900", "Content-Type": "text/plain; charset=us-ascii", "Content-Transfer-Encoding": "7bit", "Sender": "linux-ext4-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-ext4.vger.kernel.org>", "X-Mailing-List": "linux-ext4@vger.kernel.org" }, "content": "The timeout feature is added to \"freeze ioctl\" to solve a deadlock\nwhen the freezer accesses a frozen filesystem. And new ioctl\nto reset the timeout period is added to extend the timeout period.\nFor example, the freezer resets the timeout period to 10 seconds every 5\nseconds. In this approach, even if the freezer causes a deadlock by\naccessing the frozen filesystem, it will be solved by the timeout\nin 10 seconds and the freezer will be able to recognize that\nat the next reset of timeout period.\no Freeze the filesystem\n int ioctl(int fd, int FIFREEZE, long *timeout_sec)\n fd: The file descriptor of the mountpoint\n FIFREEZE: request code for the freeze\n timeout_sec: the timeout period in seconds\n If it's 0 or 1, the timeout isn't set.\n This special case of \"1\" is implemented to keep\n the compatibility with XFS applications.\n Return value: 0 if the operation succeeds. Otherwise, -1\n\no Reset the timeout period\n int ioctl(int fd, int FIFREEZE_RESET_TIMEOUT, long *timeout_sec)\n fd:file descriptor of mountpoint\n FIFREEZE_RESET_TIMEOUT: request code for reset of timeout period\n timeout_sec: new timeout period in seconds\n Return value: 0 if the operation succeeds. Otherwise, -1\n Error number: If the filesystem has already been unfrozen,\n errno is set to EINVAL.\n\nSigned-off-by: Takashi Sato <t-sato@yk.jp.nec.com>\nSigned-off-by: Masayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>\n---\n drivers/md/dm.c | 2 -\n fs/block_dev.c | 2 +\n fs/buffer.c | 44 ++++++++++++++++++++++++---\n fs/ioctl.c | 71 ++++++++++++++++++++++++++++++++++++++++++--\n fs/super.c | 37 ++++++++++++++++++++++\n fs/xfs/xfs_fsops.c | 2 -\n include/linux/buffer_head.h | 4 +-\n include/linux/fs.h | 8 ++++\n 8 files changed, 159 insertions(+), 11 deletions(-)\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-ext4\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at http://vger.kernel.org/majordomo-info.html", "diff": "diff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/drivers/md/dm.c linux-2.6.27-rc7-timeout/\ndrivers/md/dm.c\n--- linux-2.6.27-rc7-xfs/drivers/md/dm.c\t2008-09-22 07:29:55.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/drivers/md/dm.c\t2008-09-22 15:45:31.000000000 +0900\n@@ -1451,7 +1451,7 @@ static int lock_fs(struct mapped_device \n \n \tWARN_ON(md->frozen_sb);\n \n-\tmd->frozen_sb = freeze_bdev(md->suspended_bdev);\n+\tmd->frozen_sb = freeze_bdev(md->suspended_bdev, 0);\n \tif (IS_ERR(md->frozen_sb)) {\n \t\tr = PTR_ERR(md->frozen_sb);\n \t\tmd->frozen_sb = NULL;\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/fs/block_dev.c linux-2.6.27-rc7-timeout/f\ns/block_dev.c\n--- linux-2.6.27-rc7-xfs/fs/block_dev.c\t2008-09-22 13:11:03.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/fs/block_dev.c\t2008-09-22 15:45:31.000000000 +0900\n@@ -287,6 +287,8 @@ static void init_once(void *foo)\n \tinode_init_once(&ei->vfs_inode);\n \t/* Initialize mutex for freeze. */\n \tmutex_init(&bdev->bd_fsfreeze_mutex);\n+\t/* Setup freeze timeout function. */\n+\tINIT_DELAYED_WORK(&bdev->bd_fsfreeze_timeout, fsfreeze_timeout);\n }\n \n static inline void __bd_forget(struct inode *inode)\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/fs/buffer.c linux-2.6.27-rc7-timeout/fs/b\nuffer.c\n--- linux-2.6.27-rc7-xfs/fs/buffer.c\t2008-09-22 16:31:58.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/fs/buffer.c\t2008-09-22 16:32:31.000000000 +0900\n@@ -190,27 +190,37 @@ int fsync_bdev(struct block_device *bdev\n \n /**\n * freeze_bdev -- lock a filesystem and force it into a consistent state\n- * @bdev:\tblockdevice to lock\n+ * @bdev:\t\tblockdevice to lock\n+ * @timeout_msec:\ttimeout period\n *\n * This takes the block device bd_mount_sem to make sure no new mounts\n * happen on bdev until thaw_bdev() is called.\n * If a superblock is found on this device, we take the s_umount semaphore\n * on it to make sure nobody unmounts until the snapshot creation is done.\n+ * If timeout_msec is bigger than 0, this registers the delayed work for\n+ * timeout of the freeze feature.\n * The reference counter (bd_fsfreeze_count) guarantees that only the last\n * unfreeze process can unfreeze the frozen filesystem actually when multiple\n * freeze requests arrive simultaneously. It counts up in freeze_bdev() and\n * count down in thaw_bdev(). When it becomes 0, thaw_bdev() will unfreeze\n * actually.\n */\n-struct super_block *freeze_bdev(struct block_device *bdev)\n+struct super_block *freeze_bdev(struct block_device *bdev,\n+\t\t\t\tunsigned int timeout_msec)\n {\n \tstruct super_block *sb;\n \tint error = 0;\n \n \tmutex_lock(&bdev->bd_fsfreeze_mutex);\n \tif (bdev->bd_fsfreeze_count > 0) {\n-\t\tbdev->bd_fsfreeze_count++;\n-\t\tsb = get_super(bdev);\n+\t\tif ((delayed_work_pending(&bdev->bd_fsfreeze_timeout))\n+\t\t\t\t|| (timeout_msec != 0))\n+\t\t\tsb = ERR_PTR(-EBUSY);\n+\t\telse {\n+\t\t\tbdev->bd_fsfreeze_count++;\n+\t\t\tsb = get_super(bdev);\n+\t\t}\n+\n \t\tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n \t\treturn sb;\n \t}\n@@ -245,6 +255,10 @@ struct super_block *freeze_bdev(struct b\n \t}\n \n \tsync_blockdev(bdev);\n+\t/* Setup unfreeze timer. */\n+\tif (timeout_msec > 0)\n+\t\tadd_fsfreeze_timeout(bdev, timeout_msec);\n+\n \tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n \n \treturn sb;\t/* thaw_bdev releases s->s_umount and bd_mount_sem */\n@@ -260,6 +274,22 @@ EXPORT_SYMBOL(freeze_bdev);\n */\n int thaw_bdev(struct block_device *bdev, struct super_block *sb)\n {\n+\treturn thaw_bdev_core(bdev, sb, 1);\n+}\n+EXPORT_SYMBOL(thaw_bdev);\n+\n+/**\n+ * thaw_bdev_core -- unlock filesystem and delete timeout task\n+ * @bdev:\t\tblockdevice to unlock\n+ * @sb:\t\t\tassociated superblock\n+ * @del_timeout_task:\tIf it is 0 then don't delete timeout task else delete\n+ *\n+ * Unlocks the filesystem and marks it writeable again after freeze_bdev().\n+ * And If del_timeout_task is 0 then don't delete timeout task else delete.\n+ */\n+int thaw_bdev_core(struct block_device *bdev,\n+\t\t\t\tstruct super_block *sb, int del_timeout_task)\n+{\n \tint error = 0;\n \n \tmutex_lock(&bdev->bd_fsfreeze_mutex);\n@@ -276,6 +306,10 @@ int thaw_bdev(struct block_device *bdev,\n \t\treturn 0;\n \t}\n \n+\t/* Delete unfreeze timer. */\n+\tif (del_timeout_task)\n+\t\tcancel_delayed_work_sync(&bdev->bd_fsfreeze_timeout);\n+\n \tif (sb) {\n \t\tBUG_ON(sb->s_bdev != bdev);\n \t\tif (!(sb->s_flags & MS_RDONLY)) {\n@@ -296,7 +330,7 @@ int thaw_bdev(struct block_device *bdev,\n \tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n \treturn error;\n }\n-EXPORT_SYMBOL(thaw_bdev);\n+EXPORT_SYMBOL(thaw_bdev_core);\n \n /*\n * Various filesystems appear to want __find_get_block to be non-blocking.\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/fs/ioctl.c linux-2.6.27-rc7-timeout/fs/io\nctl.c\n--- linux-2.6.27-rc7-xfs/fs/ioctl.c\t2008-09-22 13:11:03.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/fs/ioctl.c\t2008-09-22 15:45:31.000000000 +0900\n@@ -141,9 +141,12 @@ static int ioctl_fioasync(unsigned int f\n \treturn error;\n }\n \n-static int ioctl_freeze(struct file *filp)\n+static int ioctl_freeze(struct file *filp, int __user *argp)\n {\n+\tint timeout_sec;\n+\tunsigned int timeout_msec;\n \tstruct super_block *sb = filp->f_path.dentry->d_inode->i_sb;\n+\tint error;\n \n \tif (!capable(CAP_SYS_ADMIN))\n \t\treturn -EPERM;\n@@ -156,8 +159,25 @@ static int ioctl_freeze(struct file *fil\n \tif (sb->s_bdev == NULL)\n \t\treturn -EINVAL;\n \n+\t/* arg(sec) to tick value. */\n+\terror = get_user(timeout_sec, argp);\n+\tif (error != 0)\n+\t\treturn error;\n+\n+\tif (timeout_sec < 0 || timeout_sec > UINT_MAX/1000)\n+\t\treturn -EINVAL;\n+\n+\t/*\n+\t * If 1 is specified as the timeout period it is changed into 0\n+\t * to retain compatibility with XFS's xfs_freeze.\n+\t */\n+\tif (timeout_sec == 1)\n+\t\ttimeout_sec = 0;\n+\n+\ttimeout_msec = timeout_sec * 1000;\n+\n \t/* Freeze */\n-\tsb = freeze_bdev(sb->s_bdev);\n+\tsb = freeze_bdev(sb->s_bdev, timeout_msec);\n \tif (IS_ERR(sb))\n \t\treturn PTR_ERR(sb);\n \treturn 0;\n@@ -178,6 +198,47 @@ static int ioctl_thaw(struct file *filp)\n \treturn thaw_bdev(sb->s_bdev, sb);\n }\n \n+static int\n+ioctl_freeze_reset_timeout(struct file *filp, int __user *argp)\n+{\n+\tint timeout_sec;\n+\tunsigned int timeout_msec;\n+\tstruct super_block *sb = filp->f_path.dentry->d_inode->i_sb;\n+\tstruct block_device *bdev = sb->s_bdev;\n+\tint error;\n+\n+\tif (!capable(CAP_SYS_ADMIN))\n+\t\treturn -EPERM;\n+\n+\t/* If a blockdevice-backed filesystem isn't specified, return EINVAL. */\n+\tif (bdev == NULL)\n+\t\treturn -EINVAL;\n+\n+\t/* arg(sec) to tick value */\n+\terror = get_user(timeout_sec, argp);\n+\tif (error)\n+\t\treturn error;\n+\n+\tif (timeout_sec <= 1 || timeout_sec > UINT_MAX/1000)\n+\t\treturn -EINVAL;\n+\n+\ttimeout_msec = timeout_sec * 1000;\n+\n+\tmutex_lock(&bdev->bd_fsfreeze_mutex);\n+\tif (!bdev->bd_fsfreeze_count) {\n+\t\tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n+\t\treturn -EINVAL;\n+\t} else if (!delayed_work_pending(&bdev->bd_fsfreeze_timeout)) {\n+\t\tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n+\t\treturn -EBUSY;\n+\t}\n+\t/* setup unfreeze timer */\n+\tadd_fsfreeze_timeout(bdev, timeout_msec);\n+\tmutex_unlock(&bdev->bd_fsfreeze_mutex);\n+\n+\treturn 0;\n+}\n+\n /*\n * When you add any new common ioctls to the switches above and below\n * please update compat_sys_ioctl() too.\n@@ -221,13 +282,17 @@ int do_vfs_ioctl(struct file *filp, unsi\n \t\tbreak;\n \n \tcase FIFREEZE:\n-\t\terror = ioctl_freeze(filp);\n+\t\terror = ioctl_freeze(filp, argp);\n \t\tbreak;\n \n \tcase FITHAW:\n \t\terror = ioctl_thaw(filp);\n \t\tbreak;\n \n+\tcase FIFREEZE_RESET_TIMEOUT:\n+\t\terror = ioctl_freeze_reset_timeout(filp, argp);\n+\t\tbreak;\n+\n \tdefault:\n \t\tif (S_ISREG(filp->f_path.dentry->d_inode->i_mode))\n \t\t\terror = file_ioctl(filp, cmd, arg);\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/fs/super.c linux-2.6.27-rc7-timeout/fs/su\nper.c\n--- linux-2.6.27-rc7-xfs/fs/super.c\t2008-09-22 07:29:55.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/fs/super.c\t2008-09-22 15:45:31.000000000 +0900\n@@ -981,3 +981,40 @@ struct vfsmount *kern_mount_data(struct \n }\n \n EXPORT_SYMBOL_GPL(kern_mount_data);\n+\n+/*\n+ * fsfreeze_timeout - Thaw the filesystem.\n+ *\n+ * @work:\twork queue (delayed_work.work)\n+ *\n+ * Called by the delayed work when elapsing the timeout period.\n+ * Thaw the filesystem.\n+ */\n+void fsfreeze_timeout(struct work_struct *work)\n+{\n+\tstruct block_device *bd = container_of(work,\n+\t\t\tstruct block_device, bd_fsfreeze_timeout.work);\n+\tstruct super_block *sb = get_super(bd);\n+\n+\tthaw_bdev_core(bd, sb, 0);\n+\n+\tif (sb)\n+\t\tdrop_super(sb);\n+}\n+\n+/*\n+ * add_fsfreeze_timeout - Add timeout for freeze.\n+ *\n+ * @bdev:\t\tblock device struct\n+ * @timeout_msec:\ttimeout period\n+ *\n+ * Add the delayed work for freeze timeout to the delayed work queue.\n+ */\n+void add_fsfreeze_timeout(struct block_device *bdev, unsigned int timeout_msec)\n+{\n+\ts64 timeout_jiffies = msecs_to_jiffies(timeout_msec);\n+\n+\t/* Set delayed work queue */\n+\tcancel_delayed_work_sync(&bdev->bd_fsfreeze_timeout);\n+\tschedule_delayed_work(&bdev->bd_fsfreeze_timeout, timeout_jiffies);\n+}\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/fs/xfs/xfs_fsops.c linux-2.6.27-rc7-timeo\nut/fs/xfs/xfs_fsops.c\n--- linux-2.6.27-rc7-xfs/fs/xfs/xfs_fsops.c\t2008-09-22 07:29:55.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/fs/xfs/xfs_fsops.c\t2008-09-22 15:45:31.000000000 +0900\n@@ -621,7 +621,7 @@ xfs_fs_goingdown(\n {\n \tswitch (inflags) {\n \tcase XFS_FSOP_GOING_FLAGS_DEFAULT: {\n-\t\tstruct super_block *sb = freeze_bdev(mp->m_super->s_bdev);\n+\t\tstruct super_block *sb = freeze_bdev(mp->m_super->s_bdev, 0);\n \n \t\tif (sb && !IS_ERR(sb)) {\n \t\t\txfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT);\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/include/linux/buffer_head.h linux-2.6.27-\nrc7-timeout/include/linux/buffer_head.h\n--- linux-2.6.27-rc7-xfs/include/linux/buffer_head.h\t2008-09-22 13:11:03.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/include/linux/buffer_head.h\t2008-09-22 15:45:31.000000000 +0900\n@@ -169,8 +169,10 @@ int sync_blockdev(struct block_device *b\n void __wait_on_buffer(struct buffer_head *);\n wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);\n int fsync_bdev(struct block_device *);\n-struct super_block *freeze_bdev(struct block_device *);\n+struct super_block *freeze_bdev(struct block_device *,\n+\t\t\t\tunsigned int timeout_msec);\n int thaw_bdev(struct block_device *, struct super_block *);\n+int thaw_bdev_core(struct block_device *, struct super_block *, int);\n int fsync_super(struct super_block *);\n int fsync_no_super(struct block_device *);\n struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,\ndiff -uprN -X linux-2.6.27-rc7-xfs/Documentation/dontdiff linux-2.6.27-rc7-xfs/include/linux/fs.h linux-2.6.27-rc7-timeo\nut/include/linux/fs.h\n--- linux-2.6.27-rc7-xfs/include/linux/fs.h\t2008-09-22 13:11:03.000000000 +0900\n+++ linux-2.6.27-rc7-timeout/include/linux/fs.h\t2008-09-22 15:45:31.000000000 +0900\n@@ -8,6 +8,7 @@\n \n #include <linux/limits.h>\n #include <linux/ioctl.h>\n+#include <linux/workqueue.h>\n \n /*\n * It's silly to have NR_OPEN bigger than NR_FILE, but you can change\n@@ -228,6 +229,7 @@ extern int dir_notify_enable;\n #define FIGETBSZ _IO(0x00,2)\t/* get the block size used for bmap */\n #define FIFREEZE\t_IOWR('X', 119, int)\t/* Freeze */\n #define FITHAW\t\t_IOWR('X', 120, int)\t/* Thaw */\n+#define\tFIFREEZE_RESET_TIMEOUT\t_IO(0x00, 3)\t/* Reset freeze timeout */\n \n #define\tFS_IOC_GETFLAGS\t\t\t_IOR('f', 1, long)\n #define\tFS_IOC_SETFLAGS\t\t\t_IOW('f', 2, long)\n@@ -581,6 +583,8 @@ struct block_device {\n \tint\t\t\tbd_fsfreeze_count;\n \t/* Mutex for freeze */\n \tstruct mutex\t\tbd_fsfreeze_mutex;\n+\t/* Delayed work for freeze */\n+\tstruct delayed_work\tbd_fsfreeze_timeout;\n };\n \n /*\n@@ -2160,5 +2164,9 @@ int proc_nr_files(struct ctl_table *tabl\n \n int get_filesystem_list(char * buf);\n \n+extern void add_fsfreeze_timeout(struct block_device *bdev,\n+\t\t\t\tunsigned int timeout_msec);\n+extern void fsfreeze_timeout(struct work_struct *work);\n+\n #endif /* __KERNEL__ */\n #endif /* _LINUX_FS_H */\n", "prefixes": [ "10/10" ] }