* [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN}
@ 2012-01-10 16:57 Richard Weinberger
2012-01-14 15:11 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2012-01-10 16:57 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, dwmw2, linux-kernel, Richard Weinberger
UBI_LAYOUT_VOLUME_TYPE and UBI_LAYOUT_VOLUME_ALIGN are currently
defined but not used.
Use them at least once. 8-)
Signed-off-by: Richard Weinberger <richard@nod.at>
---
drivers/mtd/ubi/vtbl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 9ad18da..93cb2f1 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -322,7 +322,7 @@ retry:
goto out_free;
}
- vid_hdr->vol_type = UBI_VID_DYNAMIC;
+ vid_hdr->vol_type = UBI_LAYOUT_VOLUME_TYPE;
vid_hdr->vol_id = cpu_to_be32(UBI_LAYOUT_VOLUME_ID);
vid_hdr->compat = UBI_LAYOUT_VOLUME_COMPAT;
vid_hdr->data_size = vid_hdr->used_ebs =
@@ -632,7 +632,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
return -ENOMEM;
vol->reserved_pebs = UBI_LAYOUT_VOLUME_EBS;
- vol->alignment = 1;
+ vol->alignment = UBI_LAYOUT_VOLUME_ALIGN;
vol->vol_type = UBI_DYNAMIC_VOLUME;
vol->name_len = sizeof(UBI_LAYOUT_VOLUME_NAME) - 1;
memcpy(vol->name, UBI_LAYOUT_VOLUME_NAME, vol->name_len + 1);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN}
2012-01-10 16:57 [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN} Richard Weinberger
@ 2012-01-14 15:11 ` Artem Bityutskiy
2012-01-14 15:34 ` Richard Weinberger
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2012-01-14 15:11 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd, dwmw2, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On Tue, 2012-01-10 at 17:57 +0100, Richard Weinberger wrote:
> UBI_LAYOUT_VOLUME_TYPE and UBI_LAYOUT_VOLUME_ALIGN are currently
> defined but not used.
> Use them at least once. 8-)
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
Hi Richard,
This will break backward compatibility - older and current kernels which
do not have this patch will error out when the find a volume without a
name. The right way to do this would be to change the UBI format
version, but you would need a really strong reason for this.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN}
2012-01-14 15:11 ` Artem Bityutskiy
@ 2012-01-14 15:34 ` Richard Weinberger
2012-01-14 15:38 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2012-01-14 15:34 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, dwmw2, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
Am 14.01.2012 16:11, schrieb Artem Bityutskiy:
> On Tue, 2012-01-10 at 17:57 +0100, Richard Weinberger wrote:
>> UBI_LAYOUT_VOLUME_TYPE and UBI_LAYOUT_VOLUME_ALIGN are currently
>> defined but not used.
>> Use them at least once. 8-)
>>
>> Signed-off-by: Richard Weinberger <richard@nod.at>
>
> Hi Richard,
>
> This will break backward compatibility - older and current kernels which
> do not have this patch will error out when the find a volume without a
> name. The right way to do this would be to change the UBI format
> version, but you would need a really strong reason for this.
>
Sorry, this comment makes absolutely no sense.
Did you mean my other patch?
But still, the other patch also does *not* allow volumes without names.
Confused,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN}
2012-01-14 15:34 ` Richard Weinberger
@ 2012-01-14 15:38 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2012-01-14 15:38 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd, dwmw2, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Sat, 2012-01-14 at 16:34 +0100, Richard Weinberger wrote:
> Am 14.01.2012 16:11, schrieb Artem Bityutskiy:
> > On Tue, 2012-01-10 at 17:57 +0100, Richard Weinberger wrote:
> >> UBI_LAYOUT_VOLUME_TYPE and UBI_LAYOUT_VOLUME_ALIGN are currently
> >> defined but not used.
> >> Use them at least once. 8-)
> >>
> >> Signed-off-by: Richard Weinberger <richard@nod.at>
> >
> > Hi Richard,
> >
> > This will break backward compatibility - older and current kernels which
> > do not have this patch will error out when the find a volume without a
> > name. The right way to do this would be to change the UBI format
> > version, but you would need a really strong reason for this.
> >
>
> Sorry, this comment makes absolutely no sense.
>
> Did you mean my other patch?
> But still, the other patch also does *not* allow volumes without names.
Yes, sorry, ignore this one - I've pushed your patch.
(Embarrassed)
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-14 15:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 16:57 [PATCH] ubi: Use UBI_LAYOUT_VOLUME_{TYPE, ALIGN} Richard Weinberger
2012-01-14 15:11 ` Artem Bityutskiy
2012-01-14 15:34 ` Richard Weinberger
2012-01-14 15:38 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox