Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1458669 > unrolled thread
| Started by | Salah Triki <salah.triki@gmail.com> |
|---|---|
| First post | 2016-08-09 14:40 +0200 |
| Last post | 2016-08-09 14:50 +0200 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] fs: befs: load flags field from disk Salah Triki <salah.triki@gmail.com> - 2016-08-09 14:40 +0200
[PATCH 2/3] fs: befs: check flags field to validate the superblock state Salah Triki <salah.triki@gmail.com> - 2016-08-09 14:40 +0200
Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-09 14:50 +0200
Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state Salah Triki <salah.triki@gmail.com> - 2016-08-09 15:10 +0200
Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-09 16:00 +0200
[PATCH 3/3] fs: befs: fix typo in befs_sb_info Salah Triki <salah.triki@gmail.com> - 2016-08-09 14:40 +0200
Re: [PATCH 3/3] fs: befs: fix typo in befs_sb_info Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-08-09 14:50 +0200
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-09 14:40 +0200 |
| Subject | [PATCH 1/3] fs: befs: load flags field from disk |
| Message-ID | <s4eu6-7y7-11@gated-at.bofh.it> |
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.triki@gmail.com>
---
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 e0f59263a..511d16d 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -43,6 +43,9 @@ struct befs_sb_info {
u32 ag_shift;
u32 num_ags;
+ /* State of the superblock */
+ u32 flags;
+
/* jornal log entry */
befs_block_run log_blocks;
befs_off_t log_start;
diff --git a/fs/befs/super.c b/fs/befs/super.c
index aeafc4d..5ab75e8 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -45,6 +45,8 @@ befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
befs_sb->ag_shift = fs32_to_cpu(sb, disk_sb->ag_shift);
befs_sb->num_ags = fs32_to_cpu(sb, disk_sb->num_ags);
+ befs_sb->flags = fs32_to_cpu(sb, disk_sb->flags);
+
befs_sb->log_blocks = fsrun_to_cpu(sb, disk_sb->log_blocks);
befs_sb->log_start = fs64_to_cpu(sb, disk_sb->log_start);
befs_sb->log_end = fs64_to_cpu(sb, disk_sb->log_end);
--
1.9.1
[toc] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-09 14:40 +0200 |
| Subject | [PATCH 2/3] fs: befs: check flags field to validate the superblock state |
| Message-ID | <s4eu6-7y7-33@gated-at.bofh.it> |
| In reply to | #1458669 |
flags field records the superblock state, so check if it is equal to
BEFS_DIRTY.
Signed-off-by: Salah Triki <salah.triki@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
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -103,7 +103,7 @@ befs_check_sb(struct super_block *sb)
return BEFS_ERR;
}
- if (befs_sb->log_start != befs_sb->log_end) {
+ 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 "
"to make it clean.");
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-09 14:50 +0200 |
| Subject | Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state |
| Message-ID | <s4eDL-7BJ-19@gated-at.bofh.it> |
| In reply to | #1458676 |
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.triki@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
> --- a/fs/befs/super.c
> +++ b/fs/befs/super.c
> @@ -103,7 +103,7 @@ befs_check_sb(struct super_block *sb)
> return BEFS_ERR;
> }
>
> - if (befs_sb->log_start != befs_sb->log_end) {
> + 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 "
> "to make it clean.");
>
Hi Salah,
Looks like a good idea. Any reason why commit 1/2, where you add the flag, and commit
2/2, where you read it, are split and not in the same commit? Curious.
Will test it soon.
Thanks :)
Luis
[toc] | [prev] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-09 15:10 +0200 |
| Subject | Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state |
| Message-ID | <s4eX7-7Yv-5@gated-at.bofh.it> |
| In reply to | #1458696 |
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.triki@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
> > --- a/fs/befs/super.c
> > +++ b/fs/befs/super.c
> > @@ -103,7 +103,7 @@ befs_check_sb(struct super_block *sb)
> > return BEFS_ERR;
> > }
> >
> > - if (befs_sb->log_start != befs_sb->log_end) {
> > + 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 "
> > "to make it clean.");
> >
>
> Hi Salah,
>
> Looks like a good idea. Any reason why commit 1/2, where you add the flag, and commit
> 2/2, where you read it, are split and not in the same commit? Curious.
>
> Will test it soon.
>
> Thanks :)
> Luis
Hi Luis,
I split the two commits for sake of clarity. But now I realize that it
is not usefull at all.
Will send a corrected patch soon.
Thanx
Salah
[toc] | [prev] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-09 16:00 +0200 |
| Subject | Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state |
| Message-ID | <s4fJw-8kJ-17@gated-at.bofh.it> |
| In reply to | #1458726 |
On 09/08/16 13:59, Salah Triki wrote:
> 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.triki@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
>>> --- a/fs/befs/super.c
>>> +++ b/fs/befs/super.c
>>> @@ -103,7 +103,7 @@ befs_check_sb(struct super_block *sb)
>>> return BEFS_ERR;
>>> }
>>>
>>> - if (befs_sb->log_start != befs_sb->log_end) {
>>> + 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 "
>>> "to make it clean.");
>>>
>>
>> Hi Salah,
>>
>> Looks like a good idea. Any reason why commit 1/2, where you add the flag, and commit
>> 2/2, where you read it, are split and not in the same commit? Curious.
>>
>> Will test it soon.
>>
>> Thanks :)
>> Luis
>
> Hi Luis,
>
> I split the two commits for sake of clarity. But now I realize that it
> is not usefull at all.
>
> Will send a corrected patch soon.
>
> Thanx
> Salah
>
Thanks :)
Once you resubmit squashing 1 and 2, I will push this series to:
https://github.com/luisbg/linux-befs/tree/for-next
Stephen Rothwell pulls this into linux-next, and once I get my GPG key signed into the
Kernel web of trust in October, it will be pulled by Linus.
Luis
[toc] | [prev] | [next] | [standalone]
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-08-09 14:40 +0200 |
| Subject | [PATCH 3/3] fs: befs: fix typo in befs_sb_info |
| Message-ID | <s4eu7-7y7-55@gated-at.bofh.it> |
| In reply to | #1458669 |
Fixing jornal to Journal.
Signed-off-by: Salah Triki <salah.triki@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 @@ struct befs_sb_info {
/* State of the superblock */
u32 flags;
- /* jornal log entry */
+ /* Journal log entry */
befs_block_run log_blocks;
befs_off_t log_start;
befs_off_t log_end;
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-08-09 14:50 +0200 |
| Subject | Re: [PATCH 3/3] fs: befs: fix typo in befs_sb_info |
| Message-ID | <s4eDL-7BJ-25@gated-at.bofh.it> |
| In reply to | #1458684 |
On 09/08/16 13:32, Salah Triki wrote:
> Fixing jornal to Journal.
>
> Signed-off-by: Salah Triki <salah.triki@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 @@ struct befs_sb_info {
> /* State of the superblock */
> u32 flags;
>
> - /* jornal log entry */
> + /* Journal log entry */
> befs_block_run log_blocks;
> befs_off_t log_start;
> befs_off_t log_end;
>
Well spotted :)
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web