Re: [PATCH] befs: return BEFS_ERR if validation of ag_shift fails

2016-08-16 Thread Salah Triki
On Fri, Aug 12, 2016 at 12:00:34PM +0100, Luis de Bethencourt wrote: > On 12/08/16 11:12, Salah Triki wrote: > > ag_shift is used by blockno2iaddr() to get allocation group number > > from block. If ag_shift is inconsistent with block_per_ag, an out of > > bounds allocation gr

Re: [PATCH] befs: return BEFS_ERR if validation of ag_shift fails

2016-08-16 Thread Salah Triki
On Fri, Aug 12, 2016 at 12:00:34PM +0100, Luis de Bethencourt wrote: > On 12/08/16 11:12, Salah Triki wrote: > > ag_shift is used by blockno2iaddr() to get allocation group number > > from block. If ag_shift is inconsistent with block_per_ag, an out of > > bounds allocation gr

Re: [PATCH 3/3] befs: befs: fix style issues in datastream.c

2016-08-16 Thread Salah Triki
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.tr...@gmail.com> Thanks, Salah

Re: [PATCH 3/3] befs: befs: fix style issues in datastream.c

2016-08-16 Thread Salah Triki
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 Thanks, Salah

Re: [PATCH v2 3/3] befs: fix style issues in datastream.c

