Lines Matching refs:from

58  * search from @first to find the next perag with the given tag set.
157 * we never read counters from such superblocks.
292 * More sanity checking. Most of these were stolen directly from
331 /* Validate the realtime geometry; stolen from xfs_repair */
420 * superblock. mkfs doesn't clear the flag from secondary supers, so
485 xfs_dsb_t *from,
488 to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
489 to->sb_blocksize = be32_to_cpu(from->sb_blocksize);
490 to->sb_dblocks = be64_to_cpu(from->sb_dblocks);
491 to->sb_rblocks = be64_to_cpu(from->sb_rblocks);
492 to->sb_rextents = be64_to_cpu(from->sb_rextents);
493 memcpy(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid));
494 to->sb_logstart = be64_to_cpu(from->sb_logstart);
495 to->sb_rootino = be64_to_cpu(from->sb_rootino);
496 to->sb_rbmino = be64_to_cpu(from->sb_rbmino);
497 to->sb_rsumino = be64_to_cpu(from->sb_rsumino);
498 to->sb_rextsize = be32_to_cpu(from->sb_rextsize);
499 to->sb_agblocks = be32_to_cpu(from->sb_agblocks);
500 to->sb_agcount = be32_to_cpu(from->sb_agcount);
501 to->sb_rbmblocks = be32_to_cpu(from->sb_rbmblocks);
502 to->sb_logblocks = be32_to_cpu(from->sb_logblocks);
503 to->sb_versionnum = be16_to_cpu(from->sb_versionnum);
504 to->sb_sectsize = be16_to_cpu(from->sb_sectsize);
505 to->sb_inodesize = be16_to_cpu(from->sb_inodesize);
506 to->sb_inopblock = be16_to_cpu(from->sb_inopblock);
507 memcpy(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname));
508 to->sb_blocklog = from->sb_blocklog;
509 to->sb_sectlog = from->sb_sectlog;
510 to->sb_inodelog = from->sb_inodelog;
511 to->sb_inopblog = from->sb_inopblog;
512 to->sb_agblklog = from->sb_agblklog;
513 to->sb_rextslog = from->sb_rextslog;
514 to->sb_inprogress = from->sb_inprogress;
515 to->sb_imax_pct = from->sb_imax_pct;
516 to->sb_icount = be64_to_cpu(from->sb_icount);
517 to->sb_ifree = be64_to_cpu(from->sb_ifree);
518 to->sb_fdblocks = be64_to_cpu(from->sb_fdblocks);
519 to->sb_frextents = be64_to_cpu(from->sb_frextents);
520 to->sb_uquotino = be64_to_cpu(from->sb_uquotino);
521 to->sb_gquotino = be64_to_cpu(from->sb_gquotino);
522 to->sb_qflags = be16_to_cpu(from->sb_qflags);
523 to->sb_flags = from->sb_flags;
524 to->sb_shared_vn = from->sb_shared_vn;
525 to->sb_inoalignmt = be32_to_cpu(from->sb_inoalignmt);
526 to->sb_unit = be32_to_cpu(from->sb_unit);
527 to->sb_width = be32_to_cpu(from->sb_width);
528 to->sb_dirblklog = from->sb_dirblklog;
529 to->sb_logsectlog = from->sb_logsectlog;
530 to->sb_logsectsize = be16_to_cpu(from->sb_logsectsize);
531 to->sb_logsunit = be32_to_cpu(from->sb_logsunit);
532 to->sb_features2 = be32_to_cpu(from->sb_features2);
533 to->sb_bad_features2 = be32_to_cpu(from->sb_bad_features2);
534 to->sb_features_compat = be32_to_cpu(from->sb_features_compat);
535 to->sb_features_ro_compat = be32_to_cpu(from->sb_features_ro_compat);
536 to->sb_features_incompat = be32_to_cpu(from->sb_features_incompat);
538 be32_to_cpu(from->sb_features_log_incompat);
541 to->sb_spino_align = be32_to_cpu(from->sb_spino_align);
542 to->sb_pquotino = be64_to_cpu(from->sb_pquotino);
543 to->sb_lsn = be64_to_cpu(from->sb_lsn);
545 * sb_meta_uuid is only on disk if it differs from sb_uuid and the
549 uuid_copy(&to->sb_meta_uuid, &from->sb_meta_uuid);
551 uuid_copy(&to->sb_meta_uuid, &from->sb_uuid);
560 xfs_dsb_t *from)
562 __xfs_sb_from_disk(to, from, true);
568 struct xfs_sb *from)
570 uint16_t qflags = from->sb_qflags;
572 to->sb_uquotino = cpu_to_be64(from->sb_uquotino);
573 if (xfs_sb_version_has_pquotino(from)) {
574 to->sb_qflags = cpu_to_be16(from->sb_qflags);
575 to->sb_gquotino = cpu_to_be64(from->sb_gquotino);
576 to->sb_pquotino = cpu_to_be64(from->sb_pquotino);
588 if (from->sb_qflags &
591 if (from->sb_qflags &
598 * of superblock that do not have pquotino. from->sb_flags
605 if (from->sb_qflags & XFS_GQUOTA_ACCT)
606 to->sb_gquotino = cpu_to_be64(from->sb_gquotino);
607 else if (from->sb_qflags & XFS_PQUOTA_ACCT)
608 to->sb_gquotino = cpu_to_be64(from->sb_pquotino);
616 if (from->sb_gquotino == NULLFSINO &&
617 from->sb_pquotino == NULLFSINO)
627 struct xfs_sb *from)
629 xfs_sb_quota_to_disk(to, from);
631 to->sb_magicnum = cpu_to_be32(from->sb_magicnum);
632 to->sb_blocksize = cpu_to_be32(from->sb_blocksize);
633 to->sb_dblocks = cpu_to_be64(from->sb_dblocks);
634 to->sb_rblocks = cpu_to_be64(from->sb_rblocks);
635 to->sb_rextents = cpu_to_be64(from->sb_rextents);
636 memcpy(&to->sb_uuid, &from->sb_uuid, sizeof(to->sb_uuid));
637 to->sb_logstart = cpu_to_be64(from->sb_logstart);
638 to->sb_rootino = cpu_to_be64(from->sb_rootino);
639 to->sb_rbmino = cpu_to_be64(from->sb_rbmino);
640 to->sb_rsumino = cpu_to_be64(from->sb_rsumino);
641 to->sb_rextsize = cpu_to_be32(from->sb_rextsize);
642 to->sb_agblocks = cpu_to_be32(from->sb_agblocks);
643 to->sb_agcount = cpu_to_be32(from->sb_agcount);
644 to->sb_rbmblocks = cpu_to_be32(from->sb_rbmblocks);
645 to->sb_logblocks = cpu_to_be32(from->sb_logblocks);
646 to->sb_versionnum = cpu_to_be16(from->sb_versionnum);
647 to->sb_sectsize = cpu_to_be16(from->sb_sectsize);
648 to->sb_inodesize = cpu_to_be16(from->sb_inodesize);
649 to->sb_inopblock = cpu_to_be16(from->sb_inopblock);
650 memcpy(&to->sb_fname, &from->sb_fname, sizeof(to->sb_fname));
651 to->sb_blocklog = from->sb_blocklog;
652 to->sb_sectlog = from->sb_sectlog;
653 to->sb_inodelog = from->sb_inodelog;
654 to->sb_inopblog = from->sb_inopblog;
655 to->sb_agblklog = from->sb_agblklog;
656 to->sb_rextslog = from->sb_rextslog;
657 to->sb_inprogress = from->sb_inprogress;
658 to->sb_imax_pct = from->sb_imax_pct;
659 to->sb_icount = cpu_to_be64(from->sb_icount);
660 to->sb_ifree = cpu_to_be64(from->sb_ifree);
661 to->sb_fdblocks = cpu_to_be64(from->sb_fdblocks);
662 to->sb_frextents = cpu_to_be64(from->sb_frextents);
664 to->sb_flags = from->sb_flags;
665 to->sb_shared_vn = from->sb_shared_vn;
666 to->sb_inoalignmt = cpu_to_be32(from->sb_inoalignmt);
667 to->sb_unit = cpu_to_be32(from->sb_unit);
668 to->sb_width = cpu_to_be32(from->sb_width);
669 to->sb_dirblklog = from->sb_dirblklog;
670 to->sb_logsectlog = from->sb_logsectlog;
671 to->sb_logsectsize = cpu_to_be16(from->sb_logsectsize);
672 to->sb_logsunit = cpu_to_be32(from->sb_logsunit);
679 from->sb_bad_features2 = from->sb_features2;
680 to->sb_features2 = cpu_to_be32(from->sb_features2);
681 to->sb_bad_features2 = cpu_to_be32(from->sb_bad_features2);
683 if (xfs_sb_version_hascrc(from)) {
684 to->sb_features_compat = cpu_to_be32(from->sb_features_compat);
686 cpu_to_be32(from->sb_features_ro_compat);
688 cpu_to_be32(from->sb_features_incompat);
690 cpu_to_be32(from->sb_features_log_incompat);
691 to->sb_spino_align = cpu_to_be32(from->sb_spino_align);
692 to->sb_lsn = cpu_to_be64(from->sb_lsn);
693 if (xfs_sb_version_hasmetauuid(from))
694 uuid_copy(&to->sb_meta_uuid, &from->sb_meta_uuid);
721 * superblock from disk order just to check the version number
829 * fields from the superblock associated with the given
925 * will prevent xfs_repair from fixing anything.
949 * level of locking that is needed to protect the in-core superblock from
965 * the counters from the AGF block counts.
1011 * secondary superblock buffers, there is no need to read them in from disk.