- /*
-@@ -772,7 +772,7 @@ xfs_add_to_ioend(
- if (wpc->ioend)
- list_add(&wpc->ioend->io_list, iolist);
- wpc->ioend = xfs_alloc_ioend(inode, wpc->fork,
-- wpc->imap.br_state, offset, bdev, sector);
-+ wpc->imap.br_state, offset, bdev, sector, wbc);
- }
-
- merged = __bio_try_merge_page(wpc->ioend->io_bio, page, len, poff,
-@@ -783,7 +783,7 @@ xfs_add_to_ioend(
-
- if (!merged) {
- if (bio_full(wpc->ioend->io_bio, len))
-- xfs_chain_bio(wpc->ioend, wbc, bdev, sector);
-+ wpc->ioend->io_bio = xfs_chain_bio(wpc->ioend->io_bio);
- bio_add_page(wpc->ioend->io_bio, page, len, poff);
- }
-
---
-2.20.1
-
-
-Link every newly allocated writeback bio to cgroup pointed to by the
-writeback control structure, and charge every byte written back to it.
-
-Tested-by: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
-Signed-off-by: Christoph Hellwig <hch@lst.de>
----
- fs/xfs/xfs_aops.c | 4 +++-
- fs/xfs/xfs_super.c | 2 ++
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
-index 9cceb90e77c5..73c291aeae17 100644
---- a/fs/xfs/xfs_aops.c
-+++ b/fs/xfs/xfs_aops.c
-@@ -700,6 +700,7 @@ xfs_alloc_ioend(
- bio->bi_iter.bi_sector = sector;
- bio->bi_opf = REQ_OP_WRITE | wbc_to_write_flags(wbc);
- bio->bi_write_hint = inode->i_write_hint;
-+ wbc_init_bio(wbc, bio);
-
- ioend = container_of(bio, struct xfs_ioend, io_inline_bio);
- INIT_LIST_HEAD(&ioend->io_list);
-@@ -727,7 +728,7 @@ xfs_chain_bio(
- struct bio *new;
-
- new = bio_alloc(GFP_NOFS, BIO_MAX_PAGES);
-- bio_copy_dev(new, prev);
-+ bio_copy_dev(new, prev);/* also copies over blkcg information */
- new->bi_iter.bi_sector = bio_end_sector(prev);
- new->bi_opf = prev->bi_opf;
- new->bi_write_hint = prev->bi_write_hint;
-@@ -782,6 +783,7 @@ xfs_add_to_ioend(
+@@ -349,7 +352,8 @@
+ /* FIB should be freed only after getting the response from the F/W */
+ if (status != -ERESTARTSYS)
+ aac_fib_free(fibctx);
+- if (aac_is_src(dev) &&
++ if ((dev->pdev->device == PMC_DEVICE_S7 ||
++ dev->pdev->device == PMC_DEVICE_S8) &&
+ dev->msi_enabled)
+ aac_set_intx_mode(dev);
+ return status;
+@@ -610,7 +614,8 @@
+ dev->max_fib_size = status[1] & 0xFFE0;
+ host->sg_tablesize = status[2] >> 16;
+ dev->sg_tablesize = status[2] & 0xFFFF;
+- if (aac_is_src(dev)) {
++ if (dev->pdev->device == PMC_DEVICE_S7 ||
++ dev->pdev->device == PMC_DEVICE_S8) {
+ if (host->can_queue > (status[3] >> 16) -
+ AAC_NUM_MGT_FIB)
+ host->can_queue = (status[3] >> 16) -
+@@ -629,7 +634,9 @@
+ pr_warn("numacb=%d ignored\n", numacb);