Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1461661 > unrolled thread
| Started by | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| First post | 2016-08-13 19:20 +0200 |
| Last post | 2016-08-16 09:30 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] befs: fix typos in datastream.c Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-13 19:20 +0200
[PATCH 3/3] befs: befs: fix style issues in datastream.c Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-13 19:20 +0200
[PATCH v2 3/3] befs: fix style issues in datastream.c Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-14 19:50 +0200
Re: [PATCH v2 3/3] befs: fix style issues in datastream.c Salah Triki <salah.triki@gmail.com> - 2016-08-16 09:40 +0200
Re: [PATCH 3/3] befs: befs: fix style issues in datastream.c Salah Triki <salah.triki@gmail.com> - 2016-08-16 09:50 +0200
Re: [PATCH 1/3] befs: fix typos in datastream.c Salah Triki <salah.triki@gmail.com> - 2016-08-16 09:30 +0200
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-13 19:20 +0200 |
| Subject | [PATCH 1/3] befs: fix typos in datastream.c |
| Message-ID | <s5KLf-4dd-11@gated-at.bofh.it> |
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> --- Hi, This is a series of patches fixing small issues in datastream.c. On the process of doing the same for the rest of files. To finish cleanup and start adding documentation and new features. Thanks, Luis fs/befs/datastream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index 6889644..b2eb5b5 100644 --- a/fs/befs/datastream.c +++ b/fs/befs/datastream.c @@ -37,7 +37,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb, /** * befs_read_datastream - get buffer_head containing data, starting from pos. * @sb: Filesystem superblock - * @ds: datastrem to find data with + * @ds: datastream to find data with * @pos: start of data * @off: offset of data in buffer_head->b_data * @@ -115,7 +115,7 @@ befs_fblock2brun(struct super_block *sb, const befs_data_stream *data, /** * befs_read_lsmylink - read long symlink from datastream. * @sb: Filesystem superblock - * @ds: Datastrem to read from + * @ds: Datastream to read from * @buff: Buffer in which to place long symlink data * @len: Length of the long symlink in bytes * @@ -183,7 +183,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds) metablocks += ds->indirect.len; /* - Double indir block, plus all the indirect blocks it mapps + Double indir block, plus all the indirect blocks it maps. In the double-indirect range, all block runs of data are BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know how many data block runs are in the double-indirect region, @@ -397,7 +397,7 @@ befs_find_brun_indirect(struct super_block *sb, though the double-indirect run may be several blocks long, we can calculate which of those blocks will contain the index we are after and only read that one. We then follow it to - the indirect block and perform a similar process to find + the indirect block and perform a similar process to find the actual block run that maps the data block we are interested in. -- 2.5.1
[toc] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-13 19:20 +0200 |
| Subject | [PATCH 3/3] befs: befs: fix style issues in datastream.c |
| Message-ID | <s5KLg-4dd-15@gated-at.bofh.it> |
| In reply to | #1461661 |
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>
---
fs/befs/datastream.c | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 5ce85cf..b4c7ba0 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
static int befs_find_brun_direct(struct super_block *sb,
const befs_data_stream *data,
- befs_blocknr_t blockno, befs_block_run * run);
+ befs_blocknr_t blockno, befs_block_run *run);
static int befs_find_brun_indirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run);
+ befs_block_run *run);
static int befs_find_brun_dblindirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run);
+ befs_block_run *run);
/**
* 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,
*/
struct buffer_head *
befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
- befs_off_t pos, uint * off)
+ befs_off_t pos, uint *off)
{
struct buffer_head *bh;
befs_block_run run;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
*/
int
befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
- befs_blocknr_t fblock, befs_block_run * run)
+ befs_blocknr_t fblock, befs_block_run *run)
{
int err;
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,
befs_off_t bytes_read = 0; /* bytes readed */
u16 plen;
struct buffer_head *bh;
+
befs_debug(sb, "---> %s length: %llu", __func__, len);
while (bytes_read < len) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
metablocks += ds->indirect.len;
/*
- Double indir block, plus all the indirect blocks it maps.
- In the double-indirect range, all block runs of data are
- BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
- how many data block runs are in the double-indirect region,
- and from that we know how many indirect blocks it takes to
- map them. We assume that the indirect blocks are also
- BEFS_DBLINDIR_BRUN_LEN blocks long.
+ * Double indir block, plus all the indirect blocks it maps.
+ * In the double-indirect range, all block runs of data are
+ * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
+ * how many data block runs are in the double-indirect region,
+ * and from that we know how many indirect blocks it takes to
+ * map them. We assume that the indirect blocks are also
+ * BEFS_DBLINDIR_BRUN_LEN blocks long.
*/
if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
uint dbl_bytes;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
*/
static int
befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
- befs_blocknr_t blockno, befs_block_run * run)
+ befs_blocknr_t blockno, befs_block_run *run)
{
int i;
const befs_block_run *array = data->direct;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
sum += array[i].len, i++) {
if (blockno >= sum && blockno < sum + (array[i].len)) {
int offset = blockno - sum;
+
run->allocation_group = array[i].allocation_group;
run->start = array[i].start + offset;
run->len = array[i].len - offset;
@@ -304,7 +306,7 @@ static int
befs_find_brun_indirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run)
+ befs_block_run *run)
{
int i, j;
befs_blocknr_t sum = 0;
@@ -413,7 +415,7 @@ static int
befs_find_brun_dblindirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run)
+ befs_block_run *run)
{
int dblindir_indx;
int indir_indx;
--
2.5.1
[toc] | [prev] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-14 19:50 +0200 |
| Subject | [PATCH v2 3/3] befs: fix style issues in datastream.c |
| Message-ID | <s67HP-2CU-1@gated-at.bofh.it> |
| In reply to | #1461662 |
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>
---
Hi,
Removing the second "befs:" that creeped into the subject line of the patch.
Ironic since it is a patch fixing typos.
Errare humanum est.
Thanks,
Luis
fs/befs/datastream.c | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 5ce85cf..b4c7ba0 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
static int befs_find_brun_direct(struct super_block *sb,
const befs_data_stream *data,
- befs_blocknr_t blockno, befs_block_run * run);
+ befs_blocknr_t blockno, befs_block_run *run);
static int befs_find_brun_indirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run);
+ befs_block_run *run);
static int befs_find_brun_dblindirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run);
+ befs_block_run *run);
/**
* 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,
*/
struct buffer_head *
befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
- befs_off_t pos, uint * off)
+ befs_off_t pos, uint *off)
{
struct buffer_head *bh;
befs_block_run run;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
*/
int
befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
- befs_blocknr_t fblock, befs_block_run * run)
+ befs_blocknr_t fblock, befs_block_run *run)
{
int err;
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,
befs_off_t bytes_read = 0; /* bytes readed */
u16 plen;
struct buffer_head *bh;
+
befs_debug(sb, "---> %s length: %llu", __func__, len);
while (bytes_read < len) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
metablocks += ds->indirect.len;
/*
- Double indir block, plus all the indirect blocks it maps.
- In the double-indirect range, all block runs of data are
- BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
- how many data block runs are in the double-indirect region,
- and from that we know how many indirect blocks it takes to
- map them. We assume that the indirect blocks are also
- BEFS_DBLINDIR_BRUN_LEN blocks long.
+ * Double indir block, plus all the indirect blocks it maps.
+ * In the double-indirect range, all block runs of data are
+ * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
+ * how many data block runs are in the double-indirect region,
+ * and from that we know how many indirect blocks it takes to
+ * map them. We assume that the indirect blocks are also
+ * BEFS_DBLINDIR_BRUN_LEN blocks long.
*/
if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
uint dbl_bytes;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
*/
static int
befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
- befs_blocknr_t blockno, befs_block_run * run)
+ befs_blocknr_t blockno, befs_block_run *run)
{
int i;
const befs_block_run *array = data->direct;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
sum += array[i].len, i++) {
if (blockno >= sum && blockno < sum + (array[i].len)) {
int offset = blockno - sum;
+
run->allocation_group = array[i].allocation_group;
run->start = array[i].start + offset;
run->len = array[i].len - offset;
@@ -304,7 +306,7 @@ static int
befs_find_brun_indirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run)
+ befs_block_run *run)
{
int i, j;
befs_blocknr_t sum = 0;
@@ -413,7 +415,7 @@ static int
befs_find_brun_dblindirect(struct super_block *sb,
const befs_data_stream *data,
befs_blocknr_t blockno,
- befs_block_run * run)
+ befs_block_run *run)
{
int dblindir_indx;
int indir_indx;
--
2.5.1
[toc] | [prev] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-16 09:40 +0200 |
| Subject | Re: [PATCH v2 3/3] befs: fix style issues in datastream.c |
| Message-ID | <s6H8D-7r-37@gated-at.bofh.it> |
| In reply to | #1462181 |
On Sun, Aug 14, 2016 at 06:48:36PM +0100, Luis de Bethencourt wrote:
> 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>
> ---
>
> Hi,
>
> Removing the second "befs:" that creeped into the subject line of the patch.
>
> Ironic since it is a patch fixing typos.
> Errare humanum est.
>
> Thanks,
> Luis
>
> fs/befs/datastream.c | 32 +++++++++++++++++---------------
> 1 file changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
> index 5ce85cf..b4c7ba0 100644
> --- a/fs/befs/datastream.c
> +++ b/fs/befs/datastream.c
> @@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
>
> static int befs_find_brun_direct(struct super_block *sb,
> const befs_data_stream *data,
> - befs_blocknr_t blockno, befs_block_run * run);
> + befs_blocknr_t blockno, befs_block_run *run);
>
> static int befs_find_brun_indirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run);
> + befs_block_run *run);
>
> static int befs_find_brun_dblindirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run);
> + befs_block_run *run);
>
> /**
> * 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,
> */
> struct buffer_head *
> befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
> - befs_off_t pos, uint * off)
> + befs_off_t pos, uint *off)
> {
> struct buffer_head *bh;
> befs_block_run run;
> @@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
> */
> int
> befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
> - befs_blocknr_t fblock, befs_block_run * run)
> + befs_blocknr_t fblock, befs_block_run *run)
> {
> int err;
> 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,
> befs_off_t bytes_read = 0; /* bytes readed */
> u16 plen;
> struct buffer_head *bh;
> +
> befs_debug(sb, "---> %s length: %llu", __func__, len);
>
> while (bytes_read < len) {
> @@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
> metablocks += ds->indirect.len;
>
> /*
> - Double indir block, plus all the indirect blocks it maps.
> - In the double-indirect range, all block runs of data are
> - BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
> - how many data block runs are in the double-indirect region,
> - and from that we know how many indirect blocks it takes to
> - map them. We assume that the indirect blocks are also
> - BEFS_DBLINDIR_BRUN_LEN blocks long.
> + * Double indir block, plus all the indirect blocks it maps.
> + * In the double-indirect range, all block runs of data are
> + * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
> + * how many data block runs are in the double-indirect region,
> + * and from that we know how many indirect blocks it takes to
> + * map them. We assume that the indirect blocks are also
> + * BEFS_DBLINDIR_BRUN_LEN blocks long.
> */
> if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
> uint dbl_bytes;
> @@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
> */
> static int
> befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
> - befs_blocknr_t blockno, befs_block_run * run)
> + befs_blocknr_t blockno, befs_block_run *run)
> {
> int i;
> const befs_block_run *array = data->direct;
> @@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
> sum += array[i].len, i++) {
> if (blockno >= sum && blockno < sum + (array[i].len)) {
> int offset = blockno - sum;
> +
> run->allocation_group = array[i].allocation_group;
> run->start = array[i].start + offset;
> run->len = array[i].len - offset;
> @@ -304,7 +306,7 @@ static int
> befs_find_brun_indirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run)
> + befs_block_run *run)
> {
> int i, j;
> befs_blocknr_t sum = 0;
> @@ -413,7 +415,7 @@ static int
> befs_find_brun_dblindirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run)
> + befs_block_run *run)
> {
> int dblindir_indx;
> int indir_indx;
> --
> 2.5.1
>
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Thanks,
Salah
[toc] | [prev] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-16 09:50 +0200 |
| Subject | Re: [PATCH 3/3] befs: befs: fix style issues in datastream.c |
| Message-ID | <s6Hih-c3-3@gated-at.bofh.it> |
| In reply to | #1461662 |
On Sat, Aug 13, 2016 at 06:11:21PM +0100, Luis de Bethencourt wrote:
> 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>
> ---
> fs/befs/datastream.c | 32 +++++++++++++++++---------------
> 1 file changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
> index 5ce85cf..b4c7ba0 100644
> --- a/fs/befs/datastream.c
> +++ b/fs/befs/datastream.c
> @@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
>
> static int befs_find_brun_direct(struct super_block *sb,
> const befs_data_stream *data,
> - befs_blocknr_t blockno, befs_block_run * run);
> + befs_blocknr_t blockno, befs_block_run *run);
>
> static int befs_find_brun_indirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run);
> + befs_block_run *run);
>
> static int befs_find_brun_dblindirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run);
> + befs_block_run *run);
>
> /**
> * 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,
> */
> struct buffer_head *
> befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
> - befs_off_t pos, uint * off)
> + befs_off_t pos, uint *off)
> {
> struct buffer_head *bh;
> befs_block_run run;
> @@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
> */
> int
> befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
> - befs_blocknr_t fblock, befs_block_run * run)
> + befs_blocknr_t fblock, befs_block_run *run)
> {
> int err;
> 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,
> befs_off_t bytes_read = 0; /* bytes readed */
> u16 plen;
> struct buffer_head *bh;
> +
> befs_debug(sb, "---> %s length: %llu", __func__, len);
>
> while (bytes_read < len) {
> @@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
> metablocks += ds->indirect.len;
>
> /*
> - Double indir block, plus all the indirect blocks it maps.
> - In the double-indirect range, all block runs of data are
> - BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
> - how many data block runs are in the double-indirect region,
> - and from that we know how many indirect blocks it takes to
> - map them. We assume that the indirect blocks are also
> - BEFS_DBLINDIR_BRUN_LEN blocks long.
> + * Double indir block, plus all the indirect blocks it maps.
> + * In the double-indirect range, all block runs of data are
> + * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
> + * how many data block runs are in the double-indirect region,
> + * and from that we know how many indirect blocks it takes to
> + * map them. We assume that the indirect blocks are also
> + * BEFS_DBLINDIR_BRUN_LEN blocks long.
> */
> if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
> uint dbl_bytes;
> @@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
> */
> static int
> befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
> - befs_blocknr_t blockno, befs_block_run * run)
> + befs_blocknr_t blockno, befs_block_run *run)
> {
> int i;
> const befs_block_run *array = data->direct;
> @@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
> sum += array[i].len, i++) {
> if (blockno >= sum && blockno < sum + (array[i].len)) {
> int offset = blockno - sum;
> +
> run->allocation_group = array[i].allocation_group;
> run->start = array[i].start + offset;
> run->len = array[i].len - offset;
> @@ -304,7 +306,7 @@ static int
> befs_find_brun_indirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run)
> + befs_block_run *run)
> {
> int i, j;
> befs_blocknr_t sum = 0;
> @@ -413,7 +415,7 @@ static int
> befs_find_brun_dblindirect(struct super_block *sb,
> const befs_data_stream *data,
> befs_blocknr_t blockno,
> - befs_block_run * run)
> + befs_block_run *run)
> {
> int dblindir_indx;
> int indir_indx;
> --
> 2.5.1
>
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Thanks,
Salah
[toc] | [prev] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-16 09:30 +0200 |
| Message-ID | <s6GYV-8vA-7@gated-at.bofh.it> |
| In reply to | #1461661 |
On Sat, Aug 13, 2016 at 06:11:19PM +0100, Luis de Bethencourt wrote: > Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> > --- > > Hi, > > This is a series of patches fixing small issues in datastream.c. > > On the process of doing the same for the rest of files. To finish cleanup > and start adding documentation and new features. > > Thanks, > Luis > > fs/befs/datastream.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c > index 6889644..b2eb5b5 100644 > --- a/fs/befs/datastream.c > +++ b/fs/befs/datastream.c > @@ -37,7 +37,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb, > /** > * befs_read_datastream - get buffer_head containing data, starting from pos. > * @sb: Filesystem superblock > - * @ds: datastrem to find data with > + * @ds: datastream to find data with > * @pos: start of data > * @off: offset of data in buffer_head->b_data > * > @@ -115,7 +115,7 @@ befs_fblock2brun(struct super_block *sb, const befs_data_stream *data, > /** > * befs_read_lsmylink - read long symlink from datastream. > * @sb: Filesystem superblock > - * @ds: Datastrem to read from > + * @ds: Datastream to read from > * @buff: Buffer in which to place long symlink data > * @len: Length of the long symlink in bytes > * > @@ -183,7 +183,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds) > metablocks += ds->indirect.len; > > /* > - Double indir block, plus all the indirect blocks it mapps > + Double indir block, plus all the indirect blocks it maps. > In the double-indirect range, all block runs of data are > BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know > how many data block runs are in the double-indirect region, > @@ -397,7 +397,7 @@ befs_find_brun_indirect(struct super_block *sb, > though the double-indirect run may be several blocks long, > we can calculate which of those blocks will contain the index > we are after and only read that one. We then follow it to > - the indirect block and perform a similar process to find > + the indirect block and perform a similar process to find > the actual block run that maps the data block we are interested > in. > > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.triki@gmail.com> Thanks, Salah
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web