Hi,
It is not a copy paste of a cleanup patch by Julia Lawall. It is just a
coincidence. In
addition, I think that, generaly, cleanups patchs are similar.
Best regards
--
Salah Triki
On Wed, Aug 05, 2015 at 10:32:47PM +0900, Sergey Senozhatsky wrote:
Hi,
Cc Julia Lawall
On (08/04/15
This patchset replaces pr_* with dev_*. dev_* attach kernel messages to the
right
device. In addition, patchs 1 and 2 add to messages the values of variables
that trigger
errors.
Salah Triki (3):
zram: Replace pr_info with dev_info in max_comp_streams_store
zram: Replace pr_info
dev_* attach the messages to the devices.
---
drivers/block/zram/zram_drv.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1c2f8b9..73f3453 100644
---
dev_info attachs the message to the device. And, the max compression
streams value, that triggers error, is added to the message.
---
drivers/block/zram/zram_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
dev_info attachs the message to the device. And, the algorithm's name, that
triggers the error, is added to the message.
---
drivers/block/zram/zram_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index
kmem_cache_destroy can be called with NULL values. Thus, the checks that
precede the calls are useless.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
fs/jffs2/malloc.c | 27 +--
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/fs/jffs2/malloc.c b/fs
This patch replaces pr_info/pr_warn/pr_err with
dev_info/dev_warn/dev_err.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
drivers/block/zram/zram_drv.c | 40 +++-
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c
lzo1x_1_compress always returns LZO_E_OK that is equal to 0.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
drivers/block/zram/zcomp_lzo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c
index da1bc47
lzo1x_1_do_compress always returns LZO_E_OK. Thus, the check of the
return value is useless.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
drivers/base/regmap/regcache-lzo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/base/regmap/regcache-lzo.c
b
lzo1x_1_compress always returns LZO_E_OK that is equal to 0. Thus, the
check of the return value is useless.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
drivers/block/zram/zcomp_lzo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/zram/zcomp_lzo.c b
lzo1x_1_compress always LZO_E_OK that is equal to 0.
Signed-off-by: Salah Triki salah.tr...@acm.org
---
drivers/block/zram/zcomp_lzo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c
index da1bc47..3cf30c9
The previous versions of this patch contain spelling errors and cryptic
messages, please ignore them. The patch removes the check of the return value
of lzo1x_1_compress, since it returns always LZO_E_OK.
Salah Triki (1):
zram: Remove useless check
drivers/block/zram/zcomp_lzo.c | 3 +--
1
Hi,
It is hard to be treated as a copy-paster, especially when you're a
newcomer to the community.
Best regards
--
Salah Triki
On Wed, Aug 05, 2015 at 10:32:47PM +0900, Sergey Senozhatsky wrote:
Hi,
Cc Julia Lawall
On (08/04/15 13:06), Brian Norris wrote:
On Tue, Aug 04, 2015 at 08
As VFS expects, lookup should insert NULL inode to dentry when the named
inode does not exist.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e0bd6c7..91740dd
As VFS expects, lookup inserts NULL inode to dentry when the named inode
does not exist.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
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/f
As VFS expects, i_count.counter field should be incremented when the named inode
is found.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 91740dd..1a67990 100644
--
File not found is not an error and lookup must return error code only
on real error, otherwise creating inodes with functions like create,
mkdir and so on will fail.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 de
On Sat, Jun 04, 2016 at 08:32:42PM +0100, Al Viro wrote:
> On Sat, Jun 04, 2016 at 07:53:21PM +0100, Salah Triki wrote:
> > As VFS expects, i_count field is incremented when the named inode is found.
>
> VFS expects no such thing. Incidentally, you have neither bothered t
As VFS expects, i_count field is incremented when the named inode is found.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 91740dd..05153b3 100644
--- a/fs/befs/linu
As VFS expects, lookup inserts NULL inode to dentry when the named
inode does not exist.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e0bd6c7..91740dd 100644
--- a/f
File not found is not an error and lookup must return error code only
on real error, otherwise creating inodes with functions like create,
mkdir and so on will fail.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 de
Log errors only when silent flag is not set.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 75ec9a7..5b30d1f 100644
--- a/f
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL,
so the assignment to NULL is useless and it is moved above unacquire_none.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Use kmem_cache_zalloc instead of kmem_cache_alloc/memset.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/ubifs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7034995..f509200 100644
--- a/fs/ubifs/super.c
++
Code is more readable when using kmem_cache_zalloc instead of
kmem_cache_alloc/memset.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/ubifs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7034995..f509200
Remove pr_err since when kzalloc fails there is a generic out of memory
and stack dump.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edee857..5
Remove pr_err since when kzalloc fails there is a generic out of memory
and stack dump.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edee857..5
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL,
so the assignment to NULL is useless and it is moved above unacquire_none.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL,
so the assignment to NULL is useless and it is moved above unacquire_none.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Coalese format is more readable, even if it goes over 80 column width,
so group format snippets together.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/fs/befs/linuxvfs.
Log errors only when silent flag is not set.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 75ec9a7..edee857 100644
--- a/fs/befs/linu
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL,
so the assignment to NULL is useless and it is moved above unacquire_none.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
Remove pr_err since kmem_cache_create log error and dump stack.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 04541f3..c734f21 100644
--- a/f
Remove befs_error since when kmalloc fails there is a generic out of
memory and stack dump.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 5b47b0f..04541f3 100644
--
Remove pr_err since when kzalloc fails there is a generic out of memory
and stack dump.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edee857..5
Log errors only when silent flag is not set.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 75ec9a7..edee857 100644
--- a/fs/befs/linu
Remove befs_error since when kmalloc fails there is a generic out of
memory and stack dump.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 5b47b0f..04541f3 100644
--
Log errors only when silent flag is not set.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 75ec9a7..edee857 100644
--- a/fs/befs/linu
Since befs_bread merely calls sb_bread, replace it by sb_bread.
Signed-off-by: Salah Triki <salah.tr...@gmail.com>
---
fs/befs/datastream.c | 6 +++---
fs/befs/io.c | 24
fs/befs/io.h | 2 --
fs/befs/linuxvfs.c | 2 +-
4 files changed, 4 inse
bfs_rename should update mtime on target.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/bfs/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..d5902d9 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -252,7
bfs_rename should update ctime and mtime on target.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/bfs/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..c69f7dc 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -254,6 +254,7 @@ stat
Since this is a filesystem driver, using the flag GFP_NOFS is more
appropriate than the flag GFP_KERNEL.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
flags field records the state of the superblock, so it is
more appropriate to use this field for validating the fs state than
using the fields log_start and log_end.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
jffs2 requires device, so the field fs_flags of the structure
file_system_type must be initialized to FS_REQUIRES_DEV.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/jffs2/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 0
bfs_rename should update ctime and mtime on target, and mark the target
as dirty.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/bfs/dir.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..da30bb7 100644
--- a/fs/bfs/dir.c
+++ b/
bfs_rename should update ctime and mtime on target, and mark the target
as dirty.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/bfs/dir.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..da30bb7 100644
--- a/fs/bfs/dir.c
+++ b/
bfs_rename should update ctime and mtime on target, and mark the target
as dirty.
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/bfs/dir.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..da30bb7 100644
--- a/fs/bfs/dir.c
+++ b/
bh is reinitialized by sb_bread() so no need to init it
with NULL in the beginning of befs_bread_iaddr()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
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 7a5b4ec..1341fa3
bh is reinitialized by sb_bread() so no need to init it
with NULL in the beginning of befs_bread()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
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 1341fa3..523c8af
befs_ino is reinitialized by BEFS_I() so no need to init it
with NULL in the beginning of befs_iget()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
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 8
inode is reinitialized by befs_iget() so no need to init it
with NULL in the beginning of befs_lookup()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
raw_inode is reinitialized to bh->b_data so no need to init it
with NULL in the beginning of befs_iget()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvf
bh is reinitialized by befs_bread() so no need to init it
with NULL in the beginning of befs_iget()
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
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 d
bh is reinitialized by befs_read_datastream() so no need to init it
with NULL in the beginning of befs_read_lsymlink().
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/datastream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/datastream.c b/f
iaddr_array is unconditionally initialized to NULL in
befs_find_brun_dblindirect().
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/datastream.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 068f7be..4
bh is reinitialized by befs_bread_iaddr() so no need to init it
with NULL in the beginning of befs_read_datastream().
Signed-off-by: Salah Triki <salah.tr...@acm.org>
---
fs/befs/datastream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/datastream.c b/f
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
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
--
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?
>
>
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>
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
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
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
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,
>
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
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
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
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
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
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
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 @@
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
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
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
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
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
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
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: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 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 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
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
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 <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
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
--
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
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>
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(-)
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
1 - 100 of 218 matches
Mail list logo