All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: UBI Create or Update Volume
@ 2009-06-17 13:33 BRIJESH SINGH
  0 siblings, 0 replies; 3+ messages in thread
From: BRIJESH SINGH @ 2009-06-17 13:33 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd

 [Sorry. I will try to take care of it in future emails.]
Hi,
On Wed, Jun 17, 2009 at 3:26 PM, Artem Bityutskiy <dedekind@infradead.org> wrote:
     On Wed, 2009-06-17 at 09:33 +0000, BRIJESH SINGH wrote:
      >> Hi Artem,
      >>      Just came across the ubi_change_vtbl_record function. If first copy is written successfully and error occurs while writing second copy, this function still returns error. And hence the creation or change in Volume becomes unsuccessful. So applications consider it failure.
      >>
      >>   But if I unmount now, (clean or unclean) the first copy will become valid and second will be called corrupted (during mount time). It's not correct.
      >>    So should ubi_change_vtbl_record  call flush wl and  return success? Because 2nd copy(old) is unmapped till now.And should UBI go to read-only mode?
> Yes, sounds right. Would you send a patch?
Yes, I will send a patch once I test it properly.

---
Brijesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: UBI Create or Update Volume
  2009-06-17  9:33 BRIJESH SINGH
@ 2009-06-17  9:56 ` Artem Bityutskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2009-06-17  9:56 UTC (permalink / raw)
  To: brij.singh; +Cc: linux-mtd

[Very difficult to read your email due to
looooooooooooonnnnnnnnnnnnnnnnnnngggggggggggggggggg
lines]

Hi,

On Wed, 2009-06-17 at 09:33 +0000, BRIJESH SINGH wrote:
> Hi Artem, 
>      Just came across the ubi_change_vtbl_record function. If first copy is written successfully and error occurs while writing second copy, this function still returns error. And hence the creation or change in Volume becomes unsuccessful. So applications consider it failure.
> 
>    But if I unmount now, (clean or unclean) the first copy will become valid and second will be called corrupted (during mount time). It's not correct.
>    So should ubi_change_vtbl_record  call flush wl and  return success? Because 2nd copy(old) is unmapped till now.And should UBI go to read-only mode?

Yes, sounds right. Would you send a patch?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* UBI Create or Update Volume
@ 2009-06-17  9:33 BRIJESH SINGH
  2009-06-17  9:56 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: BRIJESH SINGH @ 2009-06-17  9:33 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd

Hi Artem, 
     Just came across the ubi_change_vtbl_record function. If first copy is written successfully and error occurs while writing second copy, this function still returns error. And hence the creation or change in Volume becomes unsuccessful. So applications consider it failure.

   But if I unmount now, (clean or unclean) the first copy will become valid and second will be called corrupted (during mount time). It's not correct.
   So should ubi_change_vtbl_record  call flush wl and  return success? Because 2nd copy(old) is unmapped till now.And should UBI go to read-only mode?


Code Snip:
Funct ubi_change_vtbl_record(){
...
for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) {
                 err = ubi_eba_unmap_leb(ubi, layout_vol, i);
                 if (err)
                        return err;
                      err = ubi_eba_write_leb(ubi, layout_vol, i, ubi->vtbl, 0,
                                                                 ubi->vtbl_size, UBI_LONGTERM);
                        if (err)
                          return err;
 }
...
}

Thanks
Brijesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-17 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 13:33 UBI Create or Update Volume BRIJESH SINGH
  -- strict thread matches above, loose matches on Subject: below --
2009-06-17  9:33 BRIJESH SINGH
2009-06-17  9:56 ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.