Re: [PATCH 3/3] i2c:support new register set for ast2600
by kernel test robot
Hi Jamin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on robh/for-next joel-aspeed/for-next v5.13-rc6 next-20210617]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jamin-Lin/Support-ASPEED-AST2600...
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/8d16cf8cbc5d3dccd05c23dd7c4744a08...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jamin-Lin/Support-ASPEED-AST2600-I2C/20210617-174709
git checkout 8d16cf8cbc5d3dccd05c23dd7c4744a0890e356f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-new-aspeed.c:542:6: warning: no previous prototype for 'aspeed_i2c_slave_packet_irq' [-Wmissing-prototypes]
542 | void aspeed_i2c_slave_packet_irq(struct aspeed_new_i2c_bus *i2c_bus, u32 sts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-new-aspeed.c:827:6: warning: no previous prototype for 'aspeed_i2c_slave_byte_irq' [-Wmissing-prototypes]
827 | void aspeed_i2c_slave_byte_irq(struct aspeed_new_i2c_bus *i2c_bus, u32 sts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-new-aspeed.c:883:5: warning: no previous prototype for 'aspeed_new_i2c_slave_irq' [-Wmissing-prototypes]
883 | int aspeed_new_i2c_slave_irq(struct aspeed_new_i2c_bus *i2c_bus)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-new-aspeed.c:1091:6: warning: no previous prototype for 'aspeed_i2c_master_package_irq' [-Wmissing-prototypes]
1091 | void aspeed_i2c_master_package_irq(struct aspeed_new_i2c_bus *i2c_bus, u32 sts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-new-aspeed.c:1347:5: warning: no previous prototype for 'aspeed_new_i2c_master_irq' [-Wmissing-prototypes]
1347 | int aspeed_new_i2c_master_irq(struct aspeed_new_i2c_bus *i2c_bus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/aspeed_i2c_slave_packet_irq +542 drivers/i2c/busses/i2c-new-aspeed.c
540
541 #ifdef CONFIG_I2C_SLAVE
> 542 void aspeed_i2c_slave_packet_irq(struct aspeed_new_i2c_bus *i2c_bus, u32 sts)
543 {
544 u32 cmd = 0;
545 u8 value;
546 u8 byte_data;
547 int i = 0;
548 int slave_rx_len;
549
550 sts &= ~(AST_I2CS_PKT_DONE | AST_I2CS_PKT_ERROR);
551 writel(AST_I2CS_PKT_DONE, i2c_bus->reg_base + AST_I2CS_ISR);
552 switch (sts) {
553 case 0:
554 cmd = SLAVE_TRIGGER_CMD;
555 if (i2c_bus->mode == DMA_MODE)
556 cmd |= AST_I2CS_RX_DMA_EN;
557 else if (i2c_bus->mode == BUFF_MODE)
558 cmd |= AST_I2CS_RX_BUFF_EN;
559 else
560 cmd &= ~AST_I2CS_PKT_MODE_EN;
561 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
562 break;
563 case AST_I2CS_SLAVE_MATCH:
564 dev_dbg(i2c_bus->dev, "S : Sw\n");
565 i2c_slave_event(i2c_bus->slave,
566 I2C_SLAVE_WRITE_REQUESTED, &value);
567 break;
568
569 case AST_I2CS_SLAVE_MATCH | AST_I2CS_STOP:
570 dev_dbg(i2c_bus->dev, "S : Sw|P\n");
571 i2c_slave_event(i2c_bus->slave, I2C_SLAVE_STOP, &value);
572 cmd = SLAVE_TRIGGER_CMD;
573 if (i2c_bus->mode == DMA_MODE) {
574 cmd |= AST_I2CS_RX_DMA_EN;
575 writel(AST_I2CS_SET_RX_DMA_LEN(I2C_SLAVE_MSG_BUF_SIZE),
576 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
577 } else if (i2c_bus->mode == BUFF_MODE) {
578 cmd |= AST_I2CS_RX_BUFF_EN;
579 writel(AST_I2CC_SET_RX_BUF_LEN(i2c_bus->buf_size),
580 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
581 } else {
582 cmd &= ~AST_I2CS_PKT_MODE_EN;
583 }
584 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
585 break;
586
587 case AST_I2CS_SLAVE_MATCH | AST_I2CS_RX_DONE |
588 AST_I2CS_Wait_RX_DMA | AST_I2CS_STOP:
589 case AST_I2CS_RX_DONE | AST_I2CS_Wait_RX_DMA | AST_I2CS_STOP:
590 case AST_I2CS_RX_DONE | AST_I2CS_STOP:
591 case AST_I2CS_SLAVE_MATCH | AST_I2CS_RX_DONE | AST_I2CS_Wait_RX_DMA:
592 case AST_I2CS_SLAVE_MATCH | AST_I2CS_RX_DONE | AST_I2CS_STOP:
593 cmd = SLAVE_TRIGGER_CMD;
594 if (sts & AST_I2CS_STOP) {
595 if (sts & AST_I2CS_SLAVE_MATCH)
596 dev_dbg(i2c_bus->dev, "S : Sw|D|P\n");
597 else
598 dev_dbg(i2c_bus->dev, "S : D|P\n");
599 } else {
600 dev_dbg(i2c_bus->dev, "S : Sw|D\n");
601 }
602
603 if (sts & AST_I2CS_SLAVE_MATCH)
604 i2c_slave_event(i2c_bus->slave,
605 I2C_SLAVE_WRITE_REQUESTED,
606 &value);
607
608 if (i2c_bus->mode == DMA_MODE) {
609 cmd |= AST_I2CS_RX_DMA_EN;
610 slave_rx_len =
611 AST_I2C_GET_RX_DMA_LEN(readl(i2c_bus->reg_base +
612 AST_I2CS_DMA_LEN_STS));
613 dev_dbg(i2c_bus->dev, "rx len %d\n", slave_rx_len);
614 for (i = 0; i < slave_rx_len; i++) {
615 i2c_slave_event(i2c_bus->slave,
616 I2C_SLAVE_WRITE_RECEIVED,
617 &i2c_bus->slave_dma_buf[i]);
618 }
619 writel(AST_I2CS_SET_RX_DMA_LEN(I2C_SLAVE_MSG_BUF_SIZE),
620 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
621 } else if (i2c_bus->mode == BUFF_MODE) {
622 cmd |= AST_I2CS_RX_BUFF_EN;
623 slave_rx_len =
624 AST_I2CC_GET_RX_BUF_LEN(readl(i2c_bus->reg_base +
625 AST_I2CC_BUFF_CTRL));
626 for (i = 0; i < slave_rx_len; i++) {
627 value = readb(i2c_bus->buf_base + i);
628 dev_dbg(i2c_bus->dev, "[%02x]", value);
629 i2c_slave_event(i2c_bus->slave,
630 I2C_SLAVE_WRITE_RECEIVED,
631 &value);
632 }
633 writel(AST_I2CC_SET_RX_BUF_LEN(i2c_bus->buf_size),
634 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
635 } else {
636 cmd &= ~AST_I2CS_PKT_MODE_EN;
637 byte_data = AST_I2CC_GET_RX_BUFF(readl(i2c_bus->reg_base +
638 AST_I2CC_STS_AND_BUFF));
639 dev_dbg(i2c_bus->dev, "[%02x]", byte_data);
640 i2c_slave_event(i2c_bus->slave,
641 I2C_SLAVE_WRITE_RECEIVED,
642 &byte_data);
643 }
644 if (sts & AST_I2CS_STOP)
645 i2c_slave_event(i2c_bus->slave, I2C_SLAVE_STOP,
646 &value);
647 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
648 break;
649
650 /* it is Mw data Mr coming -> it need send tx */
651 case AST_I2CS_RX_DONE | AST_I2CS_Wait_TX_DMA:
652 case AST_I2CS_SLAVE_MATCH | AST_I2CS_RX_DONE | AST_I2CS_Wait_TX_DMA:
653 /* it should be repeat start read */
654 if (sts & AST_I2CS_SLAVE_MATCH)
655 dev_dbg(i2c_bus->dev,
656 "S: AST_I2CS_Wait_TX_DMA | AST_I2CS_SLAVE_MATCH | AST_I2CS_RX_DONE\n");
657 else
658 dev_dbg(i2c_bus->dev,
659 "S: AST_I2CS_Wait_TX_DMA | AST_I2CS_RX_DONE\n");
660
661 if (sts & AST_I2CS_SLAVE_MATCH)
662 i2c_slave_event(i2c_bus->slave,
663 I2C_SLAVE_WRITE_REQUESTED,
664 &value);
665
666 cmd = SLAVE_TRIGGER_CMD;
667 if (i2c_bus->mode == DMA_MODE) {
668 cmd |= AST_I2CS_TX_DMA_EN;
669 slave_rx_len =
670 AST_I2C_GET_RX_DMA_LEN(readl(i2c_bus->reg_base +
671 AST_I2CS_DMA_LEN_STS));
672 for (i = 0; i < slave_rx_len; i++) {
673 dev_dbg(i2c_bus->dev, "rx [%02x]",
674 i2c_bus->slave_dma_buf[i]);
675 i2c_slave_event(i2c_bus->slave,
676 I2C_SLAVE_WRITE_RECEIVED,
677 &i2c_bus->slave_dma_buf[i]);
678 }
679 i2c_slave_event(i2c_bus->slave,
680 I2C_SLAVE_READ_REQUESTED,
681 &i2c_bus->slave_dma_buf[0]);
682 dev_dbg(i2c_bus->dev, "tx : [%02x]",
683 i2c_bus->slave_dma_buf[0]);
684 writel(0, i2c_bus->reg_base + AST_I2CS_DMA_LEN_STS);
685 writel(AST_I2CS_SET_TX_DMA_LEN(1),
686 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
687 } else if (i2c_bus->mode == BUFF_MODE) {
688 cmd |= AST_I2CS_TX_BUFF_EN;
689 slave_rx_len =
690 AST_I2CC_GET_RX_BUF_LEN(readl(i2c_bus->reg_base +
691 AST_I2CC_BUFF_CTRL));
692 for (i = 0; i < slave_rx_len; i++) {
693 value = readb(i2c_bus->buf_base + i);
694 dev_dbg(i2c_bus->dev, "rx : [%02x]",
695 value);
696 i2c_slave_event(i2c_bus->slave,
697 I2C_SLAVE_WRITE_RECEIVED,
698 &value);
699 }
700 i2c_slave_event(i2c_bus->slave,
701 I2C_SLAVE_READ_REQUESTED,
702 &value);
703 dev_dbg(i2c_bus->dev, "tx : [%02x]", value);
704 writeb(value, i2c_bus->buf_base);
705 writel(AST_I2CC_SET_TX_BUF_LEN(1),
706 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
707 } else {
708 cmd &= ~AST_I2CS_PKT_MODE_EN;
709 cmd |= AST_I2CS_TX_CMD;
710 byte_data = AST_I2CC_GET_RX_BUFF(readl(i2c_bus->reg_base +
711 AST_I2CC_STS_AND_BUFF));
712 dev_dbg(i2c_bus->dev, "rx : [%02x]", byte_data);
713 i2c_slave_event(i2c_bus->slave,
714 I2C_SLAVE_WRITE_RECEIVED,
715 &byte_data);
716 i2c_slave_event(i2c_bus->slave,
717 I2C_SLAVE_READ_REQUESTED,
718 &byte_data);
719 dev_dbg(i2c_bus->dev, "tx : [%02x]", byte_data);
720 writel(byte_data, i2c_bus->reg_base +
721 AST_I2CC_STS_AND_BUFF);
722 }
723 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
724 break;
725
726 case AST_I2CS_SLAVE_MATCH | AST_I2CS_Wait_TX_DMA:
727 /* First Start read */
728 dev_dbg(i2c_bus->dev,
729 "S: AST_I2CS_SLAVE_MATCH | AST_I2CS_Wait_TX_DMA\n");
730 cmd = SLAVE_TRIGGER_CMD;
731 if (i2c_bus->mode == DMA_MODE) {
732 cmd |= AST_I2CS_TX_DMA_EN;
733 i2c_slave_event(i2c_bus->slave,
734 I2C_SLAVE_READ_REQUESTED,
735 &i2c_bus->slave_dma_buf[0]);
736 dev_dbg(i2c_bus->dev, "tx: [%x]\n",
737 i2c_bus->slave_dma_buf[0]);
738 writel(AST_I2CS_SET_TX_DMA_LEN(1),
739 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
740 } else if (i2c_bus->mode == BUFF_MODE) {
741 cmd |= AST_I2CS_TX_BUFF_EN;
742 i2c_slave_event(i2c_bus->slave,
743 I2C_SLAVE_READ_REQUESTED,
744 &byte_data);
745 dev_dbg(i2c_bus->dev, "tx : [%02x]", byte_data);
746 writeb(byte_data, i2c_bus->buf_base);
747 writel(AST_I2CC_SET_TX_BUF_LEN(1),
748 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
749 } else {
750 cmd &= ~AST_I2CS_PKT_MODE_EN;
751 cmd |= AST_I2CS_TX_CMD;
752 i2c_slave_event(i2c_bus->slave,
753 I2C_SLAVE_READ_REQUESTED,
754 &byte_data);
755 writel(byte_data, i2c_bus->reg_base +
756 AST_I2CC_STS_AND_BUFF);
757 }
758 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
759 break;
760
761 case AST_I2CS_Wait_TX_DMA:
762 /* it should be next start read */
763 dev_dbg(i2c_bus->dev, "S: AST_I2CS_Wait_TX_DMA\n");
764 cmd = SLAVE_TRIGGER_CMD;
765 if (i2c_bus->mode == DMA_MODE) {
766 cmd |= AST_I2CS_TX_DMA_EN;
767 i2c_slave_event(i2c_bus->slave,
768 I2C_SLAVE_READ_PROCESSED,
769 &i2c_bus->slave_dma_buf[0]);
770 dev_dbg(i2c_bus->dev, "tx : [%02x]",
771 i2c_bus->slave_dma_buf[0]);
772 writel(0, i2c_bus->reg_base + AST_I2CS_DMA_LEN_STS);
773 writel(AST_I2CS_SET_TX_DMA_LEN(1),
774 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
775 } else if (i2c_bus->mode == BUFF_MODE) {
776 cmd |= AST_I2CS_TX_BUFF_EN;
777 i2c_slave_event(i2c_bus->slave,
778 I2C_SLAVE_READ_PROCESSED,
779 &value);
780 dev_dbg(i2c_bus->dev, "tx: [%02x]\n", value);
781 writeb(value, i2c_bus->buf_base);
782 writel(AST_I2CC_SET_TX_BUF_LEN(1),
783 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
784 } else {
785 cmd &= ~AST_I2CS_PKT_MODE_EN;
786 cmd |= AST_I2CS_TX_CMD;
787 i2c_slave_event(i2c_bus->slave,
788 I2C_SLAVE_READ_PROCESSED,
789 &byte_data);
790 dev_dbg(i2c_bus->dev, "tx: [%02x]\n",
791 byte_data);
792 writel(byte_data, i2c_bus->reg_base +
793 AST_I2CC_STS_AND_BUFF);
794 }
795 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
796 break;
797
798 case AST_I2CS_TX_NAK | AST_I2CS_STOP:
799 /* it just tx complete */
800 dev_dbg(i2c_bus->dev,
801 "S: AST_I2CS_TX_NAK | AST_I2CS_STOP\n");
802 cmd = SLAVE_TRIGGER_CMD;
803 i2c_slave_event(i2c_bus->slave, I2C_SLAVE_STOP, &value);
804 if (i2c_bus->mode == DMA_MODE) {
805 cmd |= AST_I2CS_RX_DMA_EN;
806 writel(0, i2c_bus->reg_base + AST_I2CS_DMA_LEN_STS);
807 writel(AST_I2CS_SET_RX_DMA_LEN(I2C_SLAVE_MSG_BUF_SIZE),
808 i2c_bus->reg_base + AST_I2CS_DMA_LEN);
809 } else if (i2c_bus->mode == BUFF_MODE) {
810 cmd |= AST_I2CS_RX_BUFF_EN;
811 writel(AST_I2CC_SET_RX_BUF_LEN(i2c_bus->buf_size),
812 i2c_bus->reg_base + AST_I2CC_BUFF_CTRL);
813 } else {
814 cmd &= ~AST_I2CS_PKT_MODE_EN;
815 }
816 writel(cmd, i2c_bus->reg_base + AST_I2CS_CMD_STS);
817 break;
818
819 default:
820 dev_dbg(i2c_bus->dev,
821 "todo slave sts case %x, now %x\n", sts,
822 readl(i2c_bus->reg_base + AST_I2CS_ISR));
823 break;
824 }
825 }
826
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 4/8] xfs: pass a CIL context to xlog_write()
by kernel test robot
Hi Dave,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on next-20210617]
[cannot apply to v5.13-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dave-Chinner/xfs-log-fixes-for-f...
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: x86_64-randconfig-a011-20210617 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/fc3370002b56bcb25440b96ef5099f508...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dave-Chinner/xfs-log-fixes-for-for-next/20210617-162640
git checkout fc3370002b56bcb25440b96ef5099f508c48360e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/xfs/xfs_log_cil.c:792:1: warning: no previous prototype for function 'xlog_cil_write_commit_record' [-Wmissing-prototypes]
xlog_cil_write_commit_record(
^
fs/xfs/xfs_log_cil.c:791:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
>> fs/xfs/xfs_log_cil.c:1130:24: warning: variable 'commit_lsn' is uninitialized when used here [-Wuninitialized]
if (ctx->start_lsn != commit_lsn) {
^~~~~~~~~~
fs/xfs/xfs_log_cil.c:877:23: note: initialize the variable 'commit_lsn' to silence this warning
xfs_lsn_t commit_lsn;
^
= 0
2 warnings generated.
vim +/commit_lsn +1130 fs/xfs/xfs_log_cil.c
be05dd0e68ac999 Dave Chinner 2021-06-08 846
71e330b593905e4 Dave Chinner 2010-05-21 847 /*
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 848 * Push the Committed Item List to the log.
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 849 *
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 850 * If the current sequence is the same as xc_push_seq we need to do a flush. If
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 851 * xc_push_seq is less than the current sequence, then it has already been
a44f13edf0ebb4e Dave Chinner 2010-08-24 852 * flushed and we don't need to do anything - the caller will wait for it to
a44f13edf0ebb4e Dave Chinner 2010-08-24 853 * complete if necessary.
a44f13edf0ebb4e Dave Chinner 2010-08-24 854 *
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 855 * xc_push_seq is checked unlocked against the sequence number for a match.
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 856 * Hence we can allow log forces to run racily and not issue pushes for the
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 857 * same sequence twice. If we get a race between multiple pushes for the same
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 858 * sequence they will block on the first one and then abort, hence avoiding
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 859 * needless pushes.
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 860 */
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 861 static void
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 862 xlog_cil_push_work(
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 863 struct work_struct *work)
71e330b593905e4 Dave Chinner 2010-05-21 864 {
facd77e4e38b8f0 Dave Chinner 2021-06-04 865 struct xfs_cil_ctx *ctx =
facd77e4e38b8f0 Dave Chinner 2021-06-04 866 container_of(work, struct xfs_cil_ctx, push_work);
facd77e4e38b8f0 Dave Chinner 2021-06-04 867 struct xfs_cil *cil = ctx->cil;
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 868 struct xlog *log = cil->xc_log;
71e330b593905e4 Dave Chinner 2010-05-21 869 struct xfs_log_vec *lv;
71e330b593905e4 Dave Chinner 2010-05-21 870 struct xfs_cil_ctx *new_ctx;
71e330b593905e4 Dave Chinner 2010-05-21 871 struct xlog_in_core *commit_iclog;
66fc9ffa8638be2 Dave Chinner 2021-06-04 872 int num_iovecs = 0;
66fc9ffa8638be2 Dave Chinner 2021-06-04 873 int num_bytes = 0;
71e330b593905e4 Dave Chinner 2010-05-21 874 int error = 0;
877cf3473914ae4 Dave Chinner 2021-06-04 875 struct xlog_cil_trans_hdr thdr;
a47518453bf9581 Dave Chinner 2021-06-08 876 struct xfs_log_vec lvhdr = {};
71e330b593905e4 Dave Chinner 2010-05-21 877 xfs_lsn_t commit_lsn;
4c2d542f2e78653 Dave Chinner 2012-04-23 878 xfs_lsn_t push_seq;
0279bbbbc03f2ce Dave Chinner 2021-06-03 879 struct bio bio;
0279bbbbc03f2ce Dave Chinner 2021-06-03 880 DECLARE_COMPLETION_ONSTACK(bdev_flush);
e12213ba5d909a3 Dave Chinner 2021-06-04 881 bool push_commit_stable;
e469cbe84f4ade9 Dave Chinner 2021-06-08 882 struct xlog_ticket *ticket;
71e330b593905e4 Dave Chinner 2010-05-21 883
facd77e4e38b8f0 Dave Chinner 2021-06-04 884 new_ctx = xlog_cil_ctx_alloc();
71e330b593905e4 Dave Chinner 2010-05-21 885 new_ctx->ticket = xlog_cil_ticket_alloc(log);
71e330b593905e4 Dave Chinner 2010-05-21 886
71e330b593905e4 Dave Chinner 2010-05-21 887 down_write(&cil->xc_ctx_lock);
71e330b593905e4 Dave Chinner 2010-05-21 888
4bb928cdb900d06 Dave Chinner 2013-08-12 889 spin_lock(&cil->xc_push_lock);
4c2d542f2e78653 Dave Chinner 2012-04-23 890 push_seq = cil->xc_push_seq;
4c2d542f2e78653 Dave Chinner 2012-04-23 891 ASSERT(push_seq <= ctx->sequence);
e12213ba5d909a3 Dave Chinner 2021-06-04 892 push_commit_stable = cil->xc_push_commit_stable;
e12213ba5d909a3 Dave Chinner 2021-06-04 893 cil->xc_push_commit_stable = false;
71e330b593905e4 Dave Chinner 2010-05-21 894
0e7ab7efe77451c Dave Chinner 2020-03-24 895 /*
3682277520d6f4a Dave Chinner 2021-06-04 896 * As we are about to switch to a new, empty CIL context, we no longer
3682277520d6f4a Dave Chinner 2021-06-04 897 * need to throttle tasks on CIL space overruns. Wake any waiters that
3682277520d6f4a Dave Chinner 2021-06-04 898 * the hard push throttle may have caught so they can start committing
3682277520d6f4a Dave Chinner 2021-06-04 899 * to the new context. The ctx->xc_push_lock provides the serialisation
3682277520d6f4a Dave Chinner 2021-06-04 900 * necessary for safely using the lockless waitqueue_active() check in
3682277520d6f4a Dave Chinner 2021-06-04 901 * this context.
3682277520d6f4a Dave Chinner 2021-06-04 902 */
3682277520d6f4a Dave Chinner 2021-06-04 903 if (waitqueue_active(&cil->xc_push_wait))
c7f87f3984cfa1e Dave Chinner 2020-06-16 904 wake_up_all(&cil->xc_push_wait);
0e7ab7efe77451c Dave Chinner 2020-03-24 905
4c2d542f2e78653 Dave Chinner 2012-04-23 906 /*
4c2d542f2e78653 Dave Chinner 2012-04-23 907 * Check if we've anything to push. If there is nothing, then we don't
4c2d542f2e78653 Dave Chinner 2012-04-23 908 * move on to a new sequence number and so we have to be able to push
4c2d542f2e78653 Dave Chinner 2012-04-23 909 * this sequence again later.
4c2d542f2e78653 Dave Chinner 2012-04-23 910 */
0d11bae4bcf4aa9 Dave Chinner 2021-06-04 911 if (test_bit(XLOG_CIL_EMPTY, &cil->xc_flags)) {
4c2d542f2e78653 Dave Chinner 2012-04-23 912 cil->xc_push_seq = 0;
4bb928cdb900d06 Dave Chinner 2013-08-12 913 spin_unlock(&cil->xc_push_lock);
a44f13edf0ebb4e Dave Chinner 2010-08-24 914 goto out_skip;
4c2d542f2e78653 Dave Chinner 2012-04-23 915 }
4c2d542f2e78653 Dave Chinner 2012-04-23 916
a44f13edf0ebb4e Dave Chinner 2010-08-24 917
cf085a1b5d22144 Joe Perches 2019-11-07 918 /* check for a previously pushed sequence */
facd77e4e38b8f0 Dave Chinner 2021-06-04 919 if (push_seq < ctx->sequence) {
8af3dcd3c89aef1 Dave Chinner 2014-09-23 920 spin_unlock(&cil->xc_push_lock);
df806158b0f6eb2 Dave Chinner 2010-05-17 921 goto out_skip;
8af3dcd3c89aef1 Dave Chinner 2014-09-23 922 }
8af3dcd3c89aef1 Dave Chinner 2014-09-23 923
8af3dcd3c89aef1 Dave Chinner 2014-09-23 924 /*
8af3dcd3c89aef1 Dave Chinner 2014-09-23 925 * We are now going to push this context, so add it to the committing
8af3dcd3c89aef1 Dave Chinner 2014-09-23 926 * list before we do anything else. This ensures that anyone waiting on
8af3dcd3c89aef1 Dave Chinner 2014-09-23 927 * this push can easily detect the difference between a "push in
8af3dcd3c89aef1 Dave Chinner 2014-09-23 928 * progress" and "CIL is empty, nothing to do".
8af3dcd3c89aef1 Dave Chinner 2014-09-23 929 *
8af3dcd3c89aef1 Dave Chinner 2014-09-23 930 * IOWs, a wait loop can now check for:
8af3dcd3c89aef1 Dave Chinner 2014-09-23 931 * the current sequence not being found on the committing list;
8af3dcd3c89aef1 Dave Chinner 2014-09-23 932 * an empty CIL; and
8af3dcd3c89aef1 Dave Chinner 2014-09-23 933 * an unchanged sequence number
8af3dcd3c89aef1 Dave Chinner 2014-09-23 934 * to detect a push that had nothing to do and therefore does not need
8af3dcd3c89aef1 Dave Chinner 2014-09-23 935 * waiting on. If the CIL is not empty, we get put on the committing
8af3dcd3c89aef1 Dave Chinner 2014-09-23 936 * list before emptying the CIL and bumping the sequence number. Hence
8af3dcd3c89aef1 Dave Chinner 2014-09-23 937 * an empty CIL and an unchanged sequence number means we jumped out
8af3dcd3c89aef1 Dave Chinner 2014-09-23 938 * above after doing nothing.
8af3dcd3c89aef1 Dave Chinner 2014-09-23 939 *
8af3dcd3c89aef1 Dave Chinner 2014-09-23 940 * Hence the waiter will either find the commit sequence on the
8af3dcd3c89aef1 Dave Chinner 2014-09-23 941 * committing list or the sequence number will be unchanged and the CIL
8af3dcd3c89aef1 Dave Chinner 2014-09-23 942 * still dirty. In that latter case, the push has not yet started, and
8af3dcd3c89aef1 Dave Chinner 2014-09-23 943 * so the waiter will have to continue trying to check the CIL
8af3dcd3c89aef1 Dave Chinner 2014-09-23 944 * committing list until it is found. In extreme cases of delay, the
8af3dcd3c89aef1 Dave Chinner 2014-09-23 945 * sequence may fully commit between the attempts the wait makes to wait
8af3dcd3c89aef1 Dave Chinner 2014-09-23 946 * on the commit sequence.
8af3dcd3c89aef1 Dave Chinner 2014-09-23 947 */
8af3dcd3c89aef1 Dave Chinner 2014-09-23 948 list_add(&ctx->committing, &cil->xc_committing);
8af3dcd3c89aef1 Dave Chinner 2014-09-23 949 spin_unlock(&cil->xc_push_lock);
df806158b0f6eb2 Dave Chinner 2010-05-17 950
71e330b593905e4 Dave Chinner 2010-05-21 951 /*
0279bbbbc03f2ce Dave Chinner 2021-06-03 952 * The CIL is stable at this point - nothing new will be added to it
0279bbbbc03f2ce Dave Chinner 2021-06-03 953 * because we hold the flush lock exclusively. Hence we can now issue
0279bbbbc03f2ce Dave Chinner 2021-06-03 954 * a cache flush to ensure all the completed metadata in the journal we
0279bbbbc03f2ce Dave Chinner 2021-06-03 955 * are about to overwrite is on stable storage.
0279bbbbc03f2ce Dave Chinner 2021-06-03 956 */
0279bbbbc03f2ce Dave Chinner 2021-06-03 957 xfs_flush_bdev_async(&bio, log->l_mp->m_ddev_targp->bt_bdev,
0279bbbbc03f2ce Dave Chinner 2021-06-03 958 &bdev_flush);
0279bbbbc03f2ce Dave Chinner 2021-06-03 959
a8613836d99e627 Dave Chinner 2021-06-08 960 xlog_cil_pcp_aggregate(cil, ctx);
a8613836d99e627 Dave Chinner 2021-06-08 961
1f18c0c4b78cfb1 Dave Chinner 2021-06-08 962 while (!list_empty(&ctx->log_items)) {
71e330b593905e4 Dave Chinner 2010-05-21 963 struct xfs_log_item *item;
71e330b593905e4 Dave Chinner 2010-05-21 964
1f18c0c4b78cfb1 Dave Chinner 2021-06-08 965 item = list_first_entry(&ctx->log_items,
71e330b593905e4 Dave Chinner 2010-05-21 966 struct xfs_log_item, li_cil);
a47518453bf9581 Dave Chinner 2021-06-08 967 lv = item->li_lv;
a1785f597c8b060 Dave Chinner 2021-06-08 968 lv->lv_order_id = item->li_order_id;
a47518453bf9581 Dave Chinner 2021-06-08 969 num_iovecs += lv->lv_niovecs;
66fc9ffa8638be2 Dave Chinner 2021-06-04 970 /* we don't write ordered log vectors */
66fc9ffa8638be2 Dave Chinner 2021-06-04 971 if (lv->lv_buf_len != XFS_LOG_VEC_ORDERED)
66fc9ffa8638be2 Dave Chinner 2021-06-04 972 num_bytes += lv->lv_bytes;
a47518453bf9581 Dave Chinner 2021-06-08 973
a47518453bf9581 Dave Chinner 2021-06-08 974 list_add_tail(&lv->lv_list, &ctx->lv_chain);
a1785f597c8b060 Dave Chinner 2021-06-08 975 list_del_init(&item->li_cil);
a1785f597c8b060 Dave Chinner 2021-06-08 976 item->li_order_id = 0;
a1785f597c8b060 Dave Chinner 2021-06-08 977 item->li_lv = NULL;
71e330b593905e4 Dave Chinner 2010-05-21 978 }
71e330b593905e4 Dave Chinner 2010-05-21 979
71e330b593905e4 Dave Chinner 2010-05-21 980 /*
facd77e4e38b8f0 Dave Chinner 2021-06-04 981 * Switch the contexts so we can drop the context lock and move out
71e330b593905e4 Dave Chinner 2010-05-21 982 * of a shared context. We can't just go straight to the commit record,
71e330b593905e4 Dave Chinner 2010-05-21 983 * though - we need to synchronise with previous and future commits so
71e330b593905e4 Dave Chinner 2010-05-21 984 * that the commit records are correctly ordered in the log to ensure
71e330b593905e4 Dave Chinner 2010-05-21 985 * that we process items during log IO completion in the correct order.
71e330b593905e4 Dave Chinner 2010-05-21 986 *
71e330b593905e4 Dave Chinner 2010-05-21 987 * For example, if we get an EFI in one checkpoint and the EFD in the
71e330b593905e4 Dave Chinner 2010-05-21 988 * next (e.g. due to log forces), we do not want the checkpoint with
71e330b593905e4 Dave Chinner 2010-05-21 989 * the EFD to be committed before the checkpoint with the EFI. Hence
71e330b593905e4 Dave Chinner 2010-05-21 990 * we must strictly order the commit records of the checkpoints so
71e330b593905e4 Dave Chinner 2010-05-21 991 * that: a) the checkpoint callbacks are attached to the iclogs in the
71e330b593905e4 Dave Chinner 2010-05-21 992 * correct order; and b) the checkpoints are replayed in correct order
71e330b593905e4 Dave Chinner 2010-05-21 993 * in log recovery.
71e330b593905e4 Dave Chinner 2010-05-21 994 *
71e330b593905e4 Dave Chinner 2010-05-21 995 * Hence we need to add this context to the committing context list so
71e330b593905e4 Dave Chinner 2010-05-21 996 * that higher sequences will wait for us to write out a commit record
71e330b593905e4 Dave Chinner 2010-05-21 997 * before they do.
f876e44603ad091 Dave Chinner 2014-02-27 998 *
f39ae5297c5ce2f Dave Chinner 2021-06-04 999 * xfs_log_force_seq requires us to mirror the new sequence into the cil
f876e44603ad091 Dave Chinner 2014-02-27 1000 * structure atomically with the addition of this sequence to the
f876e44603ad091 Dave Chinner 2014-02-27 1001 * committing list. This also ensures that we can do unlocked checks
f876e44603ad091 Dave Chinner 2014-02-27 1002 * against the current sequence in log forces without risking
f876e44603ad091 Dave Chinner 2014-02-27 1003 * deferencing a freed context pointer.
71e330b593905e4 Dave Chinner 2010-05-21 1004 */
4bb928cdb900d06 Dave Chinner 2013-08-12 1005 spin_lock(&cil->xc_push_lock);
facd77e4e38b8f0 Dave Chinner 2021-06-04 1006 xlog_cil_ctx_switch(cil, new_ctx);
4bb928cdb900d06 Dave Chinner 2013-08-12 1007 spin_unlock(&cil->xc_push_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1008 up_write(&cil->xc_ctx_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1009
a1785f597c8b060 Dave Chinner 2021-06-08 1010 /*
a1785f597c8b060 Dave Chinner 2021-06-08 1011 * Sort the log vector chain before we add the transaction headers.
a1785f597c8b060 Dave Chinner 2021-06-08 1012 * This ensures we always have the transaction headers at the start
a1785f597c8b060 Dave Chinner 2021-06-08 1013 * of the chain.
a1785f597c8b060 Dave Chinner 2021-06-08 1014 */
a1785f597c8b060 Dave Chinner 2021-06-08 1015 list_sort(NULL, &ctx->lv_chain, xlog_cil_order_cmp);
a1785f597c8b060 Dave Chinner 2021-06-08 1016
71e330b593905e4 Dave Chinner 2010-05-21 1017 /*
71e330b593905e4 Dave Chinner 2010-05-21 1018 * Build a checkpoint transaction header and write it to the log to
71e330b593905e4 Dave Chinner 2010-05-21 1019 * begin the transaction. We need to account for the space used by the
71e330b593905e4 Dave Chinner 2010-05-21 1020 * transaction header here as it is not accounted for in xlog_write().
a47518453bf9581 Dave Chinner 2021-06-08 1021 * Add the lvhdr to the head of the lv chain we pass to xlog_write() so
a47518453bf9581 Dave Chinner 2021-06-08 1022 * it gets written into the iclog first.
71e330b593905e4 Dave Chinner 2010-05-21 1023 */
877cf3473914ae4 Dave Chinner 2021-06-04 1024 xlog_cil_build_trans_hdr(ctx, &thdr, &lvhdr, num_iovecs);
66fc9ffa8638be2 Dave Chinner 2021-06-04 1025 num_bytes += lvhdr.lv_bytes;
a47518453bf9581 Dave Chinner 2021-06-08 1026 list_add(&lvhdr.lv_list, &ctx->lv_chain);
71e330b593905e4 Dave Chinner 2010-05-21 1027
0279bbbbc03f2ce Dave Chinner 2021-06-03 1028 /*
0279bbbbc03f2ce Dave Chinner 2021-06-03 1029 * Before we format and submit the first iclog, we have to ensure that
0279bbbbc03f2ce Dave Chinner 2021-06-03 1030 * the metadata writeback ordering cache flush is complete.
0279bbbbc03f2ce Dave Chinner 2021-06-03 1031 */
0279bbbbc03f2ce Dave Chinner 2021-06-03 1032 wait_for_completion(&bdev_flush);
0279bbbbc03f2ce Dave Chinner 2021-06-03 1033
877cf3473914ae4 Dave Chinner 2021-06-04 1034 /*
877cf3473914ae4 Dave Chinner 2021-06-04 1035 * The LSN we need to pass to the log items on transaction commit is the
877cf3473914ae4 Dave Chinner 2021-06-04 1036 * LSN reported by the first log vector write, not the commit lsn. If we
877cf3473914ae4 Dave Chinner 2021-06-04 1037 * use the commit record lsn then we can move the tail beyond the grant
877cf3473914ae4 Dave Chinner 2021-06-04 1038 * write head.
877cf3473914ae4 Dave Chinner 2021-06-04 1039 */
fc3370002b56bcb Dave Chinner 2021-06-17 1040 error = xlog_write(log, ctx, &ctx->lv_chain, ctx->ticket,
a47518453bf9581 Dave Chinner 2021-06-08 1041 NULL, num_bytes);
a47518453bf9581 Dave Chinner 2021-06-08 1042
a47518453bf9581 Dave Chinner 2021-06-08 1043 /*
a47518453bf9581 Dave Chinner 2021-06-08 1044 * Take the lvhdr back off the lv_chain as it should not be passed
a47518453bf9581 Dave Chinner 2021-06-08 1045 * to log IO completion.
a47518453bf9581 Dave Chinner 2021-06-08 1046 */
a47518453bf9581 Dave Chinner 2021-06-08 1047 list_del(&lvhdr.lv_list);
71e330b593905e4 Dave Chinner 2010-05-21 1048 if (error)
7db37c5e6575b22 Dave Chinner 2011-01-27 1049 goto out_abort_free_ticket;
71e330b593905e4 Dave Chinner 2010-05-21 1050
71e330b593905e4 Dave Chinner 2010-05-21 1051 /*
71e330b593905e4 Dave Chinner 2010-05-21 1052 * now that we've written the checkpoint into the log, strictly
71e330b593905e4 Dave Chinner 2010-05-21 1053 * order the commit records so replay will get them in the right order.
71e330b593905e4 Dave Chinner 2010-05-21 1054 */
71e330b593905e4 Dave Chinner 2010-05-21 1055 restart:
4bb928cdb900d06 Dave Chinner 2013-08-12 1056 spin_lock(&cil->xc_push_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1057 list_for_each_entry(new_ctx, &cil->xc_committing, committing) {
ac983517ec5941d Dave Chinner 2014-05-07 1058 /*
ac983517ec5941d Dave Chinner 2014-05-07 1059 * Avoid getting stuck in this loop because we were woken by the
ac983517ec5941d Dave Chinner 2014-05-07 1060 * shutdown, but then went back to sleep once already in the
ac983517ec5941d Dave Chinner 2014-05-07 1061 * shutdown state.
ac983517ec5941d Dave Chinner 2014-05-07 1062 */
ac983517ec5941d Dave Chinner 2014-05-07 1063 if (XLOG_FORCED_SHUTDOWN(log)) {
ac983517ec5941d Dave Chinner 2014-05-07 1064 spin_unlock(&cil->xc_push_lock);
ac983517ec5941d Dave Chinner 2014-05-07 1065 goto out_abort_free_ticket;
ac983517ec5941d Dave Chinner 2014-05-07 1066 }
ac983517ec5941d Dave Chinner 2014-05-07 1067
71e330b593905e4 Dave Chinner 2010-05-21 1068 /*
71e330b593905e4 Dave Chinner 2010-05-21 1069 * Higher sequences will wait for this one so skip them.
ac983517ec5941d Dave Chinner 2014-05-07 1070 * Don't wait for our own sequence, either.
71e330b593905e4 Dave Chinner 2010-05-21 1071 */
71e330b593905e4 Dave Chinner 2010-05-21 1072 if (new_ctx->sequence >= ctx->sequence)
71e330b593905e4 Dave Chinner 2010-05-21 1073 continue;
71e330b593905e4 Dave Chinner 2010-05-21 1074 if (!new_ctx->commit_lsn) {
71e330b593905e4 Dave Chinner 2010-05-21 1075 /*
71e330b593905e4 Dave Chinner 2010-05-21 1076 * It is still being pushed! Wait for the push to
71e330b593905e4 Dave Chinner 2010-05-21 1077 * complete, then start again from the beginning.
71e330b593905e4 Dave Chinner 2010-05-21 1078 */
4bb928cdb900d06 Dave Chinner 2013-08-12 1079 xlog_wait(&cil->xc_commit_wait, &cil->xc_push_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1080 goto restart;
71e330b593905e4 Dave Chinner 2010-05-21 1081 }
71e330b593905e4 Dave Chinner 2010-05-21 1082 }
4bb928cdb900d06 Dave Chinner 2013-08-12 1083 spin_unlock(&cil->xc_push_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1084
fc3370002b56bcb Dave Chinner 2021-06-17 1085 error = xlog_cil_write_commit_record(ctx, &commit_iclog);
dd401770b0ff68f Dave Chinner 2020-03-25 1086 if (error)
dd401770b0ff68f Dave Chinner 2020-03-25 1087 goto out_abort_free_ticket;
dd401770b0ff68f Dave Chinner 2020-03-25 1088
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1089 spin_lock(&commit_iclog->ic_callback_lock);
1858bb0bec612df Christoph Hellwig 2019-10-14 1090 if (commit_iclog->ic_state == XLOG_STATE_IOERROR) {
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1091 spin_unlock(&commit_iclog->ic_callback_lock);
e469cbe84f4ade9 Dave Chinner 2021-06-08 1092 goto out_abort_free_ticket;
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1093 }
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1094 ASSERT_ALWAYS(commit_iclog->ic_state == XLOG_STATE_ACTIVE ||
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1095 commit_iclog->ic_state == XLOG_STATE_WANT_SYNC);
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1096 list_add_tail(&ctx->iclog_entry, &commit_iclog->ic_callbacks);
89ae379d564c5d8 Christoph Hellwig 2019-06-28 1097 spin_unlock(&commit_iclog->ic_callback_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1098
71e330b593905e4 Dave Chinner 2010-05-21 1099 /*
71e330b593905e4 Dave Chinner 2010-05-21 1100 * now the checkpoint commit is complete and we've attached the
71e330b593905e4 Dave Chinner 2010-05-21 1101 * callbacks to the iclog we can assign the commit LSN to the context
71e330b593905e4 Dave Chinner 2010-05-21 1102 * and wake up anyone who is waiting for the commit to complete.
71e330b593905e4 Dave Chinner 2010-05-21 1103 */
4bb928cdb900d06 Dave Chinner 2013-08-12 1104 spin_lock(&cil->xc_push_lock);
eb40a87500ac2f6 Dave Chinner 2010-12-21 1105 wake_up_all(&cil->xc_commit_wait);
4bb928cdb900d06 Dave Chinner 2013-08-12 1106 spin_unlock(&cil->xc_push_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1107
e469cbe84f4ade9 Dave Chinner 2021-06-08 1108 /*
e469cbe84f4ade9 Dave Chinner 2021-06-08 1109 * Pull the ticket off the ctx so we can ungrant it after releasing the
e469cbe84f4ade9 Dave Chinner 2021-06-08 1110 * commit_iclog. The ctx may be freed by the time we return from
e469cbe84f4ade9 Dave Chinner 2021-06-08 1111 * releasing the commit_iclog (i.e. checkpoint has been completed and
e469cbe84f4ade9 Dave Chinner 2021-06-08 1112 * callback run) so we can't reference the ctx after the call to
e469cbe84f4ade9 Dave Chinner 2021-06-08 1113 * xlog_state_release_iclog().
e469cbe84f4ade9 Dave Chinner 2021-06-08 1114 */
e469cbe84f4ade9 Dave Chinner 2021-06-08 1115 ticket = ctx->ticket;
e469cbe84f4ade9 Dave Chinner 2021-06-08 1116
5fd9256ce156ef7 Dave Chinner 2021-06-03 1117 /*
815753dc16bbca2 Dave Chinner 2021-06-17 1118 * If the checkpoint spans multiple iclogs, wait for all previous iclogs
815753dc16bbca2 Dave Chinner 2021-06-17 1119 * to complete before we submit the commit_iclog. We can't use state
815753dc16bbca2 Dave Chinner 2021-06-17 1120 * checks for this - ACTIVE can be either a past completed iclog or a
815753dc16bbca2 Dave Chinner 2021-06-17 1121 * future iclog being filled, while WANT_SYNC through SYNC_DONE can be a
815753dc16bbca2 Dave Chinner 2021-06-17 1122 * past or future iclog awaiting IO or ordered IO completion to be run.
815753dc16bbca2 Dave Chinner 2021-06-17 1123 * In the latter case, if it's a future iclog and we wait on it, the we
815753dc16bbca2 Dave Chinner 2021-06-17 1124 * will hang because it won't get processed through to ic_force_wait
815753dc16bbca2 Dave Chinner 2021-06-17 1125 * wakeup until this commit_iclog is written to disk. Hence we use the
815753dc16bbca2 Dave Chinner 2021-06-17 1126 * iclog header lsn and compare it to the commit lsn to determine if we
815753dc16bbca2 Dave Chinner 2021-06-17 1127 * need to wait on iclogs or not.
5fd9256ce156ef7 Dave Chinner 2021-06-03 1128 */
5fd9256ce156ef7 Dave Chinner 2021-06-03 1129 spin_lock(&log->l_icloglock);
cb1acb3f3246368 Dave Chinner 2021-06-04 @1130 if (ctx->start_lsn != commit_lsn) {
815753dc16bbca2 Dave Chinner 2021-06-17 1131 struct xlog_in_core *iclog;
815753dc16bbca2 Dave Chinner 2021-06-17 1132
815753dc16bbca2 Dave Chinner 2021-06-17 1133 for (iclog = commit_iclog->ic_prev;
815753dc16bbca2 Dave Chinner 2021-06-17 1134 iclog != commit_iclog;
815753dc16bbca2 Dave Chinner 2021-06-17 1135 iclog = iclog->ic_prev) {
815753dc16bbca2 Dave Chinner 2021-06-17 1136 xfs_lsn_t hlsn;
815753dc16bbca2 Dave Chinner 2021-06-17 1137
815753dc16bbca2 Dave Chinner 2021-06-17 1138 /*
815753dc16bbca2 Dave Chinner 2021-06-17 1139 * If the LSN of the iclog is zero or in the future it
815753dc16bbca2 Dave Chinner 2021-06-17 1140 * means it has passed through IO completion and
815753dc16bbca2 Dave Chinner 2021-06-17 1141 * activation and hence all previous iclogs have also
815753dc16bbca2 Dave Chinner 2021-06-17 1142 * done so. We do not need to wait at all in this case.
815753dc16bbca2 Dave Chinner 2021-06-17 1143 */
815753dc16bbca2 Dave Chinner 2021-06-17 1144 hlsn = be64_to_cpu(iclog->ic_header.h_lsn);
815753dc16bbca2 Dave Chinner 2021-06-17 1145 if (!hlsn || XFS_LSN_CMP(hlsn, commit_lsn) > 0)
815753dc16bbca2 Dave Chinner 2021-06-17 1146 break;
815753dc16bbca2 Dave Chinner 2021-06-17 1147
815753dc16bbca2 Dave Chinner 2021-06-17 1148 /*
815753dc16bbca2 Dave Chinner 2021-06-17 1149 * If the LSN of the iclog is older than the commit lsn,
815753dc16bbca2 Dave Chinner 2021-06-17 1150 * we have to wait on it. Waiting on this via the
815753dc16bbca2 Dave Chinner 2021-06-17 1151 * ic_force_wait should also order the completion of all
815753dc16bbca2 Dave Chinner 2021-06-17 1152 * older iclogs, too, but we leave checking that to the
815753dc16bbca2 Dave Chinner 2021-06-17 1153 * next loop iteration.
815753dc16bbca2 Dave Chinner 2021-06-17 1154 */
815753dc16bbca2 Dave Chinner 2021-06-17 1155 ASSERT(XFS_LSN_CMP(hlsn, commit_lsn) < 0);
815753dc16bbca2 Dave Chinner 2021-06-17 1156 xlog_wait_on_iclog(iclog);
cb1acb3f3246368 Dave Chinner 2021-06-04 1157 spin_lock(&log->l_icloglock);
815753dc16bbca2 Dave Chinner 2021-06-17 1158 }
815753dc16bbca2 Dave Chinner 2021-06-17 1159
815753dc16bbca2 Dave Chinner 2021-06-17 1160 /*
815753dc16bbca2 Dave Chinner 2021-06-17 1161 * Regardless of whether we need to wait or not, the the
815753dc16bbca2 Dave Chinner 2021-06-17 1162 * commit_iclog write needs to issue a pre-flush so that the
815753dc16bbca2 Dave Chinner 2021-06-17 1163 * ordering for this checkpoint is correctly preserved down to
815753dc16bbca2 Dave Chinner 2021-06-17 1164 * stable storage.
815753dc16bbca2 Dave Chinner 2021-06-17 1165 */
cb1acb3f3246368 Dave Chinner 2021-06-04 1166 commit_iclog->ic_flags |= XLOG_ICL_NEED_FLUSH;
5fd9256ce156ef7 Dave Chinner 2021-06-03 1167 }
5fd9256ce156ef7 Dave Chinner 2021-06-03 1168
cb1acb3f3246368 Dave Chinner 2021-06-04 1169 /*
cb1acb3f3246368 Dave Chinner 2021-06-04 1170 * The commit iclog must be written to stable storage to guarantee
cb1acb3f3246368 Dave Chinner 2021-06-04 1171 * journal IO vs metadata writeback IO is correctly ordered on stable
cb1acb3f3246368 Dave Chinner 2021-06-04 1172 * storage.
e12213ba5d909a3 Dave Chinner 2021-06-04 1173 *
e12213ba5d909a3 Dave Chinner 2021-06-04 1174 * If the push caller needs the commit to be immediately stable and the
e12213ba5d909a3 Dave Chinner 2021-06-04 1175 * commit_iclog is not yet marked as XLOG_STATE_WANT_SYNC to indicate it
e12213ba5d909a3 Dave Chinner 2021-06-04 1176 * will be written when released, switch it's state to WANT_SYNC right
e12213ba5d909a3 Dave Chinner 2021-06-04 1177 * now.
cb1acb3f3246368 Dave Chinner 2021-06-04 1178 */
cb1acb3f3246368 Dave Chinner 2021-06-04 1179 commit_iclog->ic_flags |= XLOG_ICL_NEED_FUA;
e12213ba5d909a3 Dave Chinner 2021-06-04 1180 if (push_commit_stable && commit_iclog->ic_state == XLOG_STATE_ACTIVE)
e12213ba5d909a3 Dave Chinner 2021-06-04 1181 xlog_state_switch_iclogs(log, commit_iclog, 0);
e469cbe84f4ade9 Dave Chinner 2021-06-08 1182 xlog_state_release_iclog(log, commit_iclog, ticket);
cb1acb3f3246368 Dave Chinner 2021-06-04 1183 spin_unlock(&log->l_icloglock);
e469cbe84f4ade9 Dave Chinner 2021-06-08 1184
e469cbe84f4ade9 Dave Chinner 2021-06-08 1185 xfs_log_ticket_ungrant(log, ticket);
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 1186 return;
71e330b593905e4 Dave Chinner 2010-05-21 1187
71e330b593905e4 Dave Chinner 2010-05-21 1188 out_skip:
71e330b593905e4 Dave Chinner 2010-05-21 1189 up_write(&cil->xc_ctx_lock);
71e330b593905e4 Dave Chinner 2010-05-21 1190 xfs_log_ticket_put(new_ctx->ticket);
71e330b593905e4 Dave Chinner 2010-05-21 1191 kmem_free(new_ctx);
c7cc296ddd1f6d1 Christoph Hellwig 2020-03-20 1192 return;
71e330b593905e4 Dave Chinner 2010-05-21 1193
7db37c5e6575b22 Dave Chinner 2011-01-27 1194 out_abort_free_ticket:
877cf3473914ae4 Dave Chinner 2021-06-04 1195 xfs_log_ticket_ungrant(log, ctx->ticket);
12e6a0f449d585b Christoph Hellwig 2020-03-20 1196 ASSERT(XLOG_FORCED_SHUTDOWN(log));
12e6a0f449d585b Christoph Hellwig 2020-03-20 1197 xlog_cil_committed(ctx);
4c2d542f2e78653 Dave Chinner 2012-04-23 1198 }
4c2d542f2e78653 Dave Chinner 2012-04-23 1199
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[luto:sched/lazymm 2/10] arch/x86/mm/tlb.c:425:32: error: 'struct mm_struct' has no member named 'membarrier_state'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git sched/lazymm
head: ecc3992c36cb88087df9c537e2326efb51c95e31
commit: 9f81d011fbe6ff333c5a68e317d7ed7835db699d [2/10] x86/mm: Handle unlazying membarrier core sync in the arch code
config: i386-randconfig-r016-20210617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto sched/lazymm
git checkout 9f81d011fbe6ff333c5a68e317d7ed7835db699d
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/init.h:5,
from arch/x86/mm/tlb.c:2:
arch/x86/mm/tlb.c: In function 'sync_core_if_membarrier_enabled':
>> arch/x86/mm/tlb.c:425:32: error: 'struct mm_struct' has no member named 'membarrier_state'
425 | if (unlikely(atomic_read(&next->membarrier_state) &
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
>> arch/x86/mm/tlb.c:426:8: error: 'MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE' undeclared (first use in this function)
426 | MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
arch/x86/mm/tlb.c:426:8: note: each undeclared identifier is reported only once for each function it appears in
426 | MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
vim +425 arch/x86/mm/tlb.c
422
423 static void sync_core_if_membarrier_enabled(struct mm_struct *next)
424 {
> 425 if (unlikely(atomic_read(&next->membarrier_state) &
> 426 MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE))
427 sync_core_before_usermode();
428 }
429
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 8612/10875] arch/arm/mach-imx/src.c:103:6: warning: no previous prototype for 'imx_gpcv2_set_core1_pdn_pup_by_software'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7d9c6b8147bdd76d7eb2cf6f74f84c6918ae0939
commit: e34645f45805d8308866de7b69f117f554605bb6 [8612/10875] ARM: imx: add smp support for imx7d
config: arm-randconfig-r011-20210617 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout e34645f45805d8308866de7b69f117f554605bb6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mach-imx/src.c:103:6: warning: no previous prototype for 'imx_gpcv2_set_core1_pdn_pup_by_software' [-Wmissing-prototypes]
103 | void imx_gpcv2_set_core1_pdn_pup_by_software(bool pdn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/imx_gpcv2_set_core1_pdn_pup_by_software +103 arch/arm/mach-imx/src.c
93
94 /*
95 * The motivation for bringing up the second i.MX7D core inside the kernel
96 * is that legacy vendor bootloaders usually do not implement PSCI support.
97 * This is a significant blocker for systems in the field that are running old
98 * bootloader versions to upgrade to a modern mainline kernel version, as only
99 * one CPU of the i.MX7D would be brought up.
100 * Bring up the second i.MX7D core inside the kernel to make the migration
101 * path to mainline kernel easier for the existing iMX7D users.
102 */
> 103 void imx_gpcv2_set_core1_pdn_pup_by_software(bool pdn)
104 {
105 u32 reg = pdn ? GPC_CPU_PGC_SW_PDN_REQ : GPC_CPU_PGC_SW_PUP_REQ;
106 u32 val, pup;
107 int ret;
108
109 imx_gpcv2_set_m_core_pgc(true, GPC_PGC_C1);
110 val = readl_relaxed(gpc_base + reg);
111 val |= BM_CPU_PGC_SW_PDN_PUP_REQ_CORE1_A7;
112 writel_relaxed(val, gpc_base + reg);
113
114 ret = readl_relaxed_poll_timeout_atomic(gpc_base + reg, pup,
115 !(pup & BM_CPU_PGC_SW_PDN_PUP_REQ_CORE1_A7),
116 5, 1000000);
117 if (ret < 0) {
118 pr_err("i.MX7D: CORE1_A7 power up timeout\n");
119 val &= ~BM_CPU_PGC_SW_PDN_PUP_REQ_CORE1_A7;
120 writel_relaxed(val, gpc_base + reg);
121 }
122
123 imx_gpcv2_set_m_core_pgc(false, GPC_PGC_C1);
124 }
125
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH net-next v7 1/3] net: flow_dissector: extend bpf flow dissector support with vnet hdr
by kernel test robot
Hi Tanner,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Tanner-Love/virtio_net-add-optio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0c33795231bff5df410bd405b569c66851e92d4b
config: x86_64-randconfig-a014-20210617 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/b03a1eb684b925a09ae011d0e620d98eb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tanner-Love/virtio_net-add-optional-flow-dissection-in-virtio_net_hdr_to_skb/20210617-082208
git checkout b03a1eb684b925a09ae011d0e620d98ebf3b0abd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/core/filter.c:7900:15: error: implicit declaration of function 'bpf_get_btf_vmlinux' [-Werror,-Wimplicit-function-declaration]
info->btf = bpf_get_btf_vmlinux();
^
>> net/core/filter.c:7900:13: warning: incompatible integer to pointer conversion assigning to 'struct btf *' from 'int' [-Wint-conversion]
info->btf = bpf_get_btf_vmlinux();
^ ~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +7900 net/core/filter.c
7884
7885 int bpf_flow_keys_is_valid_access(int off, int size, enum bpf_access_type t,
7886 struct bpf_insn_access_aux *info)
7887 {
7888 if (off < 0 ||
7889 (u64)off + size > offsetofend(struct bpf_flow_keys, vhdr))
7890 return -EACCES;
7891
7892 switch (off) {
7893 case bpf_ctx_range_ptr(struct bpf_flow_keys, vhdr):
7894 if (t == BPF_WRITE || off % size != 0 || size != sizeof(__u64))
7895 return -EACCES;
7896
7897 if (!bpf_flow_dissector_btf_ids[0])
7898 return -EINVAL;
7899
> 7900 info->btf = bpf_get_btf_vmlinux();
7901 info->reg_type = PTR_TO_BTF_ID_OR_NULL;
7902 info->btf_id = bpf_flow_dissector_btf_ids[0];
7903
7904 break;
7905 }
7906
7907 return 0;
7908 }
7909
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 3/8] xfs: move xlog_commit_record to xfs_log_cil.c
by kernel test robot
Hi Dave,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on next-20210616]
[cannot apply to v5.13-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dave-Chinner/xfs-log-fixes-for-f...
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: x86_64-randconfig-a011-20210617 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/8634f301cb32bdc5ebbfcf0671509ca5f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dave-Chinner/xfs-log-fixes-for-for-next/20210617-162640
git checkout 8634f301cb32bdc5ebbfcf0671509ca5fa857edd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/xfs/xfs_log_cil.c:792:1: warning: no previous prototype for function 'xlog_cil_write_commit_record' [-Wmissing-prototypes]
xlog_cil_write_commit_record(
^
fs/xfs/xfs_log_cil.c:791:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
1 warning generated.
vim +/xlog_cil_write_commit_record +792 fs/xfs/xfs_log_cil.c
785
786 /*
787 * Write out the commit record of a checkpoint transaction associated with the
788 * given ticket to close off a running log write. Return the lsn of the commit
789 * record.
790 */
791 int
> 792 xlog_cil_write_commit_record(
793 struct xlog *log,
794 struct xlog_ticket *ticket,
795 struct xlog_in_core **iclog,
796 xfs_lsn_t *lsn)
797 {
798 struct xlog_op_header ophdr = {
799 .oh_clientid = XFS_TRANSACTION,
800 .oh_tid = cpu_to_be32(ticket->t_tid),
801 .oh_flags = XLOG_COMMIT_TRANS,
802 };
803 struct xfs_log_iovec reg = {
804 .i_addr = &ophdr,
805 .i_len = sizeof(struct xlog_op_header),
806 .i_type = XLOG_REG_TYPE_COMMIT,
807 };
808 struct xfs_log_vec vec = {
809 .lv_niovecs = 1,
810 .lv_iovecp = ®,
811 };
812 int error;
813 LIST_HEAD(lv_chain);
814 INIT_LIST_HEAD(&vec.lv_list);
815 list_add(&vec.lv_list, &lv_chain);
816
817 if (XLOG_FORCED_SHUTDOWN(log))
818 return -EIO;
819
820 /* account for space used by record data */
821 ticket->t_curr_res -= reg.i_len;
822 error = xlog_write(log, &lv_chain, ticket, lsn, iclog, reg.i_len);
823 if (error)
824 xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR);
825 return error;
826 }
827
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH -next v3] media: staging: atomisp: use list_splice_init in atomisp_compat_css20.c
by kernel test robot
Hi Baokun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210616]
url: https://github.com/0day-ci/linux/commits/Baokun-Li/media-staging-atomisp-...
base: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/05c714d7b4e1722a75f949e40c5305f3b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Baokun-Li/media-staging-atomisp-use-list_splice_init-in-atomisp_compat_css20-c/20210617-043443
git checkout 05c714d7b4e1722a75f949e40c5305f3ba28d048
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function 'atomisp_css_stop':
>> drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:2156:50: error: 'struct atomisp_sub_device' has no member named 'asd'
2156 | list_splice_init(&asd->metadata_in_css[i], &asd->asd->metadata[i]);
| ^~
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:2157:49: error: 'struct atomisp_sub_device' has no member named 'asd'
2157 | list_splice_init(&asd->metadata_ready[i], &asd->asd->metadata[i]);
| ^~
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:2107:31: warning: unused variable 'md_buf' [-Wunused-variable]
2107 | struct atomisp_metadata_buf *md_buf;
| ^~~~~~
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:2106:26: warning: unused variable 'dis_buf' [-Wunused-variable]
2106 | struct atomisp_dis_buf *dis_buf;
| ^~~~~~~
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:2105:26: warning: unused variable 's3a_buf' [-Wunused-variable]
2105 | struct atomisp_s3a_buf *s3a_buf;
| ^~~~~~~
vim +2156 drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
2100
2101 void atomisp_css_stop(struct atomisp_sub_device *asd,
2102 enum ia_css_pipe_id pipe_id, bool in_reset)
2103 {
2104 struct atomisp_device *isp = asd->isp;
2105 struct atomisp_s3a_buf *s3a_buf;
2106 struct atomisp_dis_buf *dis_buf;
2107 struct atomisp_metadata_buf *md_buf;
2108 unsigned long irqflags;
2109 unsigned int i;
2110
2111 /* if is called in atomisp_reset(), force destroy stream */
2112 if (__destroy_streams(asd, true))
2113 dev_err(isp->dev, "destroy stream failed.\n");
2114
2115 /* if is called in atomisp_reset(), force destroy all pipes */
2116 if (__destroy_pipes(asd, true))
2117 dev_err(isp->dev, "destroy pipes failed.\n");
2118
2119 atomisp_init_raw_buffer_bitmap(asd);
2120
2121 /*
2122 * SP can not be stop if other streams are in use
2123 */
2124 if (atomisp_streaming_count(isp) == 0)
2125 ia_css_stop_sp();
2126
2127 if (!in_reset) {
2128 struct atomisp_stream_env *stream_env;
2129 int i, j;
2130
2131 for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++) {
2132 stream_env = &asd->stream_env[i];
2133 for (j = 0; j < IA_CSS_PIPE_ID_NUM; j++) {
2134 ia_css_pipe_config_defaults(
2135 &stream_env->pipe_configs[j]);
2136 ia_css_pipe_extra_config_defaults(
2137 &stream_env->pipe_extra_configs[j]);
2138 }
2139 ia_css_stream_config_defaults(
2140 &stream_env->stream_config);
2141 }
2142 memset(&asd->params.config, 0, sizeof(asd->params.config));
2143 asd->params.css_update_params_needed = false;
2144 }
2145
2146 /* move stats buffers to free queue list */
2147 list_splice_init(&asd->s3a_stats_in_css, &asd->s3a_stats);
2148 list_splice_init(&asd->s3a_stats_ready, &asd->s3a_stats);
2149
2150 spin_lock_irqsave(&asd->dis_stats_lock, irqflags);
2151 list_splice_init(&asd->dis_stats_in_css, &asd->dis_stats);
2152 asd->params.dis_proj_data_valid = false;
2153 spin_unlock_irqrestore(&asd->dis_stats_lock, irqflags);
2154
2155 for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
> 2156 list_splice_init(&asd->metadata_in_css[i], &asd->asd->metadata[i]);
2157 list_splice_init(&asd->metadata_ready[i], &asd->asd->metadata[i]);
2158 }
2159
2160 atomisp_flush_params_queue(&asd->video_out_capture);
2161 atomisp_flush_params_queue(&asd->video_out_vf);
2162 atomisp_flush_params_queue(&asd->video_out_preview);
2163 atomisp_flush_params_queue(&asd->video_out_video_capture);
2164 atomisp_free_css_parameters(&asd->params.css_param);
2165 memset(&asd->params.css_param, 0, sizeof(asd->params.css_param));
2166 }
2167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 2/4] ext4: Move orphan inode handling into a separate file
by kernel test robot
Hi Jan,
I love your patch! Yet something to improve:
[auto build test ERROR on ext4/dev]
[also build test ERROR on ext3/for_next linus/master v5.13-rc6 next-20210616]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jan-Kara/ext4-Speedup-orphan-fil...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-a011-20210617 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/6b60fad4c555893cdd03e91dbfe31aa6f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jan-Kara/ext4-Speedup-orphan-file-handling/20210617-034806
git checkout 6b60fad4c555893cdd03e91dbfe31aa6fa9c25e7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> fs/ext4/orphan.c:195:9: error: implicit declaration of function 'dquot_quota_on_mount' [-Werror,-Wimplicit-function-declaration]
return dquot_quota_on_mount(sb, EXT4_SB(sb)->s_qf_names[type],
^
fs/ext4/orphan.c:195:9: note: did you mean 'ext4_quota_on_mount'?
fs/ext4/orphan.c:193:12: note: 'ext4_quota_on_mount' declared here
static int ext4_quota_on_mount(struct super_block *sb, int type)
^
>> fs/ext4/orphan.c:195:47: error: no member named 's_qf_names' in 'struct ext4_sb_info'
return dquot_quota_on_mount(sb, EXT4_SB(sb)->s_qf_names[type],
~~~~~~~~~~~ ^
>> fs/ext4/orphan.c:196:19: error: no member named 's_jquota_fmt' in 'struct ext4_sb_info'
EXT4_SB(sb)->s_jquota_fmt, type);
~~~~~~~~~~~ ^
3 errors generated.
vim +/dquot_quota_on_mount +195 fs/ext4/orphan.c
192
193 static int ext4_quota_on_mount(struct super_block *sb, int type)
194 {
> 195 return dquot_quota_on_mount(sb, EXT4_SB(sb)->s_qf_names[type],
> 196 EXT4_SB(sb)->s_jquota_fmt, type);
197 }
198
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months