2016-08-16 Thread Salah Triki
[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, > -

Re: [PATCH v2 3/3] befs: fix style issues in datastream.c

2016-08-16 Thread Salah Triki
art + 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 Thanks, Salah

Re: [PATCH 2/3] befs: improve documentation in datastream.c

2016-08-16 Thread Salah Triki
he double-indirect block will point us > + * to the indirect block that contains the mapping for the data, > + * then we calculate which of the inode addresses in that > + * indirect block maps the data block we are after. > + * > + * Oh, and once we've done that, we actually read in t

Re: [PATCH 2/3] befs: improve documentation in datastream.c

2016-08-16 Thread Salah Triki
will point us > + * to the indirect block that contains the mapping for the data, > + * then we calculate which of the inode addresses in that > + * indirect block maps the data block we are after. > + * > + * Oh, and once we've done that, we actually read in the blocks > + * that contain the inode addresses we calculated above. Even > + * 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 actual block run that maps the data block we are interested > + * in. > + * > + * Then we offset the run as in befs_find_brun_array() and we are > + * done. > + */ > static int > befs_find_brun_dblindirect(struct super_block *sb, > const befs_data_stream *data, > -- > 2.5.1 > Signed-off-by: Salah Triki Thanks, Salah

Re: [PATCH 1/3] befs: fix typos in datastream.c

2016-08-16 Thread Salah Triki
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 indi

Re: [PATCH 1/3] befs: fix typos in datastream.c

2016-08-16 Thread Salah Triki
le-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 Thanks, Salah

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Fri, Aug 12, 2016 at 10:38:58AM +0100, Luis de Bethencourt wrote: > On 12/08/16 08:26, Salah Triki wrote: > > On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > >> On 10/08/16 23:12, Salah Triki wrote: > >>> Check that the allocation group

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Fri, Aug 12, 2016 at 10:38:58AM +0100, Luis de Bethencourt wrote: > On 12/08/16 08:26, Salah Triki wrote: > > On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > >> On 10/08/16 23:12, Salah Triki wrote: > >>> Check that the allocation group

[PATCH] befs: return BEFS_ERR if validation of ag_shift fails

2016-08-12 Thread Salah Triki
Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/super.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 7c50025..2e3a3fd 100644 --- a/fs/befs/super.c +++ b/fs/befs/super.c @@ -101,10 +101,13 @@ befs_ch

[PATCH] befs: return BEFS_ERR if validation of ag_shift fails

2016-08-12 Thread Salah Triki
Signed-off-by: Salah Triki --- fs/befs/super.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 7c50025..2e3a3fd 100644 --- a/fs/befs/super.c +++ b/fs/befs/super.c @@ -101,10 +101,13 @@ befs_check_sb(struct super_block *sb

[PATCH] fs: remove unnecessary setting of error

2016-08-12 Thread Salah Triki
setting error to -EINVAL is unnecessary. It is already set, above. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 4fd6e25..b438edc 100644 --- a/fs/open.c +++ b/fs/open.c @@ -176,7 +176,6 @@

[PATCH] fs: remove unnecessary setting of error

2016-08-12 Thread Salah Triki
setting error to -EINVAL is unnecessary. It is already set, above. Signed-off-by: Salah Triki --- fs/open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 4fd6e25..b438edc 100644 --- a/fs/open.c +++ b/fs/open.c @@ -176,7 +176,6 @@ static long do_sys_ftruncate

Re: [PATCH] befs: fix typos in btree.c

2016-08-12 Thread Salah Triki
lock *sb, struct > befs_btree_node *node, > * > * Returns 0 if @key1 and @key2 are equal. > * Returns >0 if @key1 is greater. > - * Returns <0 if @key2 is greater.. > + * Returns <0 if @key2 is greater. > */ > static int > befs_compare_strings(const void *key1, int keylen1, > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx, Salah

Re: [PATCH] befs: fix typos in btree.c

2016-08-12 Thread Salah Triki
node *node, > * > * Returns 0 if @key1 and @key2 are equal. > * Returns >0 if @key1 is greater. > - * Returns <0 if @key2 is greater.. > + * Returns <0 if @key2 is greater. > */ > static int > befs_compare_strings(const void *key1, int keylen1, > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx, Salah

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > On 10/08/16 23:12, Salah Triki wrote: > > Check that the allocation group number is not greater or equal to the > > number of allocations group in the file system and return BEF_ERR in the > > case of error

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > On 10/08/16 23:12, Salah Triki wrote: > > Check that the allocation group number is not greater or equal to the > > number of allocations group in the file system and return BEF_ERR in the > > case of error

Re: [PATCH 2/4] befs: add check for ag_shift in superblock

2016-08-11 Thread Salah Triki
r_ag."); > + > if (befs_sb->log_start != befs_sb->log_end || befs_sb->flags == > BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > "journal. You must boot into BeOS and mount this > volume " > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx :) Salah

Re: [PATCH 2/4] befs: add check for ag_shift in superblock

2016-08-11 Thread Salah Triki
start != befs_sb->log_end || befs_sb->flags == > BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > "journal. You must boot into BeOS and mount this > volume " > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx :) Salah

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-11 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:03:47AM +0100, Luis de Bethencourt wrote: > On 10/08/16 22:41, Salah Triki wrote: > > On Tue, Aug 09, 2016 at 11:01:23PM +0100, Luis de Bethencourt wrote: > >> befs_dump_super_block() wasn't giving the inode_size information when > &g

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-11 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:03:47AM +0100, Luis de Bethencourt wrote: > On 10/08/16 22:41, Salah Triki wrote: > > On Tue, Aug 09, 2016 at 11:01:23PM +0100, Luis de Bethencourt wrote: > >> befs_dump_super_block() wasn't giving the inode_size information when > &g

[PATCH 2/4] befs: check return value of iaddr2blockno

2016-08-10 Thread Salah Triki
The call of iaddr2blockno may fail, so check its return value and propagate error, if any. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 30 -- fs/befs/inode.c | 10 -- fs/befs/io.c | 3 +++ fs/befs/linu

[PATCH 1/4] befs: check allocation_group number before use

2016-08-10 Thread Salah Triki
Check that the allocation group number is not greater or equal to the number of allocations group in the file system and return BEF_ERR in the case of error. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/f

[PATCH 3/4] befs: remove the validation of allocation group number

2016-08-10 Thread Salah Triki
Validating the allocation group number is unnecessary since it will be done by iaddr2blockno(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 14eef7d..f9790f5 100644 --- a/f

[PATCH 2/4] befs: check return value of iaddr2blockno

2016-08-10 Thread Salah Triki
The call of iaddr2blockno may fail, so check its return value and propagate error, if any. Signed-off-by: Salah Triki --- fs/befs/datastream.c | 30 -- fs/befs/inode.c | 10 -- fs/befs/io.c | 3 +++ fs/befs/linuxvfs.c | 12 +++- 4

[PATCH 1/4] befs: check allocation_group number before use

2016-08-10 Thread Salah Triki
Check that the allocation group number is not greater or equal to the number of allocations group in the file system and return BEF_ERR in the case of error. Signed-off-by: Salah Triki --- fs/befs/befs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/befs/befs.h b/fs/befs/befs.h

[PATCH 3/4] befs: remove the validation of allocation group number

2016-08-10 Thread Salah Triki
Validating the allocation group number is unnecessary since it will be done by iaddr2blockno(). Signed-off-by: Salah Triki --- fs/befs/io.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 14eef7d..f9790f5 100644 --- a/fs/befs/io.c +++ b/fs/befs/io.c

[PATCH 4/4] befs: remove unnecessary initialization

2016-08-10 Thread Salah Triki
There is no need to init block, since it will be overwitten later by iaddr2blockno(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index f9790f5..39d0dce 100644 --- a/f

[PATCH 4/4] befs: remove unnecessary initialization

2016-08-10 Thread Salah Triki
There is no need to init block, since it will be overwitten later by iaddr2blockno(). Signed-off-by: Salah Triki --- fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index f9790f5..39d0dce 100644 --- a/fs/befs/io.c +++ b/fs/befs/io.c

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-10 Thread Salah Triki
befs_debug(sb, " used_blocks %llu", fs64_to_cpu(sb, sup->used_blocks)); > + befs_debug(sb, " inode_size %u", fs32_to_cpu(sb, sup->inode_size)); > > befs_debug(sb, " magic2 %08x", fs32_to_cpu(sb, sup->magic2)); > befs_debug(sb, " blocks_per_ag %u", > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

Re: [PATCH 3/4] befs: fix comment style

2016-08-10 Thread Salah Triki
nformation > -* in different ways as a consistency check. > + * block_shift and block_size encode the same information > + * in different ways as a consistency check. >*/ > > if ((1 << befs_sb->block_shift) != befs_sb->block_size) { > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

Re: [PATCH 3/4] befs: fix comment style

2016-08-10 Thread Salah Triki
rent ways as a consistency check. > + * block_shift and block_size encode the same information > + * in different ways as a consistency check. >*/ > > if ((1 << befs_sb->block_shift) != befs_sb->block_size) { > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx Salah

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-10 Thread Salah Triki
used_blocks %llu", fs64_to_cpu(sb, sup->used_blocks)); > + befs_debug(sb, " inode_size %u", fs32_to_cpu(sb, sup->inode_size)); > > befs_debug(sb, " magic2 %08x", fs32_to_cpu(sb, sup->magic2)); > befs_debug(sb, " blocks_per_ag %u", > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx Salah

Re: [PATCH 4/4] befs: fix style issues in super.c

2016-08-10 Thread Salah Triki
s == BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > -"journal. You must boot into BeOS and mount this > volume " > -"to make it clean."); > +"journal. You must boot into BeOS and mount this " > +"volume to make it clean."); > return BEFS_ERR; > } > > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

Re: [PATCH 4/4] befs: fix style issues in super.c

2016-08-10 Thread Salah Triki
EFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > -"journal. You must boot into BeOS and mount this > volume " > -"to make it clean."); > +"journal. You must boot into BeOS and mount this " > +"volume to make it clean."); > return BEFS_ERR; > } > > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx Salah

[PATCH 2/2] befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@

[PATCH 2/2] befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@ struct befs_sb_info

[PATCH 1/2] befs: add flags field to validate superblock state

2016-08-09 Thread Salah Triki
For validating superblock state, add flags field to befs_sb_info, read the state from the disk and check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-)

[PATCH 1/2] befs: add flags field to validate superblock state

2016-08-09 Thread Salah Triki
For validating superblock state, add flags field to befs_sb_info, read the state from the disk and check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/befs/befs.h

Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
On Tue, Aug 09, 2016 at 01:40:25PM +0100, Luis de Bethencourt wrote: > On 09/08/16 13:32, Salah Triki wrote: > > flags field records the superblock state, so check if it is equal to > > BEFS_DIRTY. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com>

Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
On Tue, Aug 09, 2016 at 01:40:25PM +0100, Luis de Bethencourt wrote: > On 09/08/16 13:32, Salah Triki wrote: > > flags field records the superblock state, so check if it is equal to > > BEFS_DIRTY. > > > > Signed-off-by: Salah Triki > > --- > > fs/bef

Re: [PATCH v3 1/2] befs: remove unused BEFS_BT_PARMATCH

2016-08-09 Thread Salah Triki
valarray[mid]); > - befs_debug(sb, "<--- %s found %s at %d", __func__, thiskey, mid); > - return BEFS_BT_PARMATCH; > + > + /* return an existing value so caller can arrive to a leaf node */ > + *value = fs64_to_cpu(sb, valarray[mid]); > + befs_error(sb, "<--- %s %s not found", __func__, findkey); > + befs_debug(sb, "<--- %s ERROR", __func__); > + return BEFS_BT_NOT_FOUND; > } > > /** > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx :) Salah

Re: [PATCH v3 1/2] befs: remove unused BEFS_BT_PARMATCH

2016-08-09 Thread Salah Triki
(sb, "<--- %s found %s at %d", __func__, thiskey, mid); > - return BEFS_BT_PARMATCH; > + > + /* return an existing value so caller can arrive to a leaf node */ > + *value = fs64_to_cpu(sb, valarray[mid]); > + befs_error(sb, "<--- %s %s not found", __func__, findkey); > + befs_debug(sb, "<--- %s ERROR", __func__); > + return BEFS_BT_NOT_FOUND; > } > > /** > -- > 2.5.1 > Signed-off-by: Salah Triki Thanx :) Salah

[PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
flags field records the superblock state, so check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 5ab75e8..79be409 100644 --

[PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
flags field records the superblock state, so check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki --- fs/befs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 5ab75e8..79be409 100644 --- a/fs/befs/super.c +++ b/fs/befs

[PATCH 3/3] fs: befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@

[PATCH 1/3] fs: befs: load flags field from disk

2016-08-09 Thread Salah Triki
flags field is usefull for validating the superblock state, so add this field to befs_sb_info and read the state from the disk. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/fs/befs/be

[PATCH 3/3] fs: befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@ struct befs_sb_info

[PATCH 1/3] fs: befs: load flags field from disk

2016-08-09 Thread Salah Triki
flags field is usefull for validating the superblock state, so add this field to befs_sb_info and read the state from the disk. Signed-off-by: Salah Triki --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index

Re: [PATCH 3/6] fs: befs: remove useless initialization to zero

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:44:18PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > node_off is unconditionally set to bt_super.root_node_ptr, so no need to > > init it to zero. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com

Re: [PATCH 3/6] fs: befs: remove useless initialization to zero

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:44:18PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > node_off is unconditionally set to bt_super.root_node_ptr, so no need to > > init it to zero. > > > > Signed-off-by: Salah Triki > > --- > &

Re: [PATCH v2 2/2] befs: fix typo in befs_find_key

2016-08-06 Thread Salah Triki
ntain key, just skeep this node */ > + /* if node can not contain key, just skip this node */ > last = node->head.all_key_count - 1; > thiskey = befs_bt_get_key(sb, node, last, ); > > -- > 2.5.1 > Ack-by: Salah Triki <salah.tr...@gmail.com> Thanx Luis :) Salah

