Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-613 clio: Client dead-lock during binary exec
[fs/lustre-release.git]
/
lustre
/
llite
/
rw.c
diff --git
a/lustre/llite/rw.c
b/lustre/llite/rw.c
index
fcef728
..
6bc1525
100644
(file)
--- a/
lustre/llite/rw.c
+++ b/
lustre/llite/rw.c
@@
-38,7
+38,6
@@
* Lustre Lite I/O page cache routines shared by different kernel revs
*/
* Lustre Lite I/O page cache routines shared by different kernel revs
*/
-#include <linux/autoconf.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
@@
-74,17
+73,12
@@
* must be called under ->lli_size_sem */
void ll_truncate(struct inode *inode)
{
* must be called under ->lli_size_sem */
void ll_truncate(struct inode *inode)
{
- struct ll_inode_info *lli = ll_i2info(inode);
ENTRY;
ENTRY;
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) to %
Lu\n",
inode->i_ino,
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) to %
llu\n",
inode->i_ino,
inode->i_generation, inode, i_size_read(inode));
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_TRUNC, 1);
inode->i_generation, inode, i_size_read(inode));
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_TRUNC, 1);
- if (lli->lli_size_sem_owner == cfs_current()) {
- LASSERT_SEM_LOCKED(&lli->lli_size_sem);
- ll_inode_size_unlock(inode, 0);
- }
EXIT;
return;
EXIT;
return;
@@
-149,7
+143,6
@@
static struct ll_cl_context *ll_cl_init(struct file *file,
cio = ccc_env_io(env);
io = cio->cui_cl.cis_io;
if (io == NULL && create) {
cio = ccc_env_io(env);
io = cio->cui_cl.cis_io;
if (io == NULL && create) {
- struct vvp_io *vio;
loff_t pos;
/*
loff_t pos;
/*
@@
-157,9
+150,7
@@
static struct ll_cl_context *ll_cl_init(struct file *file,
* methods directly, bypassing file system ->write() operation,
* so cl_io has to be created here.
*/
* methods directly, bypassing file system ->write() operation,
* so cl_io has to be created here.
*/
-
io = ccc_env_thread_io(env);
io = ccc_env_thread_io(env);
- vio = vvp_env_io(env);
ll_io_init(io, file, 1);
/* No lock at all for this kind of IO - we can't do it because
ll_io_init(io, file, 1);
/* No lock at all for this kind of IO - we can't do it because
@@
-1131,7
+1122,7
@@
out_unlock:
return;
}
return;
}
-int ll_writepage(struct page *vmpage, struct writeback_control *
unused
)
+int ll_writepage(struct page *vmpage, struct writeback_control *
wbc
)
{
struct inode *inode = vmpage->mapping->host;
struct lu_env *env;
{
struct inode *inode = vmpage->mapping->host;
struct lu_env *env;
@@
-1178,21
+1169,18
@@
int ll_writepage(struct page *vmpage, struct writeback_control *unused)
cl_2queue_init_page(queue, page);
result = cl_io_submit_rw(env, io, CRT_WRITE,
queue, CRP_NORMAL);
cl_2queue_init_page(queue, page);
result = cl_io_submit_rw(env, io, CRT_WRITE,
queue, CRP_NORMAL);
- cl_page_list_disown(env, io, &queue->c2_qin);
if (result != 0) {
/*
if (result != 0) {
/*
- * There is no need to clear PG_writeback, as
- * cl_io_submit_rw() calls completion callback
- * on failure.
- */
- /*
* Re-dirty page on error so it retries write,
* but not in case when IO has actually
* occurred and completed with an error.
*/
* Re-dirty page on error so it retries write,
* but not in case when IO has actually
* occurred and completed with an error.
*/
- if (!PageError(vmpage))
- set_page_dirty(vmpage);
+ if (!PageError(vmpage)) {
+ redirty_page_for_writepage(wbc, vmpage);
+ result = 0;
+ }
}
}
+ cl_page_list_disown(env, io, &queue->c2_qin);
LASSERT(!cl_page_is_owned(page, io));
lu_ref_del(&page->cp_reference,
"writepage", cfs_current());
LASSERT(!cl_page_is_owned(page, io));
lu_ref_del(&page->cp_reference,
"writepage", cfs_current());