Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 882803 Details for
Bug 1082586
[abrt] BUG: soft lockup - CPU#5 stuck for 22s! [smbd:9182]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- locks: add new i_last_lease_break field to struct inode
0001-locks-add-a-new-i_last_lease_break-field-to-struct-i.patch (text/plain), 3.21 KB, created by
Jeff Layton
on 2014-04-04 17:17:39 UTC
(
hide
)
Description:
patch -- locks: add new i_last_lease_break field to struct inode
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2014-04-04 17:17:39 UTC
Size:
3.21 KB
patch
obsolete
>From 8324c9fd1a15160fd1f98aada97c4df22915915f Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Fri, 4 Apr 2014 07:17:45 -0400 >Subject: [PATCH] locks: add a new i_last_lease_break field to struct inode > >...and use that as a guide as to whether a delegation should be >granted. > >Signed-off-by: Jeff Layton <jlayton@redhat.com> >--- > fs/inode.c | 1 + > fs/locks.c | 40 +++++++++++++++++++++++++--------------- > include/linux/fs.h | 1 + > 3 files changed, 27 insertions(+), 15 deletions(-) > >diff --git a/fs/inode.c b/fs/inode.c >index 4bcdad3c9361..3588667985d7 100644 >--- a/fs/inode.c >+++ b/fs/inode.c >@@ -151,6 +151,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) > inode->i_cdev = NULL; > inode->i_rdev = 0; > inode->dirtied_when = 0; >+ inode->i_last_lease_break = 0; > > if (security_inode_alloc(inode)) > goto out; >diff --git a/fs/locks.c b/fs/locks.c >index 4d2099d0cb39..fa8e0c30c1ce 100644 >--- a/fs/locks.c >+++ b/fs/locks.c >@@ -1390,6 +1390,7 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type) > } > > restart: >+ inode->i_last_lease_break = jiffies; > break_time = flock->fl_break_time; > if (break_time != 0) { > break_time -= jiffies; >@@ -1522,22 +1523,31 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp > int error; > > lease = *flp; >- /* >- * In the delegation case we need mutual exclusion with >- * a number of operations that take the i_mutex. We trylock >- * because delegations are an optional optimization, and if >- * there's some chance of a conflict--we'd rather not >- * bother, maybe that's a sign this just isn't a good file to >- * hand out a delegation on. >- */ >- if (is_deleg && !mutex_trylock(&inode->i_mutex)) >- return -EAGAIN; >+ if (is_deleg) { >+ /* Don't hand out a delegation if we recently broke one. */ >+ if (inode->i_last_lease_break && >+ time_before(jiffies, inode->i_last_lease_break + >+ 2 * lease_break_time)) >+ return -EAGAIN; >+ >+ /* >+ * In the delegation case we need mutual exclusion with >+ * a number of operations that take the i_mutex. We trylock >+ * because delegations are an optional optimization, and if >+ * there's some chance of a conflict--we'd rather not >+ * bother, maybe that's a sign this just isn't a good file to >+ * hand out a delegation on. >+ */ >+ if (!mutex_trylock(&inode->i_mutex)) >+ return -EAGAIN; >+ >+ if (arg == F_WRLCK) { >+ /* Write delegations are not currently supported: */ >+ mutex_unlock(&inode->i_mutex); >+ WARN_ON_ONCE(1); >+ return -EINVAL; >+ } > >- if (is_deleg && arg == F_WRLCK) { >- /* Write delegations are not currently supported: */ >- mutex_unlock(&inode->i_mutex); >- WARN_ON_ONCE(1); >- return -EINVAL; > } > > error = check_conflicting_open(dentry, arg); >diff --git a/include/linux/fs.h b/include/linux/fs.h >index 4aa81e6ae067..ceff64083644 100644 >--- a/include/linux/fs.h >+++ b/include/linux/fs.h >@@ -588,6 +588,7 @@ struct inode { > atomic_t i_writecount; > const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ > struct file_lock *i_flock; >+ unsigned long i_last_lease_break; /* jiffies at last lease break */ > struct address_space i_data; > #ifdef CONFIG_QUOTA > struct dquot *i_dquot[MAXQUOTAS]; >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1082586
:
880725
| 882803