Re: [PATCH v2 2/2] befs: fix typo in befs_find_key

2016-08-06 Thread Salah Triki
ode */ > + /* if node can not contain key, just skip this node */ > last = node->head.all_key_count - 1; > thiskey = befs_bt_get_key(sb, node, last, ); > > -- > 2.5.1 > Ack-by: Salah Triki Thanx Luis :) Salah

Re: [PATCH v2 1/2] befs: remove unused BEFS_BT_MATCH

2016-08-06 Thread Salah Triki
On Fri, Aug 05, 2016 at 01:41:20PM +0100, Luis de Bethencourt wrote: > befs_btree_find(), the only caller of befs_find_key(), only cares about if > the return from that function is BEFS_BT_MATCH or not. It never uses the > partial match given with BEFS_BT_MATCH. Removing that return and don't set

Re: [PATCH v2 1/2] befs: remove unused BEFS_BT_MATCH

2016-08-06 Thread Salah Triki
On Fri, Aug 05, 2016 at 01:41:20PM +0100, Luis de Bethencourt wrote: > befs_btree_find(), the only caller of befs_find_key(), only cares about if > the return from that function is BEFS_BT_MATCH or not. It never uses the > partial match given with BEFS_BT_MATCH. Removing that return and don't set

Re: [PATCH 2/6] fs: befs: remove in vain variable assignment

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:24:34PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > There is no need to set *value, it will be overwritten later. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com> > > --- > > fs/bef

