qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add a disk format named iROW, supporting high-e


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Add a disk format named iROW, supporting high-efficiency VM snapshot
Date: Tue, 29 Jan 2013 15:46:10 -0000

Hi,

Thank you for submitting your patch series.  checkpatch.pl has
detected that one or more of the patches in this series violate
the QEMU coding style.

If you believe this message was sent in error, please ignore it
or respond here with an explanation.

Otherwise, please correct the coding style issues and resubmit a
new version of the patch.

For more information about QEMU coding style, see:

http://git.qemu.org/?p=qemu.git;a=blob_plain;f=CODING_STYLE;hb=HEAD

Here is the output from checkpatch.pl:

Subject: Add a disk format named iROW, supporting high-efficiency VM snapshot
WARNING: line over 80 characters
#34: FILE: block/irow.c:5:
+ * iRow (imporved Redirect-on-Write) is a disk format supporting 
high-efficiency VM disk snapshot.

WARNING: line over 80 characters
#35: FILE: block/irow.c:6:
+ * iROW uses bitmap to reduce the amount of metadata, so that both the VM disk 
snapshot key operations

WARNING: line over 80 characters
#36: FILE: block/irow.c:7:
+ * performance and the VM disk I/O performance would be enhanced at the same 
time.

WARNING: line over 80 characters
#40: FILE: block/irow.c:11:
+ *A snapshot consists of 2 files: a bitmap file (btmp file) and a VM disk data 
file (irvd file).

WARNING: line over 80 characters
#43: FILE: block/irow.c:14:
+ *The meta file consists of the meta header and the snapshots information. The 
meta header is used to

WARNING: line over 80 characters
#44: FILE: block/irow.c:15:
+ *store basic information of VM disk image. The snapshots information 
sequentially stores every snapshot???s name,

WARNING: line over 80 characters
#47: FILE: block/irow.c:18:
+ *The btmp file consists of a bitmap and the VM state data. The bitmap is used 
to indicate whether the

WARNING: line over 80 characters
#48: FILE: block/irow.c:19:
+ *clusters exist in corresponding irvd file. Each cluster in the VM disk image 
is mapped to a bit in the bitmap.

WARNING: line over 80 characters
#50: FILE: block/irow.c:21:
+ *The irvd file is used to store the actual data of the VM disk image. The 
smallest unit of storage is cluster.

WARNING: line over 80 characters
#51: FILE: block/irow.c:22:
+ *iROW does not decide the address of the data clusters. It just writes the 
clusters to the same VM disk image

WARNING: line over 80 characters
#52: FILE: block/irow.c:23:
+ *addresses as the virtual addresses of the clusters. Because of host 
machine???s file system support sparse files,

WARNING: line over 80 characters
#53: FILE: block/irow.c:24:
+ *iROW also achieves the gradual growth of the VM disk image size with the 
actual disk usage.

ERROR: do not initialise globals to 0 or NULL
#64: FILE: block/irow.c:35:
+BDRVIrowState **birows_cache = NULL;

ERROR: do not initialise globals to 0 or NULL
#65: FILE: block/irow.c:36:
+ClusterCache *cluster_cache = NULL;

