• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/jffs2/

Lines Matching defs:summary

26 	c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
28 if (!c->summary) {
29 JFFS2_WARNING("Can't allocate memory for summary information!\n");
33 c->summary->sum_buf = vmalloc(c->sector_size);
35 if (!c->summary->sum_buf) {
36 JFFS2_WARNING("Can't allocate buffer for writing out summary information!\n");
37 kfree(c->summary);
50 jffs2_sum_disable_collecting(c->summary);
52 vfree(c->summary->sum_buf);
53 c->summary->sum_buf = NULL;
55 kfree(c->summary);
56 c->summary = NULL;
71 dbg_summary("inode (%u) added to summary\n",
77 dbg_summary("dirent (%u) added to summary\n",
84 dbg_summary("xattr (xid=%u, version=%u) added to summary\n",
90 dbg_summary("xref added to summary\n");
102 /* The following 3 functions are called from scan.c to collect summary info for not closed jeb */
187 /* Cleanup every collected summary information */
225 /* Move the collected summary information into sb (called from scan.c) */
230 c->summary->sum_size, c->summary->sum_num,
233 c->summary->sum_size = s->sum_size;
234 c->summary->sum_num = s->sum_num;
235 c->summary->sum_padded = s->sum_padded;
236 c->summary->sum_list_head = s->sum_list_head;
237 c->summary->sum_list_tail = s->sum_list_tail;
250 if (c->summary->sum_size == JFFS2_SUMMARY_NOSUM_SIZE) {
251 dbg_summary("Summary is disabled for this jeb! Skipping summary info!\n");
274 return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp);
308 return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp);
324 return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp);
335 return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp);
340 c->summary->sum_padded += je32_to_cpu(node->u.totlen);
353 summary support for it or disable summary.
380 /* Process the stored summary information - helper function for jffs2_sum_scan_sumnode() */
383 struct jffs2_raw_summary *summary, uint32_t *pseudo_random)
391 sp = summary->sum;
393 for (i=0; i<je32_to_cpu(summary->sum_num); i++) {
394 dbg_summary("processing summary index %d\n", i);
530 JFFS2_WARNING("Unsupported node type %x found in summary! Exiting...\n", nodetype);
550 /* Process the summary node - called from jffs2_scan_eraseblock() */
552 struct jffs2_raw_summary *summary, uint32_t sumsize,
561 dbg_summary("summary found for 0x%08x at 0x%08x (0x%x bytes)\n",
567 crcnode.totlen = summary->totlen;
570 if (je32_to_cpu(summary->hdr_crc) != crc) {
572 "no summary at all)\n");
576 if (je32_to_cpu(summary->totlen) != sumsize) {
581 crc = crc32(0, summary, sizeof(struct jffs2_raw_summary)-8);
583 if (je32_to_cpu(summary->node_crc) != crc) {
588 crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_raw_summary));
590 if (je32_to_cpu(summary->sum_crc) != crc) {
595 if ( je32_to_cpu(summary->cln_mkr) ) {
603 if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) {
605 je32_to_cpu(summary->cln_mkr), c->cleanmarker_size);
606 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
611 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
615 je32_to_cpu(summary->cln_mkr), NULL);
619 ret = jffs2_sum_process_sum_data(c, jeb, summary, pseudo_random);
635 JFFS2_WARNING("Free size 0x%x bytes in eraseblock @0x%08x with summary?\n",
646 JFFS2_WARNING("Summary node crc error, skipping summary information.\n");
651 /* Write summary data to flash - helper function for jffs2_sum_write_sumnode() */
665 memset(c->summary->sum_buf, 0xff, datasize);
672 isum.padded = cpu_to_je32(c->summary->sum_padded);
674 isum.sum_num = cpu_to_je32(c->summary->sum_num);
675 wpage = c->summary->sum_buf;
677 while (c->summary->sum_num) {
678 temp = c->summary->sum_list_head;
718 temp = c->summary->sum_list_head;
731 temp = c->summary->sum_list_head;
744 jffs2_sum_disable_collecting(c->summary);
746 BUG(); /* unknown node in summary information */
751 c->summary->sum_list_head = temp->u.next;
754 c->summary->sum_num--;
757 jffs2_sum_reset_collected(c->summary);
765 isum.sum_crc = cpu_to_je32(crc32(0, c->summary->sum_buf, datasize));
770 vecs[1].iov_base = c->summary->sum_buf;
792 c->summary->sum_size = JFFS2_SUMMARY_NOSUM_SIZE;
804 /* Write out summary information - called from jffs2_do_reserve_space */
819 if (!c->summary->sum_num || !c->summary->sum_list_head) {
820 JFFS2_WARNING("Empty summary info!!!\n");
824 datasize = c->summary->sum_size + sizeof(struct jffs2_sum_marker);
830 /* Is there enough space for summary? */
832 /* don't try to write out summary for this jeb */
833 jffs2_sum_disable_collecting(c->summary);
835 JFFS2_WARNING("Not enough space for summary, padsize = %d\n", padsize);