Re: [PATCH 2/6] fs: befs: remove in vain variable assignment

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:24:34PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > There is no need to set *value, it will be overwritten later. > > > > Signed-off-by: Salah Triki > > --- > > fs/befs/btree.c | 2 -- > > 1 fil

Re: [PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 03:02:57PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned > > value by this function is only used once. > > > > Signed-off-by: Salah T

Re: [PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 03:02:57PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned > > value by this function is only used once. > > > > Signed-off-by: Salah

[PATCH 2/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to set *value, it will be overwritten later. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index a0e8cfa..f33fc6c 100644 --- a/fs/befs/btree.c +++ b/fs/befs/b

[PATCH 2/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to set *value, it will be overwritten later. Signed-off-by: Salah Triki --- fs/befs/btree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index a0e8cfa..f33fc6c 100644 --- a/fs/befs/btree.c +++ b/fs/befs/btree.c @@ -348,8 +348,6

[PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-07-31 Thread Salah Triki
Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned value by this function is only used once. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/datastream.c b/f

[PATCH 1/6] fs: befs: remove unneeded initialization to zero

2016-07-31 Thread Salah Triki
off is reinitialized by befs_read_datastream, so no need to init it with zero in the beginning of befs_bt_read_node. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c

[PATCH 6/6] fs: befs: remove ret variable

2016-07-31 Thread Salah Triki
ret is initialized to -EIO and is never modified, so remove ret and use -EIO directly. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 2b68c81..c

[PATCH 3/6] fs: befs: remove useless initialization to zero

2016-07-31 Thread Salah Triki
node_off is unconditionally set to bt_super.root_node_ptr, so no need to init it to zero. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index f33fc6c..3cb97e8

[PATCH 5/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to init res, since it will be overwitten later by befs_fblock2brun(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 6bc5b40..2

[PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-07-31 Thread Salah Triki
Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned value by this function is only used once. Signed-off-by: Salah Triki --- fs/befs/datastream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index b68b6f9

[PATCH 1/6] fs: befs: remove unneeded initialization to zero

2016-07-31 Thread Salah Triki
off is reinitialized by befs_read_datastream, so no need to init it with zero in the beginning of befs_bt_read_node. Signed-off-by: Salah Triki --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index e59ad20..a0e8cfa 100644

[PATCH 6/6] fs: befs: remove ret variable

2016-07-31 Thread Salah Triki
ret is initialized to -EIO and is never modified, so remove ret and use -EIO directly. Signed-off-by: Salah Triki --- fs/befs/linuxvfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 2b68c81..c57f831 100644 --- a/fs/befs

[PATCH 3/6] fs: befs: remove useless initialization to zero

2016-07-31 Thread Salah Triki
node_off is unconditionally set to bt_super.root_node_ptr, so no need to init it to zero. Signed-off-by: Salah Triki --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index f33fc6c..3cb97e8 100644 --- a/fs/befs/btree.c

[PATCH 5/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to init res, since it will be overwitten later by befs_fblock2brun(). Signed-off-by: Salah Triki --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 6bc5b40..2b68c81 100644 --- a/fs/befs

Re: [PATCH 2/3] befs: remove constant variable

2016-07-27 Thread Salah Triki
if (!dir_emit(ctx, keybuf, keysize, > - (ino_t) value, d_type)) > + (ino_t) value, DT_UNKNOWN)) > return 0; > } > ctx->pos++; > -- > 2.5.1 > Acked-by: Salah Triki <salah.tr...@gmail.com> Thanx :) salah

Re: [PATCH 2/3] befs: remove constant variable

2016-07-27 Thread Salah Triki
t(ctx, keybuf, keysize, > - (ino_t) value, d_type)) > + (ino_t) value, DT_UNKNOWN)) > return 0; > } > ctx->pos++; > -- > 2.5.1 > Acked-by: Salah Triki Thanx :) salah

