Lines Matching refs:ondisk

935 static bool rbd_dev_ondisk_valid(struct rbd_image_header_ondisk *ondisk)  in rbd_dev_ondisk_valid()  argument
941 if (memcmp(&ondisk->text, RBD_HEADER_TEXT, sizeof (RBD_HEADER_TEXT))) in rbd_dev_ondisk_valid()
946 if (ondisk->options.order < SECTOR_SHIFT) in rbd_dev_ondisk_valid()
951 if (ondisk->options.order > 8 * sizeof (int) - 1) in rbd_dev_ondisk_valid()
958 snap_count = le32_to_cpu(ondisk->snap_count); in rbd_dev_ondisk_valid()
968 if ((u64) size < le64_to_cpu(ondisk->snap_names_len)) in rbd_dev_ondisk_valid()
1003 struct rbd_image_header_ondisk *ondisk) in rbd_header_from_disk() argument
1018 object_prefix = kstrndup(ondisk->object_prefix, in rbd_header_from_disk()
1019 sizeof(ondisk->object_prefix), in rbd_header_from_disk()
1027 snap_count = le32_to_cpu(ondisk->snap_count); in rbd_header_from_disk()
1031 snapc->seq = le64_to_cpu(ondisk->snap_seq); in rbd_header_from_disk()
1034 u64 snap_names_len = le64_to_cpu(ondisk->snap_names_len); in rbd_header_from_disk()
1060 memcpy(snap_names, &ondisk->snaps[snap_count], snap_names_len); in rbd_header_from_disk()
1061 snaps = ondisk->snaps; in rbd_header_from_disk()
1072 header->obj_order = ondisk->options.order; in rbd_header_from_disk()
1082 header->image_size = le64_to_cpu(ondisk->image_size); in rbd_header_from_disk()
4788 struct rbd_image_header_ondisk *ondisk = NULL; in rbd_dev_v1_header_info() local
4804 kfree(ondisk); in rbd_dev_v1_header_info()
4806 size = sizeof (*ondisk); in rbd_dev_v1_header_info()
4809 ondisk = kmalloc(size, GFP_KERNEL); in rbd_dev_v1_header_info()
4810 if (!ondisk) in rbd_dev_v1_header_info()
4814 &rbd_dev->header_oloc, ondisk, size); in rbd_dev_v1_header_info()
4823 if (!rbd_dev_ondisk_valid(ondisk)) { in rbd_dev_v1_header_info()
4829 names_size = le64_to_cpu(ondisk->snap_names_len); in rbd_dev_v1_header_info()
4831 snap_count = le32_to_cpu(ondisk->snap_count); in rbd_dev_v1_header_info()
4834 ret = rbd_header_from_disk(rbd_dev, ondisk); in rbd_dev_v1_header_info()
4836 kfree(ondisk); in rbd_dev_v1_header_info()