Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (59 commits) ceph: reuse mon subscribe message instead of allocated anew ceph: avoid resending queued message to monitor ceph: Storage class should be before const qualifier ceph: all allocation functions should get gfp_mask ceph: specify max_bytes on readdir replies ceph: cleanup pool op strings ceph: Use kzalloc ceph: use common helper for aborted dir request invalidation ceph: cope with out of order (unsafe after safe) mds reply ceph: save peer feature bits in connection structure ceph: resync headers with userland ceph: use ceph. prefix for virtual xattrs ceph: throw out dirty caps metadata, data on session teardown ceph: attempt mds reconnect if mds closes our session ceph: clean up send_mds_reconnect interface ceph: wait for mds OPEN reply to indicate reconnect success ceph: only send cap releases when mds is OPEN|HUNG ceph: dicard cap releases on mds restart ceph: make mon client statfs handling more generic ceph: drop src address(es) from message header [new protocol feature] ...
This commit is contained in:
commit
6e188240eb
30 changed files with 902 additions and 785 deletions
|
@ -317,16 +317,16 @@ void ceph_release_page_vector(struct page **pages, int num_pages)
|
|||
/*
|
||||
* allocate a vector new pages
|
||||
*/
|
||||
static struct page **alloc_page_vector(int num_pages)
|
||||
struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags)
|
||||
{
|
||||
struct page **pages;
|
||||
int i;
|
||||
|
||||
pages = kmalloc(sizeof(*pages) * num_pages, GFP_NOFS);
|
||||
pages = kmalloc(sizeof(*pages) * num_pages, flags);
|
||||
if (!pages)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
for (i = 0; i < num_pages; i++) {
|
||||
pages[i] = alloc_page(GFP_NOFS);
|
||||
pages[i] = __page_cache_alloc(flags);
|
||||
if (pages[i] == NULL) {
|
||||
ceph_release_page_vector(pages, i);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -540,7 +540,7 @@ static ssize_t ceph_sync_read(struct file *file, char __user *data,
|
|||
* in sequence.
|
||||
*/
|
||||
} else {
|
||||
pages = alloc_page_vector(num_pages);
|
||||
pages = ceph_alloc_page_vector(num_pages, GFP_NOFS);
|
||||
}
|
||||
if (IS_ERR(pages))
|
||||
return PTR_ERR(pages);
|
||||
|
@ -649,8 +649,8 @@ more:
|
|||
do_sync,
|
||||
ci->i_truncate_seq, ci->i_truncate_size,
|
||||
&mtime, false, 2);
|
||||
if (IS_ERR(req))
|
||||
return PTR_ERR(req);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
num_pages = calc_pages_for(pos, len);
|
||||
|
||||
|
@ -668,7 +668,7 @@ more:
|
|||
truncate_inode_pages_range(inode->i_mapping, pos,
|
||||
(pos+len) | (PAGE_CACHE_SIZE-1));
|
||||
} else {
|
||||
pages = alloc_page_vector(num_pages);
|
||||
pages = ceph_alloc_page_vector(num_pages, GFP_NOFS);
|
||||
if (IS_ERR(pages)) {
|
||||
ret = PTR_ERR(pages);
|
||||
goto out;
|
||||
|
@ -809,7 +809,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
|||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_dentry->d_inode;
|
||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
||||
struct ceph_osd_client *osdc = &ceph_client(inode->i_sb)->osdc;
|
||||
struct ceph_osd_client *osdc = &ceph_sb_to_client(inode->i_sb)->osdc;
|
||||
loff_t endoff = pos + iov->iov_len;
|
||||
int got = 0;
|
||||
int ret, err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue