search for: bi_end_io

Displaying 20 results from an estimated 33 matches for "bi_end_io".

2011 Apr 05
0
[PATCH] Btrfs: don't split dio bios if we don't have to
...fs/inode.c @@ -5960,13 +5960,6 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, u32 *csums = dip->csums; int ret = 0; - bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS); - if (!bio) - return -ENOMEM; - bio->bi_private = dip; - bio->bi_end_io = btrfs_end_dio_bio; - atomic_inc(&dip->pending_bios); - map_length = orig_bio->bi_size; ret = btrfs_map_block(map_tree, READ, start_sector << 9, &map_length, NULL, 0); @@ -5975,6 +5968,18 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip...
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
...56,10 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; bio = compressed_bio_alloc(bdev, first_byte, GFP_NOFS); + if (!bio) { + kfree(cb); + return -ENOMEM; + } bio->bi_private = cb; bio->bi_end_io = end_compressed_bio_write; atomic_inc(&cb->pending_bios); diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 565e22d..aed16f4 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6931,6 +6931,8 @@ static noinline int get_new_locations(struct inode *reloc_in...
2011 Feb 15
1
[PATCH] Btrfs: fix uncheck memory allocations
...356,10 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; bio = compressed_bio_alloc(bdev, first_byte, GFP_NOFS); + if(!bio) { + kfree(cb); + return -ENOMEM; + } bio->bi_private = cb; bio->bi_end_io = end_compressed_bio_write; atomic_inc(&cb->pending_bios); diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a7aaa10..3c6d0f2 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6931,6 +6931,10 @@ static noinline int get_new_locations(struct inode *reloc_i...
2014 Jun 29
2
virt_blk BUG: sleeping function called from invalid context
...nel.org> > Date: Wed Apr 9 11:07:31 2014 -0400 > > kernfs: make kernfs_notify() trigger inotify events too > > Tejun, what do you think? > > Josh, Brian, could you try reverting that commit to see if it helps? That definitely be a bug. If you need to block off ->bi_end_io(), just must punt to a worker thread. -- Jens Axboe
2014 Jun 29
2
virt_blk BUG: sleeping function called from invalid context
...nel.org> > Date: Wed Apr 9 11:07:31 2014 -0400 > > kernfs: make kernfs_notify() trigger inotify events too > > Tejun, what do you think? > > Josh, Brian, could you try reverting that commit to see if it helps? That definitely be a bug. If you need to block off ->bi_end_io(), just must punt to a worker thread. -- Jens Axboe
2014 Jun 30
0
virt_blk BUG: sleeping function called from invalid context
...:31 2014 -0400 > > > > kernfs: make kernfs_notify() trigger inotify events too > > > > Tejun, what do you think? > > > > Josh, Brian, could you try reverting that commit to see if it helps? > > That definitely be a bug. If you need to block off ->bi_end_io(), just > must punt to a worker thread. Ugh... didn't realize we had users triggering sysfs notifications from an atomic context. fsnotify support requires sleepable context. Guess I'll have to punt it to a work item. :( Thanks. -- tejun
2016 Jun 13
1
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
...let it though before starting on this new sync request. + */ + if (conf->nr_waiting) + schedule_timeout_uninterruptible(1); + /* Again, very different code for resync and recovery. * Both must result in an r10bio with a list of bios that * have bi_end_io, bi_sector, bi_bdev set, -- 1.8.3.1
2014 Jun 29
2
virt_blk BUG: sleeping function called from invalid context
On Sun, Jun 29, 2014 at 11:26:37AM +0300, Michael S. Tsirkin wrote: > On Fri, Jun 27, 2014 at 07:57:38AM -0400, Josh Boyer wrote: > > Hi All, > > > > We've had a report[1] of the virt_blk driver causing a lot of spew > > because it's calling a sleeping function from an invalid context. The > > backtrace is below. This is with kernel
2014 Jun 29
2
virt_blk BUG: sleeping function called from invalid context
On Sun, Jun 29, 2014 at 11:26:37AM +0300, Michael S. Tsirkin wrote: > On Fri, Jun 27, 2014 at 07:57:38AM -0400, Josh Boyer wrote: > > Hi All, > > > > We've had a report[1] of the virt_blk driver causing a lot of spew > > because it's calling a sleeping function from an invalid context. The > > backtrace is below. This is with kernel
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + pl_len = iov_nr * sizeof(req->pl[0]); + page_len = pages_nr_total * sizeof(struct page *); + bio_len = pages_nr_total * sizeof(struct bio *); + + buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL); + if (!buf) + r...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + pl_len = iov_nr * sizeof(req->pl[0]); + page_len = pages_nr_total * sizeof(struct page *); + bio_len = pages_nr_total * sizeof(struct bio *); + + buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL); + if (!buf) + r...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + req->pl = kmalloc((iov_nr * sizeof(struct req_page_list)) + + (pages_nr_total * sizeof(struct page *)) + + (pages_nr_total * sizeof(struct bio *)), + GFP_KERNEL); + if (!req->pl) + return -ENOMEM; + pag...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + req->pl = kmalloc((iov_nr * sizeof(struct req_page_list)) + + (pages_nr_total * sizeof(struct page *)) + + (pages_nr_total * sizeof(struct bio *)), + GFP_KERNEL); + if (!req->pl) + return -ENOMEM; + pag...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + req->pl = kmalloc((iov_nr * sizeof(struct req_page_list)) + + (pages_nr_total * sizeof(struct page *)) + + (pages_nr_total * sizeof(struct bio *)), + GFP_KERNEL); + if (!req->pl) + return -ENOMEM; + pag...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...LUSH)) { + req->pl = NULL; + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL); + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) { + kfree(req->bio); + return -ENOMEM; + } + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + req->pl = kmalloc((iov_nr * sizeof(struct req_page_list)) + + (pages_nr_total * sizeof(struct page *)) + + (pages_nr_total * sizeof(struct bio *)), + GFP_KERNEL); + if (!req->pl) + return -ENOMEM; + pag...
2016 Jun 01
2
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
Kelly Lesperance wrote: > I did some additional testing - I stopped Kafka on the host, and kicked > off a disk check, and it ran at the expected speed overnight. I started > kafka this morning, and the raid check's speed immediately dropped down to > ~2000K/Sec. > > I then enabled the write-back cache on the drives (hdparm -W1 /dev/sd*). > The raid check is now running
2010 May 12
0
[PATCH 2/4] direct-io: add a hook for the fs to provide its own submit_bio function V3
..._bio_end_aio(bio, error); + else + dio_bio_end_io(bio, error); +} +EXPORT_SYMBOL_GPL(dio_end_io); + static int dio_bio_alloc(struct dio *dio, struct block_device *bdev, sector_t first_sector, int nr_vecs) @@ -316,6 +330,7 @@ dio_bio_alloc(struct dio *dio, struct block_device *bdev, bio->bi_end_io = dio_bio_end_io; dio->bio = bio; + dio->logical_offset_in_bio = dio->cur_page_fs_offset; return 0; } @@ -340,10 +355,15 @@ static void dio_bio_submit(struct dio *dio) if (dio->is_async && dio->rw == READ) bio_set_pages_dirty(bio); - submit_bio(dio->rw, bio...
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2: - Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged operation - Cast u64 to unsigned long long for printf() Changes v2-v3: - Rebased on Chris'' current master Changes v3-v4: - Add padding at end of ioctl structure Changes v4-v5: - The statistic members in the ioctl are now organized as an array of 64 bit values. Symbolic names for the array indexes
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...>write == WRITE_FLUSH)) { + req->use_inline = true; + req->pl = NULL; + req->bio = req->inline_bio; + + bio = bio_alloc(GFP_KERNEL, 1); + if (!bio) + return -ENOMEM; + + bio->bi_sector = req->sector; + bio->bi_bdev = bdev; + bio->bi_private = req; + bio->bi_end_io = vhost_blk_req_done; + req->bio[bio_nr++] = bio; + + goto out; + } + + if (pages_nr_total > NR_INLINE) { + int pl_len, page_len, bio_len; + + req->use_inline = false; + pl_len = iov_nr * sizeof(req->pl[0]); + page_len = pages_nr_total * sizeof(struct page *); + bio_len = pages_...