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-11838 llite: remove assert for acl refcount
[fs/lustre-release.git]
/
lustre
/
llite
/
vvp_page.c
diff --git
a/lustre/llite/vvp_page.c
b/lustre/llite/vvp_page.c
index
47d4863
..
064e86e
100644
(file)
--- a/
lustre/llite/vvp_page.c
+++ b/
lustre/llite/vvp_page.c
@@
-23,7
+23,7
@@
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 201
6
, Intel Corporation.
+ * Copyright (c) 2011, 201
7
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-54,16
+54,22
@@
*
*/
*
*/
-static void vvp_page_fini_common(struct vvp_page *vpg)
+static void vvp_page_fini_common(struct vvp_page *vpg
, struct pagevec *pvec
)
{
struct page *vmpage = vpg->vpg_page;
LASSERT(vmpage != NULL);
{
struct page *vmpage = vpg->vpg_page;
LASSERT(vmpage != NULL);
- put_page(vmpage);
+ if (pvec) {
+ if (!pagevec_add(pvec, vmpage))
+ pagevec_release(pvec);
+ } else {
+ put_page(vmpage);
+ }
}
static void vvp_page_fini(const struct lu_env *env,
}
static void vvp_page_fini(const struct lu_env *env,
- struct cl_page_slice *slice)
+ struct cl_page_slice *slice,
+ struct pagevec *pvec)
{
struct vvp_page *vpg = cl2vvp_page(slice);
struct page *vmpage = vpg->vpg_page;
{
struct vvp_page *vpg = cl2vvp_page(slice);
struct page *vmpage = vpg->vpg_page;
@@
-73,7
+79,7
@@
static void vvp_page_fini(const struct lu_env *env,
* VPG_FREEING state.
*/
LASSERT((struct cl_page *)vmpage->private != slice->cpl_page);
* VPG_FREEING state.
*/
LASSERT((struct cl_page *)vmpage->private != slice->cpl_page);
- vvp_page_fini_common(vpg);
+ vvp_page_fini_common(vpg
, pvec
);
}
static int vvp_page_own(const struct lu_env *env,
}
static int vvp_page_own(const struct lu_env *env,
@@
-242,8
+248,8
@@
static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int ioret
else
set_bit(AS_EIO, &inode->i_mapping->flags);
else
set_bit(AS_EIO, &inode->i_mapping->flags);
- if ((ioret == -ESHUTDOWN || ioret == -EINTR
) &&
- obj->vob_discard_page_warned == 0) {
+ if ((ioret == -ESHUTDOWN || ioret == -EINTR
||
+
ioret == -EIO) &&
obj->vob_discard_page_warned == 0) {
obj->vob_discard_page_warned = 1;
ll_dirty_page_discard_warn(vmpage, ioret);
}
obj->vob_discard_page_warned = 1;
ll_dirty_page_discard_warn(vmpage, ioret);
}
@@
-269,8
+275,14
@@
static void vvp_page_completion_read(const struct lu_env *env,
if (ioret == 0) {
if (!vpg->vpg_defer_uptodate)
cl_page_export(env, page, 1);
if (ioret == 0) {
if (!vpg->vpg_defer_uptodate)
cl_page_export(env, page, 1);
- } else {
+ } else
if (vpg->vpg_defer_uptodate)
{
vpg->vpg_defer_uptodate = 0;
vpg->vpg_defer_uptodate = 0;
+ if (ioret == -EWOULDBLOCK) {
+ /* mirror read failed, it needs to destroy the page
+ * because subpage would be from wrong osc when trying
+ * to read from a new mirror */
+ ll_invalidate_page(vmpage);
+ }
}
if (page->cp_sync_io == NULL)
}
if (page->cp_sync_io == NULL)
@@
-484,13
+496,14
@@
vvp_transient_page_completion(const struct lu_env *env,
}
static void vvp_transient_page_fini(const struct lu_env *env,
}
static void vvp_transient_page_fini(const struct lu_env *env,
- struct cl_page_slice *slice)
+ struct cl_page_slice *slice,
+ struct pagevec *pvec)
{
struct vvp_page *vpg = cl2vvp_page(slice);
struct cl_page *clp = slice->cpl_page;
struct vvp_object *clobj = cl2vvp(clp->cp_obj);
{
struct vvp_page *vpg = cl2vvp_page(slice);
struct cl_page *clp = slice->cpl_page;
struct vvp_object *clobj = cl2vvp(clp->cp_obj);
- vvp_page_fini_common(vpg);
+ vvp_page_fini_common(vpg
, pvec
);
atomic_dec(&clobj->vob_transient_pages);
}
atomic_dec(&clobj->vob_transient_pages);
}