ERROR: code indent should never use tabs
#74: FILE: block/irow.c:45:
+    ^Iif (size & 1) {$

ERROR: code indent should never use tabs
#75: FILE: block/irow.c:46:
+    ^I^Ireturn -1;$

ERROR: code indent should never use tabs
#85: FILE: block/irow.c:56:
+^Iconst IRowMeta *irow_meta = (const void *)buf;$

ERROR: space required before the open brace '{'
#89: FILE: block/irow.c:60:
+        be32_to_cpu(irow_meta->version) == IROW_VERSION){

ERROR: else should follow close brace '}'
#92: FILE: block/irow.c:63:
+    }
+    else {

ERROR: open brace '{' following function declarations go on the next line
#97: FILE: block/irow.c:68:
+static void irow_close_btmp(BDRVIrowState *s) {

ERROR: code indent should never use tabs
#98: FILE: block/irow.c:69:
+^Iif(s->bitmap) {$

ERROR: space required before the open parenthesis '('
#98: FILE: block/irow.c:69:
+       if(s->bitmap) {

ERROR: code indent should never use tabs
#99: FILE: block/irow.c:70:
+^I^Ig_free(s->bitmap);$

ERROR: code indent should never use tabs
#100: FILE: block/irow.c:71:
+^I^Is->bitmap = NULL;$

ERROR: code indent should never use tabs
#101: FILE: block/irow.c:72:
+^I}$

ERROR: code indent should never use tabs
#103: FILE: block/irow.c:74:
+^Iif(s->irow_btmp) {$

ERROR: space required before the open parenthesis '('
#103: FILE: block/irow.c:74:
+       if(s->irow_btmp) {

ERROR: code indent should never use tabs
#104: FILE: block/irow.c:75:
+^I^Ibdrv_delete(s->irow_btmp);$

ERROR: code indent should never use tabs
#105: FILE: block/irow.c:76:
+^I^Is->irow_btmp = NULL;$

ERROR: code indent should never use tabs
#106: FILE: block/irow.c:77:
+^I}$

ERROR: open brace '{' following function declarations go on the next line
#109: FILE: block/irow.c:80:
+static void irow_close_irvd(BDRVIrowState *s) {

ERROR: code indent should never use tabs
#110: FILE: block/irow.c:81:
+^Iif(s->irow_irvd) {$

ERROR: space required before the open parenthesis '('
#110: FILE: block/irow.c:81:
+       if(s->irow_irvd) {

ERROR: code indent should never use tabs
#111: FILE: block/irow.c:82:
+^I^Ibdrv_delete(s->irow_irvd);$

ERROR: code indent should never use tabs
#112: FILE: block/irow.c:83:
+^I^Is->irow_irvd = NULL;$

ERROR: code indent should never use tabs
#113: FILE: block/irow.c:84:
+^I}$

ERROR: open brace '{' following function declarations go on the next line
#116: FILE: block/irow.c:87:
+static void irow_close_snapshots2(IRowSnapshot *snapshots, int nb_snapshots) {

ERROR: code indent should never use tabs
#117: FILE: block/irow.c:88:
+^Iint i;$

ERROR: code indent should never use tabs
#118: FILE: block/irow.c:89:
+^IIRowSnapshot *snap_ptr;$

ERROR: code indent should never use tabs
#120: FILE: block/irow.c:91:
+^Iif(snapshots == NULL)$

ERROR: space required before the open parenthesis '('
#120: FILE: block/irow.c:91:
+       if(snapshots == NULL)

WARNING: braces {} are necessary for all arms of this statement
#120: FILE: block/irow.c:91:
+       if(snapshots == NULL)
[...]

ERROR: code indent should never use tabs
#121: FILE: block/irow.c:92:
+^I^Ireturn;$

ERROR: code indent should never use tabs
#123: FILE: block/irow.c:94:
+^Ifor(i = 0; i < nb_snapshots; i++) {$

ERROR: space required before the open parenthesis '('
#123: FILE: block/irow.c:94:
+       for(i = 0; i < nb_snapshots; i++) {

ERROR: code indent should never use tabs
#124: FILE: block/irow.c:95:
+^I^Isnap_ptr = snapshots + i;$

ERROR: code indent should never use tabs
#125: FILE: block/irow.c:96:
+^I^Iif(snap_ptr->btmp_file) {$

ERROR: space required before the open parenthesis '('
#125: FILE: block/irow.c:96:
+               if(snap_ptr->btmp_file) {

ERROR: code indent should never use tabs
#126: FILE: block/irow.c:97:
+^I^I^Ig_free(snap_ptr->btmp_file);$

ERROR: code indent should never use tabs
#127: FILE: block/irow.c:98:
+^I^I^Isnap_ptr->btmp_file = NULL;$

ERROR: code indent should never use tabs
#128: FILE: block/irow.c:99:
+^I^I}$

ERROR: code indent should never use tabs
#130: FILE: block/irow.c:101:
+^I^Iif(snap_ptr->irvd_file) {$

ERROR: space required before the open parenthesis '('
#130: FILE: block/irow.c:101:
+               if(snap_ptr->irvd_file) {

ERROR: code indent should never use tabs
#131: FILE: block/irow.c:102:
+^I^I^Ig_free(snap_ptr->irvd_file);$

ERROR: code indent should never use tabs
#132: FILE: block/irow.c:103:
+^I^I^Isnap_ptr->irvd_file = NULL;$

ERROR: code indent should never use tabs
#133: FILE: block/irow.c:104:
+^I^I}$

ERROR: code indent should never use tabs
#135: FILE: block/irow.c:106:
+^I^Iif(snap_ptr->father_btmp_file) {$

ERROR: space required before the open parenthesis '('
#135: FILE: block/irow.c:106:
+               if(snap_ptr->father_btmp_file) {

ERROR: code indent should never use tabs
#136: FILE: block/irow.c:107:
+^I^I^Ig_free(snap_ptr->father_btmp_file);$

ERROR: code indent should never use tabs
#137: FILE: block/irow.c:108:
+^I^I^Isnap_ptr->father_btmp_file = NULL;$

ERROR: code indent should never use tabs
#138: FILE: block/irow.c:109:
+^I^I}$

ERROR: code indent should never use tabs
#140: FILE: block/irow.c:111:
+^I^Iif(snap_ptr->id_str) {$

ERROR: space required before the open parenthesis '('
#140: FILE: block/irow.c:111:
+               if(snap_ptr->id_str) {

ERROR: code indent should never use tabs
#141: FILE: block/irow.c:112:
+^I^I^Ig_free(snap_ptr->id_str);$

ERROR: code indent should never use tabs
#142: FILE: block/irow.c:113:
+^I^I^Isnap_ptr->id_str = NULL;$

ERROR: code indent should never use tabs
#143: FILE: block/irow.c:114:
+^I^I}$

ERROR: code indent should never use tabs
#145: FILE: block/irow.c:116:
+^I^Iif(snap_ptr->name) {$

ERROR: space required before the open parenthesis '('
#145: FILE: block/irow.c:116:
+               if(snap_ptr->name) {

ERROR: code indent should never use tabs
#146: FILE: block/irow.c:117:
+^I^I^Ig_free(snap_ptr->name);$

ERROR: code indent should never use tabs
#147: FILE: block/irow.c:118:
+^I^I^Isnap_ptr->name = NULL;$

ERROR: code indent should never use tabs
#148: FILE: block/irow.c:119:
+^I^I}$

ERROR: code indent should never use tabs
#149: FILE: block/irow.c:120:
+^I}$

ERROR: code indent should never use tabs
#150: FILE: block/irow.c:121:
+^Ig_free(snapshots);$

ERROR: open brace '{' following function declarations go on the next line
#153: FILE: block/irow.c:124:
+static void irow_close_snapshots(BDRVIrowState *birows) {

ERROR: code indent should never use tabs
#154: FILE: block/irow.c:125:
+^Iirow_close_snapshots2(birows->snapshots, birows->nb_snapshots);$

ERROR: code indent should never use tabs
#155: FILE: block/irow.c:126:
+^Ibirows->snapshots = NULL;$

ERROR: open brace '{' following function declarations go on the next line
#158: FILE: block/irow.c:129:
+static void irow_close_meta(BDRVIrowState *s) {

ERROR: code indent should never use tabs
#159: FILE: block/irow.c:130:
+^Iif(s->meta_file) {$

ERROR: space required before the open parenthesis '('
#159: FILE: block/irow.c:130:
+       if(s->meta_file) {

ERROR: code indent should never use tabs
#160: FILE: block/irow.c:131:
+^I^Ig_free(s->meta_file);$

ERROR: code indent should never use tabs
#161: FILE: block/irow.c:132:
+^I^Is->meta_file = NULL;$

ERROR: code indent should never use tabs
#162: FILE: block/irow.c:133:
+^I}$

ERROR: code indent should never use tabs
#164: FILE: block/irow.c:135:
+^Iif(s->current_btmp_file) {$

ERROR: space required before the open parenthesis '('
#164: FILE: block/irow.c:135:
+       if(s->current_btmp_file) {

ERROR: code indent should never use tabs
#165: FILE: block/irow.c:136:
+^I^Ig_free(s->current_btmp_file);$

ERROR: code indent should never use tabs
#166: FILE: block/irow.c:137:
+^I^Is->current_btmp_file = NULL;$

ERROR: code indent should never use tabs
#167: FILE: block/irow.c:138:
+^I}$

ERROR: code indent should never use tabs
#169: FILE: block/irow.c:140:
+^Iif(s->father_btmp_file) {$

ERROR: space required before the open parenthesis '('
#169: FILE: block/irow.c:140:
+       if(s->father_btmp_file) {

ERROR: code indent should never use tabs
#170: FILE: block/irow.c:141:
+^I^Ig_free(s->father_btmp_file);$

ERROR: code indent should never use tabs
#171: FILE: block/irow.c:142:
+^I^Is->father_btmp_file = NULL;$

ERROR: code indent should never use tabs
#172: FILE: block/irow.c:143:
+^I}$

ERROR: code indent should never use tabs
#174: FILE: block/irow.c:145:
+^Iif(s->irvd_file) {$

ERROR: space required before the open parenthesis '('
#174: FILE: block/irow.c:145:
+       if(s->irvd_file) {

ERROR: code indent should never use tabs
#175: FILE: block/irow.c:146:
+^I^Ig_free(s->irvd_file);$

ERROR: code indent should never use tabs
#176: FILE: block/irow.c:147:
+^I^Is->irvd_file = NULL;$

ERROR: code indent should never use tabs
#177: FILE: block/irow.c:148:
+^I}$

ERROR: code indent should never use tabs
#179: FILE: block/irow.c:150:
+^Iif(s->opened_btmp_file) {$

ERROR: space required before the open parenthesis '('
#179: FILE: block/irow.c:150:
+       if(s->opened_btmp_file) {

ERROR: code indent should never use tabs
#180: FILE: block/irow.c:151:
+^I^Ig_free(s->opened_btmp_file);$

ERROR: code indent should never use tabs
#181: FILE: block/irow.c:152:
+^I^Is->opened_btmp_file = NULL;$

ERROR: code indent should never use tabs
#182: FILE: block/irow.c:153:
+^I}$

ERROR: code indent should never use tabs
#184: FILE: block/irow.c:155:
+^Iif(s->irow_meta) {$

ERROR: space required before the open parenthesis '('
#184: FILE: block/irow.c:155:
+       if(s->irow_meta) {

ERROR: code indent should never use tabs
#185: FILE: block/irow.c:156:
+^I^Ibdrv_delete(s->irow_meta);$

ERROR: code indent should never use tabs
#186: FILE: block/irow.c:157:
+^I^Is->irow_meta = NULL;$

ERROR: code indent should never use tabs
#187: FILE: block/irow.c:158:
+^I}$

ERROR: code indent should never use tabs
#188: FILE: block/irow.c:159:
+^Iif(s->snapshots) {$

ERROR: space required before the open parenthesis '('
#188: FILE: block/irow.c:159:
+       if(s->snapshots) {

ERROR: code indent should never use tabs
#189: FILE: block/irow.c:160:
+^I^Iirow_close_snapshots(s);$

ERROR: code indent should never use tabs
#190: FILE: block/irow.c:161:
+^I}$

ERROR: open brace '{' following function declarations go on the next line
#193: FILE: block/irow.c:164:
+static void irow_close_state(BDRVIrowState *s) {

ERROR: code indent should never use tabs
#195: FILE: block/irow.c:166:
+^Iirow_close_meta(s);$

ERROR: code indent should never use tabs
#196: FILE: block/irow.c:167:
+^Iirow_close_btmp(s);$

ERROR: code indent should never use tabs
#197: FILE: block/irow.c:168:
+^Iirow_close_irvd(s);$

ERROR: open brace '{' following function declarations go on the next line
#201: FILE: block/irow.c:172:
+static int irow_check_bitmap(BDRVIrowState *birows) {

ERROR: code indent should never use tabs
#202: FILE: block/irow.c:173:
+^Iuint64_t i;$

ERROR: code indent should never use tabs
#203: FILE: block/irow.c:174:
+^Ifor(i = 0; i < birows->bitmap_size; i++) {$

ERROR: space required before the open parenthesis '('
#203: FILE: block/irow.c:174:
+       for(i = 0; i < birows->bitmap_size; i++) {

ERROR: code indent should never use tabs
#204: FILE: block/irow.c:175:
+^I^Iif(birows->bitmap[i] != 0xff)$

ERROR: space required before the open parenthesis '('
#204: FILE: block/irow.c:175:
+               if(birows->bitmap[i] != 0xff)

WARNING: braces {} are necessary for all arms of this statement
#204: FILE: block/irow.c:175:
+               if(birows->bitmap[i] != 0xff)
[...]

ERROR: code indent should never use tabs
#205: FILE: block/irow.c:176:
+^I^I^Ireturn 0;$

ERROR: code indent should never use tabs
#206: FILE: block/irow.c:177:
+^I}$

ERROR: code indent should never use tabs
#207: FILE: block/irow.c:178:
+^Ireturn 1;$

ERROR: open brace '{' following function declarations go on the next line
#210: FILE: block/irow.c:181:
+static int irow_update_btmp(BDRVIrowState *birows) {

ERROR: code indent should never use tabs
#212: FILE: block/irow.c:183:
+^Iint ret = 0;$

ERROR: code indent should never use tabs
#213: FILE: block/irow.c:184:
+^Iif(birows->bitmap_is_dirty) {$

ERROR: space required before the open parenthesis '('
#213: FILE: block/irow.c:184:
+       if(birows->bitmap_is_dirty) {

WARNING: line over 80 characters
#214: FILE: block/irow.c:185:
+               if(bdrv_pwrite(birows->irow_btmp, 0, birows->bitmap, 
birows->bitmap_size) != birows->bitmap_size) {

ERROR: code indent should never use tabs
#214: FILE: block/irow.c:185:
+^I^Iif(bdrv_pwrite(birows->irow_btmp, 0, birows->bitmap, birows->bitmap_size) 
!= birows->bitmap_size) {$

ERROR: space required before the open parenthesis '('
#214: FILE: block/irow.c:185:
+               if(bdrv_pwrite(birows->irow_btmp, 0, birows->bitmap, 
birows->bitmap_size) != birows->bitmap_size) {

WARNING: line over 80 characters
#215: FILE: block/irow.c:186:
+                       fprintf(stderr, "Failed to write the IROW bitmap data 
to %s\n", birows->opened_btmp_file);

ERROR: code indent should never use tabs
#215: FILE: block/irow.c:186:
+^I^I^Ifprintf(stderr, "Failed to write the IROW bitmap data to %s\n", 
birows->opened_btmp_file);$

ERROR: code indent should never use tabs
#216: FILE: block/irow.c:187:
+^I^I^Iret = -1;$

ERROR: code indent should never use tabs
#217: FILE: block/irow.c:188:
+^I^I^Igoto end;$

ERROR: code indent should never use tabs
#218: FILE: block/irow.c:189:
+^I^I}$

ERROR: code indent should never use tabs
#219: FILE: block/irow.c:190:
+^I^Ibirows->bitmap_is_dirty = 0;$

WARNING: line over 80 characters
#220: FILE: block/irow.c:191:
+               ret = bdrv_truncate(birows->irow_btmp, birows->bitmap_size + 
birows->vm_state_size);

ERROR: code indent should never use tabs
#220: FILE: block/irow.c:191:
+^I^Iret = bdrv_truncate(birows->irow_btmp, birows->bitmap_size + 
birows->vm_state_size);$

ERROR: code indent should never use tabs
#221: FILE: block/irow.c:192:
+^I^Iif(irow_check_bitmap(birows)) {$

ERROR: space required before the open parenthesis '('
#221: FILE: block/irow.c:192:
+               if(irow_check_bitmap(birows)) {

ERROR: code indent should never use tabs
#222: FILE: block/irow.c:193:
+^I^I^Ibirows->complete_image = 1;$

ERROR: code indent should never use tabs
#223: FILE: block/irow.c:194:
+^I^I}$

ERROR: code indent should never use tabs
#224: FILE: block/irow.c:195:
+^I}$

ERROR: code indent should never use tabs
#225: FILE: block/irow.c:196:
+^Iif(birows->vmstate_is_saved) {$

ERROR: space required before the open parenthesis '('
#225: FILE: block/irow.c:196:
+       if(birows->vmstate_is_saved) {

ERROR: code indent should never use tabs
#226: FILE: block/irow.c:197:
+^I^Ibirows->vmstate_is_saved = 0;$

WARNING: line over 80 characters
#227: FILE: block/irow.c:198:
+               ret = bdrv_truncate(birows->irow_btmp, birows->bitmap_size + 
birows->vm_state_size);

ERROR: code indent should never use tabs
#227: FILE: block/irow.c:198:
+^I^Iret = bdrv_truncate(birows->irow_btmp, birows->bitmap_size + 
birows->vm_state_size);$

ERROR: code indent should never use tabs
#228: FILE: block/irow.c:199:
+^I}$

ERROR: code indent should never use tabs
#231: FILE: block/irow.c:202:
+^Ireturn ret;$

WARNING: line over 80 characters
#234: FILE: block/irow.c:205:
+static int irow_update_meta(BDRVIrowState *birows, const char *current_btmp, 
int change_copy_on_demand_state) {

ERROR: open brace '{' following function declarations go on the next line
#234: FILE: block/irow.c:205:
+static int irow_update_meta(BDRVIrowState *birows, const char *current_btmp, 
int change_copy_on_demand_state) {

ERROR: code indent should never use tabs
#235: FILE: block/irow.c:206:
+^Iint i,  ret = 0;$

ERROR: code indent should never use tabs
#236: FILE: block/irow.c:207:
+^Iuint32_t copy_on_demand;$

ERROR: code indent should never use tabs
#237: FILE: block/irow.c:208:
+^IIRowMeta meta;$

ERROR: code indent should never use tabs
#238: FILE: block/irow.c:209:
+^IIRowSnapshotHeader snap_header;$

ERROR: code indent should never use tabs
#239: FILE: block/irow.c:210:
+^IIRowSnapshot *snap_ptr;$

WARNING: line over 80 characters
#241: FILE: block/irow.c:212:
+       if(change_copy_on_demand_state == 0 && birows->snapshots_is_dirty == 0 
&& current_btmp == NULL)

ERROR: code indent should never use tabs
#241: FILE: block/irow.c:212:
+^Iif(change_copy_on_demand_state == 0 && birows->snapshots_is_dirty == 0 && 
current_btmp == NULL)$

ERROR: space required before the open parenthesis '('
#241: FILE: block/irow.c:212:
+       if(change_copy_on_demand_state == 0 && birows->snapshots_is_dirty == 0 
&& current_btmp == NULL)

WARNING: braces {} are necessary for all arms of this statement
#241: FILE: block/irow.c:212:
+       if(change_copy_on_demand_state == 0 && birows->snapshots_is_dirty == 0 
&& current_btmp == NULL)
[...]

ERROR: code indent should never use tabs
#242: FILE: block/irow.c:213:
+^I^Igoto end;$

WARNING: line over 80 characters
#244: FILE: block/irow.c:215:
+       if(bdrv_pread (birows->irow_meta, 0, &meta, sizeof(meta)) != 
sizeof(meta)) {

ERROR: code indent should never use tabs
#244: FILE: block/irow.c:215:
+^Iif(bdrv_pread (birows->irow_meta, 0, &meta, sizeof(meta)) != sizeof(meta)) {$

WARNING: space prohibited between function name and open parenthesis '('
#244: FILE: block/irow.c:215:
+       if(bdrv_pread (birows->irow_meta, 0, &meta, sizeof(meta)) != 
sizeof(meta)) {

ERROR: space required before the open parenthesis '('
#244: FILE: block/irow.c:215:
+       if(bdrv_pread (birows->irow_meta, 0, &meta, sizeof(meta)) != 
sizeof(meta)) {

WARNING: line over 80 characters
#245: FILE: block/irow.c:216:
+                       fprintf (stderr, "Failed to read the meta data from 
%s\n", birows->meta_file);

ERROR: code indent should never use tabs
#245: FILE: block/irow.c:216:
+^I^I^Ifprintf (stderr, "Failed to read the meta data from %s\n", 
birows->meta_file);$

WARNING: space prohibited between function name and open parenthesis '('
#245: FILE: block/irow.c:216:
+                       fprintf (stderr, "Failed to read the meta data from 
%s\n", birows->meta_file);

ERROR: code indent should never use tabs
#246: FILE: block/irow.c:217:
+^I^I^Iret = -1;$

ERROR: code indent should never use tabs
#247: FILE: block/irow.c:218:
+^I^I^Igoto end;$

ERROR: code indent should never use tabs
#248: FILE: block/irow.c:219:
+^I}$

ERROR: code indent should never use tabs
#249: FILE: block/irow.c:220:
+^Iif(change_copy_on_demand_state) {$

ERROR: space required before the open parenthesis '('
#249: FILE: block/irow.c:220:
+       if(change_copy_on_demand_state) {

ERROR: code indent should never use tabs
#250: FILE: block/irow.c:221:
+^I^Icopy_on_demand = meta.copy_on_demand;$

ERROR: code indent should never use tabs
#251: FILE: block/irow.c:222:
+^I^Ibe32_to_cpus(&copy_on_demand);$

ERROR: code indent should never use tabs
#252: FILE: block/irow.c:223:
+^I^Icopy_on_demand = copy_on_demand ? 0 : 1;$

ERROR: code indent should never use tabs
#253: FILE: block/irow.c:224:
+^I^Imeta.copy_on_demand = cpu_to_be32(copy_on_demand);$

ERROR: code indent should never use tabs
#254: FILE: block/irow.c:225:
+^I}$

ERROR: code indent should never use tabs
#255: FILE: block/irow.c:226:
+^Iif(current_btmp != NULL) {$

ERROR: space required before the open parenthesis '('
#255: FILE: block/irow.c:226:
+       if(current_btmp != NULL) {

ERROR: code indent should never use tabs
#256: FILE: block/irow.c:227:
+^I^Imemset(meta.current_btmp, 0, MAX_FILE_NAME_LENGTH);$

ERROR: code indent should never use tabs
#257: FILE: block/irow.c:228:
+^I^Istrncpy(meta.current_btmp, current_btmp, MAX_FILE_NAME_LENGTH);$

ERROR: code indent should never use tabs
#258: FILE: block/irow.c:229:
+^I}$

ERROR: code indent should never use tabs
#260: FILE: block/irow.c:231:
+^Iif(birows->snapshots_is_dirty) {$

ERROR: space required before the open parenthesis '('
#260: FILE: block/irow.c:231:
+       if(birows->snapshots_is_dirty) {

ERROR: code indent should never use tabs
#261: FILE: block/irow.c:232:
+^I^Imeta.nb_snapshots = cpu_to_be32(birows->nb_snapshots);$

ERROR: code indent should never use tabs
#262: FILE: block/irow.c:233:
+^I^Ifor(i = 0; i < birows->nb_snapshots; i++) {$

ERROR: space required before the open parenthesis '('
#262: FILE: block/irow.c:233:
+               for(i = 0; i < birows->nb_snapshots; i++) {

ERROR: code indent should never use tabs
#263: FILE: block/irow.c:234:
+^I^I^Imemset(&snap_header, 0, sizeof(snap_header));$

ERROR: code indent should never use tabs
#264: FILE: block/irow.c:235:
+^I^I^Isnap_ptr = birows->snapshots + i;$

WARNING: line over 80 characters
#265: FILE: block/irow.c:236:
+                       snap_header.snap_magic = 
cpu_to_be32(IROW_SNAPHEADER_MAGIC);

ERROR: code indent should never use tabs
#265: FILE: block/irow.c:236:
+^I^I^Isnap_header.snap_magic = cpu_to_be32(IROW_SNAPHEADER_MAGIC);$

ERROR: code indent should never use tabs
#266: FILE: block/irow.c:237:
+^I^I^Isnap_header.date_sec = snap_ptr->date_sec;$

ERROR: code indent should never use tabs
#267: FILE: block/irow.c:238:
+^I^I^Isnap_header.date_nsec = snap_ptr->date_nsec;$

ERROR: code indent should never use tabs
#268: FILE: block/irow.c:239:
+^I^I^Isnap_header.vm_clock_nsec = snap_ptr->vm_clock_nsec;$

ERROR: code indent should never use tabs
#269: FILE: block/irow.c:240:
+^I^I^Isnap_header.vm_state_size = snap_ptr->vm_state_size;$

ERROR: code indent should never use tabs
#270: FILE: block/irow.c:241:
+^I^I^Isnap_header.nb_children = snap_ptr->nb_children;$

ERROR: code indent should never use tabs
#271: FILE: block/irow.c:242:
+^I^I^Isnap_header.is_deleted = snap_ptr->is_deleted;$

ERROR: code indent should never use tabs
#272: FILE: block/irow.c:243:
+^I^I^Iif(snap_ptr->id_str != NULL)$

ERROR: space required before the open parenthesis '('
#272: FILE: block/irow.c:243:
+                       if(snap_ptr->id_str != NULL)

WARNING: braces {} are necessary for all arms of this statement
#272: FILE: block/irow.c:243:
+                       if(snap_ptr->id_str != NULL)
[...]

WARNING: line over 80 characters
#273: FILE: block/irow.c:244:
+                               strncpy(snap_header.id_str, snap_ptr->id_str, 
128);

ERROR: code indent should never use tabs
#273: FILE: block/irow.c:244:
+^I^I^I^Istrncpy(snap_header.id_str, snap_ptr->id_str, 128);$

ERROR: code indent should never use tabs
#274: FILE: block/irow.c:245:
+^I^I^Iif(snap_ptr->name != NULL)$

ERROR: space required before the open parenthesis '('
#274: FILE: block/irow.c:245:
+                       if(snap_ptr->name != NULL)

WARNING: braces {} are necessary for all arms of this statement
#274: FILE: block/irow.c:245:
+                       if(snap_ptr->name != NULL)
[...]

ERROR: code indent should never use tabs
#275: FILE: block/irow.c:246:
+^I^I^I^Istrncpy(snap_header.name, snap_ptr->name, 256);$

ERROR: code indent should never use tabs
#276: FILE: block/irow.c:247:
+^I^I^Iif(snap_ptr->btmp_file == NULL) {$

ERROR: space required before the open parenthesis '('
#276: FILE: block/irow.c:247:
+                       if(snap_ptr->btmp_file == NULL) {

ERROR: code indent should never use tabs
#277: FILE: block/irow.c:248:
+^I^I^I^Ifprintf(stderr, "Void btmp filename\n");$

ERROR: code indent should never use tabs
#278: FILE: block/irow.c:249:
+^I^I^I^Iret = -1;$

ERROR: code indent should never use tabs
#279: FILE: block/irow.c:250:
+^I^I^I^Igoto end;$

ERROR: code indent should never use tabs
#280: FILE: block/irow.c:251:
+^I^I^I}$

WARNING: line over 80 characters
#281: FILE: block/irow.c:252:
+                       strncpy(snap_header.btmp_file, snap_ptr->btmp_file, 
MAX_FILE_NAME_LENGTH);

ERROR: code indent should never use tabs
#281: FILE: block/irow.c:252:
+^I^I^Istrncpy(snap_header.btmp_file, snap_ptr->btmp_file, 
MAX_FILE_NAME_LENGTH);$

ERROR: code indent should never use tabs
#282: FILE: block/irow.c:253:
+^I^I^Iif(snap_ptr->irvd_file == NULL) {$

ERROR: space required before the open parenthesis '('
#282: FILE: block/irow.c:253:
+                       if(snap_ptr->irvd_file == NULL) {

ERROR: code indent should never use tabs
#283: FILE: block/irow.c:254:
+^I^I^I^Ifprintf(stderr, "Void irvd filename\n");$

ERROR: code indent should never use tabs
#284: FILE: block/irow.c:255:
+^I^I^I^Iret = -1;$

ERROR: code indent should never use tabs
#285: FILE: block/irow.c:256:
+^I^I^I^Igoto end;$

ERROR: code indent should never use tabs
#286: FILE: block/irow.c:257:
+^I^I^I}$

WARNING: line over 80 characters
#287: FILE: block/irow.c:258:
+                       strncpy(snap_header.irvd_file, snap_ptr->irvd_file, 
MAX_FILE_NAME_LENGTH);

ERROR: code indent should never use tabs
#287: FILE: block/irow.c:258:
+^I^I^Istrncpy(snap_header.irvd_file, snap_ptr->irvd_file, 
MAX_FILE_NAME_LENGTH);$

ERROR: code indent should never use tabs
#288: FILE: block/irow.c:259:
+^I^I^Iif(snap_ptr->father_btmp_file != NULL)$

ERROR: space required before the open parenthesis '('
#288: FILE: block/irow.c:259:
+                       if(snap_ptr->father_btmp_file != NULL)

WARNING: braces {} are necessary for all arms of this statement
#288: FILE: block/irow.c:259:
+                       if(snap_ptr->father_btmp_file != NULL)
[...]

WARNING: line over 80 characters
#289: FILE: block/irow.c:260:
+                               strncpy(snap_header.father_btmp_file, 
snap_ptr->father_btmp_file, MAX_FILE_NAME_LENGTH);

ERROR: code indent should never use tabs
#289: FILE: block/irow.c:260:
+^I^I^I^Istrncpy(snap_header.father_btmp_file, snap_ptr->father_btmp_file, 
MAX_FILE_NAME_LENGTH);$

WARNING: line over 80 characters
#291: FILE: block/irow.c:262:
+                       if(bdrv_pwrite(birows->irow_meta, sizeof(meta) + i * 
sizeof(IRowSnapshotHeader), &snap_header, sizeof(snap_header)) != 
sizeof(snap_header)) {

ERROR: code indent should never use tabs
#291: FILE: block/irow.c:262:
+^I^I^Iif(bdrv_pwrite(birows->irow_meta, sizeof(meta) + i * 
sizeof(IRowSnapshotHeader), &snap_header, sizeof(snap_header)) != 
sizeof(snap_header)) {$

ERROR: space required before the open parenthesis '('
#291: FILE: block/irow.c:262:
+                       if(bdrv_pwrite(birows->irow_meta, sizeof(meta) + i * 
sizeof(IRowSnapshotHeader), &snap_header, sizeof(snap_header)) != 
sizeof(snap_header)) {

WARNING: line over 80 characters
#292: FILE: block/irow.c:263:
+                               fprintf (stderr, "Failed to write the snapshot 
#%d info to %s\n", i, birows->meta_file);

ERROR: code indent should never use tabs
#292: FILE: block/irow.c:263:
+^I^I^I^Ifprintf (stderr, "Failed to write the snapshot #%d info to %s\n", i, 
birows->meta_file);$

WARNING: space prohibited between function name and open parenthesis '('
#292: FILE: block/irow.c:263:
+                               fprintf (stderr, "Failed to write the snapshot 
#%d info to %s\n", i, birows->meta_file);

ERROR: code indent should never use tabs
#293: FILE: block/irow.c:264:
+^I^I^I^Iret = -1;$

ERROR: code indent should never use tabs
#294: FILE: block/irow.c:265:
+^I^I^I^Igoto end;$

ERROR: code indent should never use tabs
#295: FILE: block/irow.c:266:
+^I^I^I}$

ERROR: code indent should never use tabs
#296: FILE: block/irow.c:267:
+^I^I}$

ERROR: code indent should never use tabs
#297: FILE: block/irow.c:268:
+^I^Ibirows->snapshots_is_dirty = 0;$

ERROR: code indent should never use tabs
#298: FILE: block/irow.c:269:
+^I}$

WARNING: line over 80 characters
#300: FILE: block/irow.c:271:
+       if(bdrv_pwrite(birows->irow_meta, 0, &meta, sizeof(meta)) != 
sizeof(meta)) {

ERROR: code indent should never use tabs
#300: FILE: block/irow.c:271:
+^Iif(bdrv_pwrite(birows->irow_meta, 0, &meta, sizeof(meta)) != sizeof(meta)) {$

ERROR: space required before the open parenthesis '('
#300: FILE: block/irow.c:271:
+       if(bdrv_pwrite(birows->irow_meta, 0, &meta, sizeof(meta)) != 
sizeof(meta)) {

WARNING: line over 80 characters
#301: FILE: block/irow.c:272:
+               fprintf (stderr, "Failed to write the meta data to %s\n", 
birows->meta_file);

ERROR: code indent should never use tabs
#301: FILE: block/irow.c:272:
+^I^Ifprintf (stderr, "Failed to write the meta data to %s\n", 
birows->meta_file);$

WARNING: space prohibited between function name and open parenthesis '('
#301: FILE: block/irow.c:272:
+               fprintf (stderr, "Failed to write the meta data to %s\n", 
birows->meta_file);

ERROR: code indent should never use tabs
#302: FILE: block/irow.c:273:
[Output truncated]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]