@@ -49,28 +49,31 @@ static int jffs2_rp_can_write(struct jffs2_sb_info *c)
49
49
return 0 ;
50
50
}
51
51
52
+ static int jffs2_do_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
53
+ uint32_t * len , uint32_t sumsize );
54
+
52
55
/**
53
56
* jffs2_reserve_space - request physical space to write nodes to flash
54
57
* @c: superblock info
55
58
* @minsize: Minimum acceptable size of allocation
56
59
* @len: Returned value of allocation length
57
60
* @prio: Allocation type - ALLOC_{NORMAL,DELETION}
61
+ * @sumsize: summary size requested or JFFS2_SUMMARY_NOSUM_SIZE for no summary
62
+ *
63
+ * Requests a block of physical space on the flash.
58
64
*
59
- * Requests a block of physical space on the flash. Returns zero for success
60
- * and puts 'len' into the appropriate place, or returns -ENOSPC or other
61
- * error if appropriate. Doesn't return len since that's
65
+ * Returns: %0 for success and puts 'len' into the appropriate place,
66
+ * or returns -ENOSPC or other error if appropriate.
67
+ * Doesn't return len since that's already returned in @len.
62
68
*
63
- * If it returns zero , jffs2_reserve_space() also downs the per-filesystem
69
+ * If it returns %0 , jffs2_reserve_space() also downs the per-filesystem
64
70
* allocation semaphore, to prevent more than one allocation from being
65
- * active at any time. The semaphore is later released by jffs2_commit_allocation()
71
+ * active at any time. The semaphore is later released by jffs2_commit_allocation().
66
72
*
67
73
* jffs2_reserve_space() may trigger garbage collection in order to make room
68
74
* for the requested allocation.
69
75
*/
70
76
71
- static int jffs2_do_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
72
- uint32_t * len , uint32_t sumsize );
73
-
74
77
int jffs2_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
75
78
uint32_t * len , int prio , uint32_t sumsize )
76
79
{
@@ -488,13 +491,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
488
491
/**
489
492
* jffs2_add_physical_node_ref - add a physical node reference to the list
490
493
* @c: superblock info
491
- * @new: new node reference to add
494
+ * @ofs: offset in the block
492
495
* @len: length of this physical node
496
+ * @ic: inode cache pointer
493
497
*
494
498
* Should only be used to report nodes for which space has been allocated
495
499
* by jffs2_reserve_space.
496
500
*
497
501
* Must be called with the alloc_sem held.
502
+ *
503
+ * Returns: pointer to new node on success or -errno code on error
498
504
*/
499
505
500
506
struct jffs2_raw_node_ref * jffs2_add_physical_node_ref (struct jffs2_sb_info * c ,
0 commit comments