pnfsblock patches
Subsystems (2)
cover pnfsblock patches
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
Peng Tao (9):
pnfsblock: cleanup bl_mark_sectors_init
pnfsblock: acquire im_lock in _preload_range
pnfsblock: move find lock page logic out of bl_write_pagelist
pnfsblock: set read/write tk_status to pnfs_error
pnfsblock: remove rpc_call_ops from struct parallel_io
pnfsblock: clean up _add_entry
pnfsblock: alloc short extent before submit bio
pnfsblock: don't spinlock when freeing block_dev
pnfsblock: limit bio page count
fs/nfs/blocklayout/blocklayout.c | 202 ++++++++++++++++++++++++------------- fs/nfs/blocklayout/blocklayout.h | 12 ++- fs/nfs/blocklayout/extents.c | 176 ++++++++++++++------------------- 3 files changed, 215 insertions(+), 175 deletions(-)
PATCH 1/9 pnfsblock: cleanup bl_mark_sectors_init
It does not need to manipulate on partial initialized blocks. Writeback code takes care of it.
--- fs/nfs/blocklayout/blocklayout.c | 6 +-- fs/nfs/blocklayout/blocklayout.h | 3 +- fs/nfs/blocklayout/extents.c | 76 ++----------------------------------- 3 files changed, 8 insertions(+), 77 deletions(-)
fs/nfs/blocklayout/blocklayout.c +2 -4
@@ -571,8 +571,7 @@ fill_invalid_ext:unlock_page (page); ret =bl_mark_sectors_init (be->be_inval, isect, -PAGE_CACHE_SECTORS , -NULL ); +PAGE_CACHE_SECTORS );if (unlikely (ret)) {dprintk ("%s bl_mark_sectors_init fail %d\n" , __func__, ret);
@@ -621,8 +620,7 @@ next_page: }if (be->be_state ==PNFS_BLOCK_INVALID_DATA ) { ret =bl_mark_sectors_init (be->be_inval, isect, -PAGE_CACHE_SECTORS , -NULL ); +PAGE_CACHE_SECTORS );if (unlikely (ret)) {dprintk ("%s bl_mark_sectors_init fail %d\n" , __func__, ret);
fs/nfs/blocklayout/blocklayout.h +1 -2
@@ -186,8 +186,7 @@ struct pnfs_block_extent * bl_find_get_extent(struct pnfs_block_layout *bl, sector_t isect, struct pnfs_block_extent **cow_read);int bl_mark_sectors_init (struct pnfs_inval_markings *marks, -sector_t offset,sector_t length, -sector_t **pages); +sector_t offset,sector_t length);void bl_put_extent (struct pnfs_block_extent *be);struct pnfs_block_extent *bl_alloc_extent (void );int bl_is_sector_init (struct pnfs_inval_markings *marks,sector_t isect);
fs/nfs/blocklayout/extents.c +5 -71
107 lines not on this page · raw message
Signature · 1 line
1.7.1.262.g5ef3d
PATCH 3/9 pnfsblock: move find lock page logic out of bl_write_pagelist
In reply to Peng TaoAlso avoid unnecessary lock_page if page is handled by others.
--- fs/nfs/blocklayout/blocklayout.c | 78 ++++++++++++++++++++++++++------------ 1 files changed, 54 insertions(+), 24 deletions(-)
fs/nfs/blocklayout/blocklayout.c +54 -24
@@ -484,6 +484,55 @@ cleanup:return ret; } +/* Find or create a zeroing page marked being writeback. +* Return ERR_PTR on error, NULL to indicate skip this page and page itself +* to indicate write out. +*/ +static struct page * +bl_find_get_zeroing_page (struct inode *inode,pgoff_t index, +struct pnfs_block_extent *cow_read) +{ +struct page *page; +int locked =0 ; + page =find_get_page (inode->i_mapping, index); +if (page) + goto check_page; + + page =find_or_create_page (inode->i_mapping, index,GFP_NOFS ); +if (unlikely (!page)) { +dprintk ("%s oom\n" , __func__); +return ERR_PTR (-ENOMEM ); + } + locked =1 ; + +check_page: +/* PageDirty: Other will write this out +* PageWriteback: Other is writing this out +* PageUptodate: It was read before +*/ +if (PageDirty (page) ||PageWriteback (page)) { +print_page (page); +if (locked) +unlock_page (page); +page_cache_release (page); +return NULL ; + } + +if (!locked) { +lock_page (page); + locked =1 ; + goto check_page; + } +if (!PageUptodate (page)) { +/* New page, readin or zero it */ +init_page_for_write (page, cow_read); + } +set_page_writeback (page); +unlock_page (page); + +return page; +} +static enum pnfs_try_status bl_write_pagelist (struct nfs_write_data *wdata,int sync) {
@@ -543,32 +592,13 @@ fill_invalid_ext:dprintk ("%s zero %dth page: index %lu isect %llu\n" , __func__, npg_zero, index, (unsigned long long )isect); - page = -find_or_create_page (wdata->inode->i_mapping, index, -GFP_NOFS ); -if (!page) { -dprintk ("%s oom\n" , __func__); - wdata->pnfs_error = -ENOMEM ; + page =bl_find_get_zeroing_page (wdata->inode, index, + cow_read); +if (unlikely (IS_ERR (page))) { + wdata->pnfs_error =PTR_ERR (page); goto out; - } - -/* PageDirty: Other will write this out -* PageWriteback: Other is writing this out -* PageUptodate: It was read before -* sector_initialized: already written out -*/ -if (PageDirty (page) ||PageWriteback (page)) { -print_page (page); -unlock_page (page); -page_cache_release (page); + }else if (page ==NULL ) goto next_page; - } -if (!PageUptodate (page)) { -/* New page, readin or zero it */ -init_page_for_write (page, cow_read); - } -set_page_writeback (page); -unlock_page (page); ret =bl_mark_sectors_init (be->be_inval, isect,PAGE_CACHE_SECTORS );
Signature · 1 line
1.7.1.262.g5ef3d
PATCH 4/9 pnfsblock: set read/write tk_status to pnfs_error
In reply to Peng TaoTo pass the IO status to upper layer.
--- fs/nfs/blocklayout/blocklayout.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
fs/nfs/blocklayout/blocklayout.c +2 -1
@@ -216,6 +216,7 @@ bl_end_par_io_read(void *data) {struct nfs_read_data *rdata = data; + rdata->task.tk_status = rdata->pnfs_error;INIT_WORK (&rdata->task.u.tk_work, bl_read_cleanup);schedule_work (&rdata->task.u.tk_work); }
@@ -405,7 +406,7 @@ static void bl_end_par_io_write(void *data) {struct nfs_write_data *wdata = data; - wdata->task.tk_status =0 ; + wdata->task.tk_status = wdata->pnfs_error; wdata->verf.committed =NFS_FILE_SYNC ;INIT_WORK (&wdata->task.u.tk_work, bl_write_cleanup);schedule_work (&wdata->task.u.tk_work);
Signature · 1 line
1.7.1.262.g5ef3d
PATCH 5/9 pnfsblock: remove rpc_call_ops from struct parallel_io
In reply to Peng Taoblock layout can just make use of generic read/write_done.
--- fs/nfs/blocklayout/blocklayout.c | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-)
fs/nfs/blocklayout/blocklayout.c +0 -13
@@ -90,7 +90,6 @@ static int is_writable(struct pnfs_block_extent *be, sector_t isect)*/ struct parallel_io {struct kref refcnt; -struct rpc_call_ops call_ops;void (*pnfs_callback) (void *data);void *data; };
@@ -221,14 +220,6 @@ bl_end_par_io_read(void *data)schedule_work (&rdata->task.u.tk_work); } -/* We don't want normal .rpc_call_done callback used, so we replace it -* with this stub. -*/ -static void bl_rpc_do_nothing (struct rpc_task *task,void *calldata) -{ -return ; -} -static enum pnfs_try_status bl_read_pagelist (struct nfs_read_data *rdata) {
@@ -248,8 +239,6 @@ bl_read_pagelist(struct nfs_read_data *rdata) par =alloc_parallel (rdata);if (!par) goto use_mds; - par->call_ops = *rdata->mds_ops; - par->call_ops.rpc_call_done = bl_rpc_do_nothing; par->pnfs_callback = bl_end_par_io_read;/* At this point, we can no longer jump to use_mds */
@@ -559,8 +548,6 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync) par =alloc_parallel (wdata);if (!par)return PNFS_NOT_ATTEMPTED ; - par->call_ops = *wdata->mds_ops; - par->call_ops.rpc_call_done = bl_rpc_do_nothing; par->pnfs_callback = bl_end_par_io_write;/* At this point, have to be more careful with error handling */
Signature · 1 line
1.7.1.262.g5ef3d
PATCH 6/9 pnfsblock: clean up _add_entry
In reply to Peng TaoIt is wrong to kmalloc in _add_entry() as it is inside spinlock. memory should be already allocated _add_entry() is called.
--- fs/nfs/blocklayout/extents.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-)
fs/nfs/blocklayout/extents.c +1 -7
@@ -110,13 +110,7 @@ static int _add_entry(struct my_tree *tree, u64 s, int32_t tag,return 0 ; }else {struct pnfs_inval_tracking *new; -if (storage) - new = storage; -else { - new =kmalloc (sizeof (*new),GFP_NOFS ); -if (!new) -return -ENOMEM ; - } + new = storage; new->it_sector = s; new->it_tags = (1 << tag);list_add (&new->it_link, &pos->it_link);
Signature · 1 line
1.7.1.262.g5ef3d
PATCH 7/9 pnfsblock: alloc short extent before submit bio
In reply to Peng TaoAs discussed earlier, it is better for block client to allocate memory for tracking extents state before submitting bio. So the patch does it by allocating a short_extent for every INVALID extent touched by write pagelist and for every zeroing page we created, saving them in layout header. Then in end_io we can just use them to create commit list items and avoid memory allocation there.
--- fs/nfs/blocklayout/blocklayout.c | 74 ++++++++++++++++++++++++++------- fs/nfs/blocklayout/blocklayout.h | 9 ++++- fs/nfs/blocklayout/extents.c | 85 +++++++++++++++++++++++++++++--------- 3 files changed, 131 insertions(+), 37 deletions(-)
fs/nfs/blocklayout/blocklayout.c +58 -16
@@ -90,8 +90,9 @@ static int is_writable(struct pnfs_block_extent *be, sector_t isect)*/ struct parallel_io {struct kref refcnt; -void (*pnfs_callback) (void *data); +void (*pnfs_callback) (void *data,int num_se);void *data; +int bse_count; };static inline struct parallel_io *alloc_parallel (void *data)
@@ -102,6 +103,7 @@ static inline struct parallel_io *alloc_parallel(void *data)if (rv) { rv->data = data;kref_init (&rv->refcnt); + rv->bse_count =0 ; }return rv; }
@@ -116,7 +118,7 @@ static void destroy_parallel(struct kref *kref) struct parallel_io *p = container_of(kref, struct parallel_io, refcnt);dprintk ("%s enter\n" , __func__); - p->pnfs_callback (p->data); + p->pnfs_callback (p->data, p->bse_count);kfree (p); }
@@ -211,7 +213,7 @@ static void bl_read_cleanup(struct work_struct *work) }static void -bl_end_par_io_read (void *data) +bl_end_par_io_read (void *data,int unused) {struct nfs_read_data *rdata = data;
@@ -312,6 +314,7 @@ static void mark_extents_written(struct pnfs_block_layout *bl, {sector_t isect, end;struct pnfs_block_extent *be; +struct pnfs_block_short_extent *se;dprintk ("%s(%llu, %u)\n" , __func__, offset, count);if (count ==0 )
@@ -324,8 +327,11 @@ static void mark_extents_written(struct pnfs_block_layout *bl, be =bl_find_get_extent (bl, isect,NULL );BUG_ON (!be);/* FIXME */ len =min (end, be->be_f_offset + be->be_length) - isect; -if (be->be_state ==PNFS_BLOCK_INVALID_DATA ) -bl_mark_for_commit (be, isect, len);/* What if fails? */ +if (be->be_state ==PNFS_BLOCK_INVALID_DATA ) { + se =bl_pop_one_short_extent (be->be_inval); +BUG_ON (!se); +bl_mark_for_commit (be, isect, len, se); + } isect += len;bl_put_extent (be); }
@@ -347,7 +353,8 @@ static void bl_end_io_write_zero(struct bio *bio, int err)end_page_writeback (page);page_cache_release (page); }while (bvec >= bio->bi_io_vec); -if (!uptodate) { + +if (unlikely (!uptodate)) {if (!wdata->pnfs_error) wdata->pnfs_error = -EIO ;pnfs_set_lo_fail (wdata->lseg);
@@ -356,7 +363,6 @@ static void bl_end_io_write_zero(struct bio *bio, int err)put_parallel (par); } -/* This is basically copied from mpage_end_io_read */ static void bl_end_io_write (struct bio *bio,int err) {struct parallel_io *par = bio->bi_private;
@@ -382,7 +388,7 @@ static void bl_write_cleanup(struct work_struct *work)dprintk ("%s enter\n" , __func__); task = container_of(work, struct rpc_task, u.tk_work); wdata = container_of(task, struct nfs_write_data, task); -if (!wdata->pnfs_error) { +if (likely (!wdata->pnfs_error)) {/* Marks for LAYOUTCOMMIT */ mark_extents_written (BLK_LSEG2EXT (wdata->lseg), wdata->args.offset, wdata->args.count);
@@ -391,10 +397,15 @@ static void bl_write_cleanup(struct work_struct *work) }/* Called when last of bios associated with a bl_write_pagelist call finishes */ -static void bl_end_par_io_write (void *data) +static void bl_end_par_io_write (void *data,int num_se) {struct nfs_write_data *wdata = data; +if (unlikely (wdata->pnfs_error)) { +bl_free_short_extents (&BLK_LSEG2EXT (wdata->lseg)->bl_inval, + num_se); + } + wdata->task.tk_status = wdata->pnfs_error; wdata->verf.committed =NFS_FILE_SYNC ;INIT_WORK (&wdata->task.u.tk_work, bl_write_cleanup);
@@ -547,7 +558,7 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync)*/ par =alloc_parallel (wdata);if (!par) -return PNFS_NOT_ATTEMPTED ; + goto out_mds; par->pnfs_callback = bl_end_par_io_write;/* At this point, have to be more careful with error handling */
@@ -555,12 +566,15 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync) be =bl_find_get_extent (BLK_LSEG2EXT (wdata->lseg), isect, &cow_read);if (!be || !is_writable (be, isect)) {dprintk ("%s no matching extents!\n" , __func__); - wdata->pnfs_error = -EINVAL ; - goto out; + goto out_mds; }/* First page inside INVALID extent */ if (be->be_state ==PNFS_BLOCK_INVALID_DATA ) { +if (likely (!bl_push_one_short_extent (be->be_inval))) + par->bse_count++; +else + goto out_mds; temp = offset >>PAGE_CACHE_SHIFT ; npg_zero =do_div (temp, npg_per_block); isect = (sector_t) (((offset - npg_zero * PAGE_CACHE_SIZE) &
@@ -598,6 +612,19 @@ fill_invalid_ext: wdata->pnfs_error = ret; goto out; } +if (likely (!bl_push_one_short_extent (be->be_inval))) + par->bse_count++; +else { +end_page_writeback (page); +page_cache_release (page); + wdata->pnfs_error = -ENOMEM ; + goto out; + } +/* FIXME: This should be done in bi_end_io */ +mark_extents_written (BLK_LSEG2EXT (wdata->lseg), + page->index <<PAGE_CACHE_SHIFT , +PAGE_CACHE_SIZE ); + bio =bl_add_page_to_bio (bio, npg_zero,WRITE , isect, page, be, bl_end_io_write_zero, par);
@@ -606,10 +633,6 @@ fill_invalid_ext: bio =NULL ; goto out; } -/* FIXME: This should be done in bi_end_io */ -mark_extents_written (BLK_LSEG2EXT (wdata->lseg), - page->index <<PAGE_CACHE_SHIFT , -PAGE_CACHE_SIZE ); next_page: isect +=PAGE_CACHE_SECTORS ; extent_length -=PAGE_CACHE_SECTORS ;
@@ -633,6 +656,15 @@ next_page: wdata->pnfs_error = -EINVAL ; goto out; } +if (be->be_state ==PNFS_BLOCK_INVALID_DATA ) { +if (likely (!bl_push_one_short_extent ( + be->be_inval))) + par->bse_count++; +else { + wdata->pnfs_error = -ENOMEM ; + goto out; + } + } extent_length = be->be_length - (isect - be->be_f_offset); }
@@ -680,6 +712,10 @@ out:bl_submit_bio (WRITE , bio);put_parallel (par);return PNFS_ATTEMPTED ; +out_mds: +bl_put_extent (be); +kfree (par); +return PNFS_NOT_ATTEMPTED ; }/* FIXME - range ignored */
@@ -706,11 +742,17 @@ static void release_inval_marks(struct pnfs_inval_markings *marks) {struct pnfs_inval_tracking *pos, *temp; +struct pnfs_block_short_extent *se, *stemp;list_for_each_entry_safe (pos, temp, &marks->im_tree.mtt_stub, it_link) {list_del (&pos->it_link);kfree (pos); } + +list_for_each_entry_safe (se, stemp, &marks->im_extents, bse_node) { +list_del (&se->bse_node); +kfree (se); + }return ; }
fs/nfs/blocklayout/blocklayout.h +8 -1
@@ -70,6 +70,7 @@ struct pnfs_inval_markings {spinlock_t im_lock;struct my_tree im_tree;/* Sectors that need LAYOUTCOMMIT */ sector_t im_block_size;/* Server blocksize in sectors */ +struct list_head im_extents;/* Short extents for INVAL->RW conversion */ };struct pnfs_inval_tracking {
@@ -105,6 +106,7 @@ BL_INIT_INVAL_MARKS(struct pnfs_inval_markings *marks, sector_t blocksize) {spin_lock_init (&marks->im_lock);INIT_LIST_HEAD (&marks->im_tree.mtt_stub); +INIT_LIST_HEAD (&marks->im_extents); marks->im_block_size = blocksize; marks->im_tree.mtt_step_size =min ((sector_t )PAGE_CACHE_SECTORS , blocksize);
@@ -199,6 +201,11 @@ void clean_pnfs_block_layoutupdate(struct pnfs_block_layout *bl,int bl_add_merge_extent (struct pnfs_block_layout *bl,struct pnfs_block_extent *new);int bl_mark_for_commit (struct pnfs_block_extent *be, -sector_t offset,sector_t length); +sector_t offset,sector_t length, +struct pnfs_block_short_extent *new); +int bl_push_one_short_extent (struct pnfs_inval_markings *marks); +struct pnfs_block_short_extent * +bl_pop_one_short_extent (struct pnfs_inval_markings *marks); +void bl_free_short_extents (struct pnfs_inval_markings *marks,int num_to_free);#endif /* FS_NFS_NFS4BLOCKLAYOUT_H */
fs/nfs/blocklayout/extents.c +65 -20
149 lines not on this page · raw message
Signature · 1 line
1.7.1.262.g5ef3d
Peng Tao wrote:
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
Patches 2/9 and 8/9 are missing again. I wonder why these particular patches are getting filtered out?
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jim Rees
Sent: Wednesday, November 30, 2011 2:44 AM
To: Peng Tao
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 0/9] pnfsblock patchesPeng Tao wrote:
Quoted 7 lines
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
Patches 2/9 and 8/9 are missing again. I wonder why these particular patches are getting filtered out?
I have received these patches in both my gmail box and emc mail box. So I guess vger dropped them, again... Somehow it thinks I'm a spammer? I attached 2/9, 8/9, 9/9 here...
Thanks,
Tao
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From d289ab2f6174316374641a87fa5d4c0c9c30203b Mon Sep 17 00:00:00 2001
From: Peng Tao <[email protected]>
Date: Wed, 2 Nov 2011 01:11:14 -0400
Subject: [PATCH 2/9] pnfsblock: acquire im_lock in _preload_range
When calling _add_entry, we should take the im_lock to protect agains other modifiers.
--- fs/nfs/blocklayout/extents.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
fs/nfs/blocklayout/extents.c +6 -5
@@ -139,11 +139,13 @@ static int _set_range(struct my_tree *tree, int32_t tag, u64 s, u64 length) }/* Ensure that future operations on given range of tree will not malloc */ -static int _preload_range (struct my_tree *tree,u64 offset,u64 length) +static int _preload_range (struct pnfs_inval_markings *marks, +u64 offset,u64 length) {u64 start, end, s;int count, i, used =0 , status = -ENOMEM ;struct pnfs_inval_tracking **storage; +struct my_tree *tree = &marks->im_tree;dprintk ("%s(%llu, %llu) enter\n" , __func__, offset, length); start =normalize (offset, tree->mtt_step_size);
@@ -161,12 +163,11 @@ static int _preload_range(struct my_tree *tree, u64 offset, u64 length) goto out_cleanup; } -/* Now need lock - HOW??? */ - +spin_lock (&marks->im_lock);for (s = start; s < end; s += tree->mtt_step_size) used +=_add_entry (tree, s,INTERNAL_EXISTS , storage[used]); +spin_unlock (&marks->im_lock); -/* Unlock - HOW??? */ status =0 ; out_cleanup:
@@ -246,7 +247,7 @@ int bl_mark_sectors_init(struct pnfs_inval_markings *marks, start =normalize (offset, marks->im_block_size); end =normalize_up (offset + length, marks->im_block_size); -if (_preload_range (&marks->im_tree, start, end - start)) +if (_preload_range (marks, start, end - start)) goto outerr;spin_lock (&marks->im_lock);
Signature · 1 line
1.7.4.2
From ae38b3ab081b76f10767d08e34e92a0c89fab842 Mon Sep 17 00:00:00 2001
From: Peng Tao <[email protected]>
Date: Thu, 10 Nov 2011 02:45:44 -0500
Subject: [PATCH 8/9] pnfsblock: don't spinlock when freeing block_dev
bl_free_block_dev() may sleep. We can not call it with spinlock held. Besides, there is no need to take bm_lock as we are last user freeing bm_devlist.
--- fs/nfs/blocklayout/blocklayout.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-)
fs/nfs/blocklayout/blocklayout.c +4 -7
@@ -837,16 +837,13 @@ bl_cleanup_layoutcommit(struct nfs4_layoutcommit_data *lcdata)static void free_blk_mountid (struct block_mount_id *mid) {if (mid) { -struct pnfs_block_dev *dev; -spin_lock (&mid->bm_lock); -while (!list_empty (&mid->bm_devlist)) { - dev =list_first_entry (&mid->bm_devlist, - struct pnfs_block_dev, - bm_node); +struct pnfs_block_dev *dev, *tmp; + +/* No need to take bm_lock as we are last user freeing bm_devlist */ +list_for_each_entry_safe (dev, tmp, &mid->bm_devlist, bm_node) {list_del (&dev->bm_node);bl_free_block_dev (dev); } -spin_unlock (&mid->bm_lock);kfree (mid); } }
Signature · 1 line
1.7.4.2
From faa4ce324687b87c37f993c219d15061072ad6a6 Mon Sep 17 00:00:00 2001
From: Peng Tao <[email protected]>
Date: Sat, 19 Nov 2011 04:16:52 -0500
Subject: [PATCH 9/9] pnfsblock: limit bio page count
One bio can have at most BIO_MAX_PAGES pages. We should limit it bec otherwise bio_alloc will fail when there are many pages in one read/write_pagelist.
--- fs/nfs/blocklayout/blocklayout.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-)
fs/nfs/blocklayout/blocklayout.c +11 -6
@@ -147,14 +147,19 @@ static struct bio *bl_alloc_init_bio(int npg, sector_t isect, {struct bio *bio; + npg =min (npg,BIO_MAX_PAGES ); bio =bio_alloc (GFP_NOIO , npg); -if (!bio) -return NULL ; +if (!bio && (current->flags &PF_MEMALLOC )) { +while (!bio && (npg /=2 )) + bio =bio_alloc (GFP_NOIO , npg); + } - bio->bi_sector = isect - be->be_f_offset + be->be_v_offset; - bio->bi_bdev = be->be_mdev; - bio->bi_end_io = end_io; - bio->bi_private = par; +if (bio) { + bio->bi_sector = isect - be->be_f_offset + be->be_v_offset; + bio->bi_bdev = be->be_mdev; + bio->bi_end_io = end_io; + bio->bi_private = par; + }return bio; }
Signature · 1 line
1.7.4.2
Benny Halevy
AppliedI merged patches 8 and 9 into my tree
Benny
Quoted 26 lines · On 2011-11-30 04:37, [email protected] wrote:
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jim Rees
Sent: Wednesday, November 30, 2011 2:44 AM
To: Peng Tao
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 0/9] pnfsblock patchesPeng Tao wrote:
Quoted 7 lines
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
Patches 2/9 and 8/9 are missing again. I wonder why these particular patches are getting filtered out?
I have received these patches in both my gmail box and emc mail box. So I guess vger dropped them, again... Somehow it thinks I'm a spammer? I attached 2/9, 8/9, 9/9 here...
Thanks,
TaoQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Benny Halevy
I merged patches 8 and 9 into my tree
Thanks!
Quoted 29 lines
Benny
Quoted 26 lines · On 2011-11-30 04:37, [email protected] wrote:
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jim Rees
Sent: Wednesday, November 30, 2011 2:44 AM
To: Peng Tao
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 0/9] pnfsblock patchesPeng Tao wrote:
Quoted 7 lines
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
Patches 2/9 and 8/9 are missing again. I wonder why these particular patches are getting filtered out?
I have received these patches in both my gmail box and emc mail box. So I guess vger dropped them, again... Somehow it thinks I'm a spammer? I attached 2/9, 8/9, 9/9 here...
Thanks,
TaoQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Peng Tao
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
I never got 9 patches in the mail.
I only have 1,3,4,5,6,7
Do you have them on a gitweb, or re-post 2,8,9
Thanks
Boaz
Quoted 20 lines
Peng Tao (9):
pnfsblock: cleanupbl_mark_sectors_init
pnfsblock: acquireim_lockin_preload_range
pnfsblock: move find lock page logic out ofbl_write_pagelist
pnfsblock: set read/writetk_statustopnfs_error
pnfsblock: removerpc_call_opsfrom structparallel_io
pnfsblock: clean up_add_entry
pnfsblock: alloc short extent before submit bio
pnfsblock: don't spinlock when freeingblock_dev
pnfsblock: limit bio page countfs/nfs/blocklayout/blocklayout.c | 202 ++++++++++++++++++++++++------------- fs/nfs/blocklayout/blocklayout.h | 12 ++- fs/nfs/blocklayout/extents.c | 176 ++++++++++++++------------------- 3 files changed, 215 insertions(+), 175 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Boaz Harrosh wrote:
Quoted 5 lines · Peng Tao
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
I never got 9 patches in the mail.
I only have 1,3,4,5,6,7
Do you have them on a gitweb, or re-post 2,8,9
1-7 are in benny's tree:
% git log --oneline -7 benny/pnfs-block
ec11faf pnfsblock: alloc short extent before submit bio 7c93c37 pnfsblock: clean up _add_entry
85e8c84 pnfsblock: remove rpc_call_ops from struct parallel_io ab0c07d pnfsblock: set read/write tk_status to pnfs_error 60d5135 pnfsblock: move find lock page logic out of bl_write_pagelist 657c2f4 pnfsblock: acquire im_lock in _preload_range e5b35df pnfsblock: cleanup bl_mark_sectors_init
I never saw 8,9 and can't find them in the list archive.
Quoted 26 lines · Jim Rees
Boaz Harrosh wrote:
Quoted 5 lines · Peng Tao
Hi, Trond,
Following are some bugfix and improvements for blocklayout driver. All have been sent to the list before and have been tested for several weeks.
I never got 9 patches in the mail.
I only have 1,3,4,5,6,7
Do you have them on a gitweb, or re-post 2,8,9
1-7 are in benny's tree:
% git log --oneline -7 benny/pnfs-block
ec11faf pnfsblock: alloc short extent before submit bio 7c93c37 pnfsblock: clean up_add_entry
85e8c84 pnfsblock: removerpc_call_opsfrom structparallel_ioab0c07d pnfsblock: set read/writetk_statustopnfs_error60d5135 pnfsblock: move find lock page logic out ofbl_write_pagelist657c2f4 pnfsblock: acquireim_lockin_preload_rangee5b35df pnfsblock: cleanupbl_mark_sectors_init
Quoted 1 line
I never saw 8,9 and can't find them in the list archive.
Actually I wanted 9. I'm old and senile but I did not remember I ever saw it so I was wondering.
We know their names from [0/9]:
pnfsblock: don't spinlock when freeing block_dev
pnfsblock: limit bio page count
Thanks
Heart
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBsaW51eC1uZnMtb3duZXJAdmdl ci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtbmZzLW93bmVyQHZnZXIua2VybmVsLm9yZ10gT24g QmVoYWxmIE9mIEJvYXoNCj4gSGFycm9zaA0KPiBTZW50OiBXZWRuZXNkYXksIE5vdmVtYmVyIDMw LCAyMDExIDc6NDAgQU0NCj4gVG86IEppbSBSZWVzDQo+IENjOiBQZW5nIFRhbzsgVHJvbmQuTXlr bGVidXN0QG5ldGFwcC5jb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