Re: [PATCH 1/2] fs: befs: check silent flag before logging error

2016-07-27 Thread Salah Triki
silent) >*/ > blocksize = sb_min_blocksize(sb, 1024); > if (!blocksize) { > - befs_error(sb, "unable to set blocksize"); > + if (!silent) > + befs_error(sb, "unable to set blocksize"); > goto unacquire_priv_sbp; > } > > -- > 2.5.1 > Acked-by: Salah Triki <salah.tr...@gmail.com> regards, salah

Re: [PATCH 1/2] fs: befs: check silent flag before logging error

2016-07-27 Thread Salah Triki
ksize = sb_min_blocksize(sb, 1024); > if (!blocksize) { > - befs_error(sb, "unable to set blocksize"); > + if (!silent) > + befs_error(sb, "unable to set blocksize"); > goto unacquire_priv_sbp; > } > > -- > 2.5.1 > Acked-by: Salah Triki regards, salah

Re: [PATCH 1/3] befs: remove off argument of befs_read_datastream

2016-07-27 Thread Salah Triki
On Tue, Jul 12, 2016 at 12:02:48AM +0100, Luis de Bethencourt wrote: > befs_read_datastream() is used to read the inode from the disk, off is > meant to provide the offset of the data in the buffer head. But the only > function using this argument already knows the starting offset of the node, >

