aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2016-08-13 13:11:21 -0400
committerLuis de Bethencourt <luisbg@osg.samsung.com>2016-10-08 05:01:36 -0400
commita17e7d2010b44103e3b8e00d0c8c510606457bc6 (patch)
tree6f4cda208cc55a4ae18a9fc38d285ea1a6ce147b /fs
parenta20af5f9eaac083e2865e94f37e47af74d70f187 (diff)
befs: befs: fix style issues in datastream.c
Fixing the following checkpatch.pl errors: ERROR: "foo * bar" should be "foo *bar" + befs_blocknr_t blockno, befs_block_run * run); WARNING: Missing a blank line after declarations + struct buffer_head *bh; + befs_debug(sb, "---> %s length: %llu", __func__, len); WARNING: Block comments use * on subsequent lines + /* + Double indir block, plus all the indirect blocks it maps. (and other instances of these) Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Salah Triki <salah.triki@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/befs/datastream.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 5ce85cfd8ae1..b4c7ba013c0d 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
22 22
23static int befs_find_brun_direct(struct super_block *sb, 23static int befs_find_brun_direct(struct super_block *sb,
24 const befs_data_stream *data, 24 const befs_data_stream *data,
25 befs_blocknr_t blockno, befs_block_run * run); 25 befs_blocknr_t blockno, befs_block_run *run);
26 26
27static int befs_find_brun_indirect(struct super_block *sb, 27static int befs_find_brun_indirect(struct super_block *sb,
28 const befs_data_stream *data, 28 const befs_data_stream *data,
29 befs_blocknr_t blockno, 29 befs_blocknr_t blockno,
30 befs_block_run * run); 30 befs_block_run *run);
31 31
32static int befs_find_brun_dblindirect(struct super_block *sb, 32static int befs_find_brun_dblindirect(struct super_block *sb,
33 const befs_data_stream *data, 33 const befs_data_stream *data,
34 befs_blocknr_t blockno, 34 befs_blocknr_t blockno,
35 befs_block_run * run); 35 befs_block_run *run);
36 36
37/** 37/**
38 * befs_read_datastream - get buffer_head containing data, starting from pos. 38 * befs_read_datastream - get buffer_head containing data, starting from pos.
@@ -46,7 +46,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb,
46 */ 46 */
47struct buffer_head * 47struct buffer_head *
48befs_read_datastream(struct super_block *sb, const befs_data_stream *ds, 48befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
49 befs_off_t pos, uint * off) 49 befs_off_t pos, uint *off)
50{ 50{
51 struct buffer_head *bh; 51 struct buffer_head *bh;
52 befs_block_run run; 52 befs_block_run run;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
94 */ 94 */
95int 95int
96befs_fblock2brun(struct super_block *sb, const befs_data_stream *data, 96befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
97 befs_blocknr_t fblock, befs_block_run * run) 97 befs_blocknr_t fblock, befs_block_run *run)
98{ 98{
99 int err; 99 int err;
100 befs_off_t pos = fblock << BEFS_SB(sb)->block_shift; 100 befs_off_t pos = fblock << BEFS_SB(sb)->block_shift;
@@ -134,6 +134,7 @@ befs_read_lsymlink(struct super_block *sb, const befs_data_stream *ds,
134 befs_off_t bytes_read = 0; /* bytes readed */ 134 befs_off_t bytes_read = 0; /* bytes readed */
135 u16 plen; 135 u16 plen;
136 struct buffer_head *bh; 136 struct buffer_head *bh;
137
137 befs_debug(sb, "---> %s length: %llu", __func__, len); 138 befs_debug(sb, "---> %s length: %llu", __func__, len);
138 139
139 while (bytes_read < len) { 140 while (bytes_read < len) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
189 metablocks += ds->indirect.len; 190 metablocks += ds->indirect.len;
190 191
191 /* 192 /*
192 Double indir block, plus all the indirect blocks it maps. 193 * Double indir block, plus all the indirect blocks it maps.
193 In the double-indirect range, all block runs of data are 194 * In the double-indirect range, all block runs of data are
194 BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know 195 * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
195 how many data block runs are in the double-indirect region, 196 * how many data block runs are in the double-indirect region,
196 and from that we know how many indirect blocks it takes to 197 * and from that we know how many indirect blocks it takes to
197 map them. We assume that the indirect blocks are also 198 * map them. We assume that the indirect blocks are also
198 BEFS_DBLINDIR_BRUN_LEN blocks long. 199 * BEFS_DBLINDIR_BRUN_LEN blocks long.
199 */ 200 */
200 if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) { 201 if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
201 uint dbl_bytes; 202 uint dbl_bytes;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
249 */ 250 */
250static int 251static int
251befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data, 252befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
252 befs_blocknr_t blockno, befs_block_run * run) 253 befs_blocknr_t blockno, befs_block_run *run)
253{ 254{
254 int i; 255 int i;
255 const befs_block_run *array = data->direct; 256 const befs_block_run *array = data->direct;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
261 sum += array[i].len, i++) { 262 sum += array[i].len, i++) {
262 if (blockno >= sum && blockno < sum + (array[i].len)) { 263 if (blockno >= sum && blockno < sum + (array[i].len)) {
263 int offset = blockno - sum; 264 int offset = blockno - sum;
265
264 run->allocation_group = array[i].allocation_group; 266 run->allocation_group = array[i].allocation_group;
265 run->start = array[i].start + offset; 267 run->start = array[i].start + offset;
266 run->len = array[i].len - offset; 268 run->len = array[i].len - offset;
@@ -304,7 +306,7 @@ static int
304befs_find_brun_indirect(struct super_block *sb, 306befs_find_brun_indirect(struct super_block *sb,
305 const befs_data_stream *data, 307 const befs_data_stream *data,
306 befs_blocknr_t blockno, 308 befs_blocknr_t blockno,
307 befs_block_run * run) 309 befs_block_run *run)
308{ 310{
309 int i, j; 311 int i, j;
310 befs_blocknr_t sum = 0; 312 befs_blocknr_t sum = 0;
@@ -413,7 +415,7 @@ static int
413befs_find_brun_dblindirect(struct super_block *sb, 415befs_find_brun_dblindirect(struct super_block *sb,
414 const befs_data_stream *data, 416 const befs_data_stream *data,
415 befs_blocknr_t blockno, 417 befs_blocknr_t blockno,
416 befs_block_run * run) 418 befs_block_run *run)
417{ 419{
418 int dblindir_indx; 420 int dblindir_indx;
419 int indir_indx; 421 int indir_indx;