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 306906 Details for
Bug 447920
GFS2: deadlock running d_io w/ jdata on lock_nolock
[?]
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]
Upstream attempt at a readpage lock ordering fix
readpage-fix.diff (text/plain), 1.75 KB, created by
Steve Whitehouse
on 2008-05-28 09:12:00 UTC
(
hide
)
Description:
Upstream attempt at a readpage lock ordering fix
Filename:
MIME Type:
Creator:
Steve Whitehouse
Created:
2008-05-28 09:12:00 UTC
Size:
1.75 KB
patch
obsolete
>diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c >index 2b556dd..c65257e 100644 >--- a/fs/gfs2/ops_address.c >+++ b/fs/gfs2/ops_address.c >@@ -499,31 +499,41 @@ static int __gfs2_readpage(void *file, struct page *page) > * @file: The file to read > * @page: The page of the file > * >- * This deals with the locking required. We use a trylock in order to >- * avoid the page lock / glock ordering problems returning AOP_TRUNCATED_PAGE >- * in the event that we are unable to get the lock. >+ * This deals with the locking required. We ignore the passed page >+ * and look it up ourselves. We return success only if the page we >+ * found matches the one we were passed and we read it successfully. > */ > > static int gfs2_readpage(struct file *file, struct page *page) > { >- struct gfs2_inode *ip = GFS2_I(page->mapping->host); >+ struct address_space *mapping = page->mapping; >+ struct gfs2_inode *ip = GFS2_I(mapping->host); > struct gfs2_holder gh; >+ unsigned long index = page->index; >+ struct page *page2 = NULL; > int error; > >- gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|LM_FLAG_TRY_1CB, &gh); >+ unlock_page(page); >+ gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &gh); > error = gfs2_glock_nq_atime(&gh); >- if (unlikely(error)) { >- unlock_page(page); >+ if (unlikely(error)) > goto out; >- } >- error = __gfs2_readpage(file, page); >+ error = AOP_TRUNCATED_PAGE; >+ page2 = find_lock_page(mapping, index); >+ if (!page2) >+ goto unlock; >+ error = 0; >+ if (PageUptodate(page2)) >+ unlock_page(page2); >+ else >+ error = __gfs2_readpage(file, page2); >+ page_cache_release(page2); >+unlock: > gfs2_glock_dq(&gh); > out: > gfs2_holder_uninit(&gh); >- if (error == GLR_TRYFAILED) { >- yield(); >+ if (error == 0 && page != page2) > return AOP_TRUNCATED_PAGE; >- } > return error; > } >
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 447920
:
306378
|
306379
|
306427
|
306428
|
306497
|
306817
|
306906
|
307044