Re: [PATCH 1/3] befs: remove off argument of befs_read_datastream

2016-07-27 Thread Salah Triki
On Tue, Jul 12, 2016 at 12:02:48AM +0100, Luis de Bethencourt wrote: > befs_read_datastream() is used to read the inode from the disk, off is > meant to provide the offset of the data in the buffer head. But the only > function using this argument already knows the starting offset of the node, >

[RESEND PATCH 2/4] fs: befs: Coding style fix

2016-07-26 Thread Salah Triki
Constant has to be capitalized. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com> --- fs/befs/btree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index 307645f9..e5

[RESEND PATCH 2/4] fs: befs: Coding style fix

2016-07-26 Thread Salah Triki
Constant has to be capitalized. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt --- fs/befs/btree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index 307645f9..e59ad20 100644 --- a/fs/befs/btree.c +++ b/fs/befs/btree.c

[RESEND PATCH 4/4] fs: befs: Remove goto from befs_bread_iaddr

2016-07-26 Thread Salah Triki
Since goto statement merely returns NULL, replace it with return statement. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 4223b77..af631a6 100644 --- a/fs/bef

[RESEND PATCH 3/4] fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect

2016-07-26 Thread Salah Triki
The calls to brelse are useless since dbl_indir_block and indir_block are NULL. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com> --- fs/befs/datastream.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/datastream

