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
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
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
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
[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,
> -
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
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
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
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
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
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
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
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
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
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 @@
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 @@
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
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(-)
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
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>
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
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
(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
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
--
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
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 @@
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
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
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
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
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
> > ---
> &
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
>
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,
>
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
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
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
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
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>
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
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
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
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
--
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
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?
>
>
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?
>
>
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
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
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(-)
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
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
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
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
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 - 100 of 218 matches
Mail list logo