- clear page cache after eviction (2766)
- deal with strange write() on x86-64 (3043)
- don't dereference NULL peer_ni in ldlm_handle_ast_error (3258)
- - clear page->private before handing to FS (3119)
+ - clear page->private before handing to FS, better assertion (3119)
- tune the read pipeline (3236)
* miscellania
- drop scimac NAL (unmaintained)
int ll_readpage(struct file *file, struct page *page);
struct ll_async_page *llap_from_cookie(void *cookie);
struct ll_async_page *llap_from_page(struct page *page);
+struct ll_async_page *llap_cast_private(struct page *page);
void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras);
void ll_truncate(struct inode *inode);
int rc = 0;
ENTRY;
- if (!PageLocked(page))
- LBUG();
+ LASSERT(PageLocked(page));
+ (void)llap_cast_private(page); /* assertion */
/* Check to see if we should return -EIO right away */
pga.pg = page;
.ap_completion = ll_ap_completion,
};
+struct ll_async_page *llap_cast_private(struct page *page)
+{
+ struct ll_async_page *llap = (struct ll_async_page *)page->private;
+
+ LASSERTF(llap == NULL || llap->llap_magic == LLAP_MAGIC,
+ "page %p private %lu gave magic %d which != %d\n",
+ page, page->private, llap->llap_magic, LLAP_MAGIC);
+
+ return llap;
+}
+
/* XXX have the exp be an argument? */
struct ll_async_page *llap_from_page(struct page *page)
{
int rc;
ENTRY;
- llap = (struct ll_async_page *)page->private;
- if (llap != NULL) {
- if (llap->llap_magic != LLAP_MAGIC)
- RETURN(ERR_PTR(-EINVAL));
+ llap = llap_cast_private(page);
+ if (llap != NULL)
RETURN(llap);
- }
exp = ll_i2obdexp(page->mapping->host);
if (exp == NULL)