[RESEND PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-26 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com>

[RESEND PATCH 4/4] fs: befs: Remove goto from befs_bread_iaddr

2016-07-26 Thread Salah Triki
Since goto statement merely returns NULL, replace it with return statement. Signed-off-by: Salah Triki --- fs/befs/io.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 4223b77..af631a6 100644 --- a/fs/befs/io.c +++ b/fs/befs/io.c

[RESEND PATCH 3/4] fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect

2016-07-26 Thread Salah Triki
The calls to brelse are useless since dbl_indir_block and indir_block are NULL. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt --- fs/befs/datastream.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index e224b9a..b68b6f9 100644

[RESEND PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-26 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt --- fs/befs/datastream.c | 8 1 file changed, 8

[RESEND PATCH V3] fs: befs: Insert NULL inode to dentry

2016-07-26 Thread Salah Triki
As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index c734f21..2fea87b 100644 --

[RESEND PATCH V3] fs: befs: Insert NULL inode to dentry

2016-07-26 Thread Salah Triki
As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index c734f21..2fea87b 100644 --- a/fs/befs/linuxvfs.c +++ b/fs

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Tue, Jul 26, 2016 at 01:56:56PM -0400, Theodore Ts'o wrote: > On Tue, Jul 26, 2016 at 12:16:24AM +0100, Luis de Bethencourt wrote: > > > > I will wait a few days in case other people want to comment before. > > > > Sounds great! Do you have a git tree set up for your befs development? > >

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Tue, Jul 26, 2016 at 01:56:56PM -0400, Theodore Ts'o wrote: > On Tue, Jul 26, 2016 at 12:16:24AM +0100, Luis de Bethencourt wrote: > > > > I will wait a few days in case other people want to comment before. > > > > Sounds great! Do you have a git tree set up for your befs development? > >

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Mon, Jul 25, 2016 at 02:23:31PM -0700, Greg KH wrote: > On Mon, Jul 25, 2016 at 06:21:19PM +0100, Luis de Bethencourt wrote: > > PD: I don't know if there is a formal process for maintainership in the > > Linux > > kernel community. I am happy to follow that if it exists. > > If no one

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Mon, Jul 25, 2016 at 02:23:31PM -0700, Greg KH wrote: > On Mon, Jul 25, 2016 at 06:21:19PM +0100, Luis de Bethencourt wrote: > > PD: I don't know if there is a formal process for maintainership in the > > Linux > > kernel community. I am happy to follow that if it exists. > > If no one

[PATCH] fs: btrfs: Replace -ENOENT by -ERANGE in btrfs_get_acl()

2016-07-02 Thread Salah Triki
size contains the value returned by posix_acl_from_xattr(), which returns -ERANGE, -ENODATA, zero, or an integer greater than zero. So replace -ENOENT by -ERANGE. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/btrfs/acl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH] fs: btrfs: Replace -ENOENT by -ERANGE in btrfs_get_acl()

2016-07-02 Thread Salah Triki
size contains the value returned by posix_acl_from_xattr(), which returns -ERANGE, -ENODATA, zero, or an integer greater than zero. So replace -ENOENT by -ERANGE. Signed-off-by: Salah Triki --- fs/btrfs/acl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/acl.c b

Re: [PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
On Sat, Jul 02, 2016 at 12:38:18PM +0100, Luis de Bethencourt wrote: > On 02/07/16 09:05, Salah Triki wrote: > > The only caller of befs_find_brun_direct is befs_fblock2brun, which > > already validates that the block is within the range of direct blocks. > > So remove the

Re: [PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
On Sat, Jul 02, 2016 at 12:38:18PM +0100, Luis de Bethencourt wrote: > On 02/07/16 09:05, Salah Triki wrote: > > The only caller of befs_find_brun_direct is befs_fblock2brun, which > > already validates that the block is within the range of direct blocks. > > So remove the

[PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 8 1 file changed, 8 del

[PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki --- fs/befs/datastream.c | 8 1 file changed, 8 deletions(-) diff --git a/fs/befs

  1   2   3   >