• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/partitions/

Lines Matching refs:vb

628 	struct vblk *vb;
645 vb = list_entry (item, struct vblk, list);
646 part = &vb->vblk.part;
758 * @vb: In-memory vblk in which to return information
762 * Return: 'true' @vb contains a Component VBLK
763 * 'false' @vb contents are not defined
765 static bool ldm_parse_cmp3 (const u8 *buffer, int buflen, struct vblk *vb)
770 BUG_ON (!buffer || !vb);
794 comp = &vb->vblk.comp;
809 * @vb: In-memory vblk in which to return information
813 * Return: 'true' @vb contains a Disk Group VBLK
814 * 'false' @vb contents are not defined
816 static int ldm_parse_dgr3 (const u8 *buffer, int buflen, struct vblk *vb)
821 BUG_ON (!buffer || !vb);
843 dgrp = &vb->vblk.dgrp;
853 * @vb: In-memory vblk in which to return information
857 * Return: 'true' @vb contains a Disk Group VBLK
858 * 'false' @vb contents are not defined
860 static bool ldm_parse_dgr4 (const u8 *buffer, int buflen, struct vblk *vb)
866 BUG_ON (!buffer || !vb);
887 dgrp = &vb->vblk.dgrp;
897 * @vb: In-memory vblk in which to return information
901 * Return: 'true' @vb contains a Disk VBLK
902 * 'false' @vb contents are not defined
904 static bool ldm_parse_dsk3 (const u8 *buffer, int buflen, struct vblk *vb)
909 BUG_ON (!buffer || !vb);
923 disk = &vb->vblk.disk;
936 * @vb: In-memory vblk in which to return information
940 * Return: 'true' @vb contains a Disk VBLK
941 * 'false' @vb contents are not defined
943 static bool ldm_parse_dsk4 (const u8 *buffer, int buflen, struct vblk *vb)
948 BUG_ON (!buffer || !vb);
960 disk = &vb->vblk.disk;
969 * @vb: In-memory vblk in which to return information
973 * Return: 'true' @vb contains a Partition VBLK
974 * 'false' @vb contents are not defined
976 static bool ldm_parse_prt3(const u8 *buffer, int buflen, struct vblk *vb)
981 BUG_ON(!buffer || !vb);
1028 part = &vb->vblk.part;
1034 if (vb->flags & VBLK_FLAG_PART_INDEX)
1045 * @vb: In-memory vblk in which to return information
1049 * Return: 'true' @vb contains a Volume VBLK
1050 * 'false' @vb contents are not defined
1052 static bool ldm_parse_vol5 (const u8 *buffer, int buflen, struct vblk *vb)
1058 BUG_ON (!buffer || !vb);
1094 volu = &vb->vblk.volu;
1114 * @vb: In-memory vblk in which to return information
1120 * Return: 'true' @vb contains a VBLK
1121 * 'false' @vb contents are not defined
1123 static bool ldm_parse_vblk (const u8 *buf, int len, struct vblk *vb)
1128 BUG_ON (!buf || !vb);
1136 vb->flags = buf[0x12];
1137 vb->type = buf[0x13];
1138 vb->obj_id = ldm_get_vnum (buf + 0x18);
1139 ldm_get_vstr (buf+0x18+r_objid, vb->name, sizeof (vb->name));
1141 switch (vb->type) {
1142 case VBLK_CMP3: result = ldm_parse_cmp3 (buf, len, vb); break;
1143 case VBLK_DSK3: result = ldm_parse_dsk3 (buf, len, vb); break;
1144 case VBLK_DSK4: result = ldm_parse_dsk4 (buf, len, vb); break;
1145 case VBLK_DGR3: result = ldm_parse_dgr3 (buf, len, vb); break;
1146 case VBLK_DGR4: result = ldm_parse_dgr4 (buf, len, vb); break;
1147 case VBLK_PRT3: result = ldm_parse_prt3 (buf, len, vb); break;
1148 case VBLK_VOL5: result = ldm_parse_vol5 (buf, len, vb); break;
1153 (unsigned long long) vb->obj_id, vb->type);
1156 (unsigned long long) vb->obj_id, vb->type);
1177 struct vblk *vb;
1182 vb = kmalloc (sizeof (*vb), GFP_KERNEL);
1183 if (!vb) {
1188 if (!ldm_parse_vblk (data, len, vb)) {
1189 kfree(vb);
1194 switch (vb->type) {
1197 list_add (&vb->list, &ldb->v_dgrp);
1201 list_add (&vb->list, &ldb->v_disk);
1204 list_add (&vb->list, &ldb->v_volu);
1207 list_add (&vb->list, &ldb->v_comp);
1213 if ((v->vblk.part.disk_id == vb->vblk.part.disk_id) &&
1214 (v->vblk.part.start > vb->vblk.part.start)) {
1215 list_add_tail (&vb->list, &v->list);
1219 list_add_tail (&vb->list, &ldb->v_part);