linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Data not freed after remove?
@ 2016-06-01 11:35 Sven Eisenberg
       [not found] ` <CAFLxGvxZS_aqoR059M3aE9zz+TZ-VNhh9vpMNRJYL-97ZFrgZA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eisenberg @ 2016-06-01 11:35 UTC (permalink / raw)
  To: linux-mtd

Hi MTD list

I've seen a problem on our embedded device with UBI/UBIFS. Kernel
2.6.31+UBI/UBIFS at level ~3.10.y.

In short summary what i see is:

1. Deleting a folder with a big file (680MB) in a partition of 892MB size.
2. Perform a sync.
3. Read available free space with statvfs, fails. It reports the same
value as before deletion.
4. remount partition as ro, fails. But no message in dmesg.

Is there any reason/bug known that would cause this behavior?
I know this can happen, when there i an open filedescriptor to the file.
So i verified and this is not the case for me.

Thanks in advance, Sven Eisenberg




-- 

*Sven Eisenberg*

 

novero GmbH | Meesmannstr. 103 | 44807 Bochum | Germany | Amtsgericht
Bochum | HRB 16050 | Umsatzsteueridentifikationsnummer: DE 814973142 |
Geschäftsführer: Steven E. Brown, Michael Heinz Michels, Jacobus
Gerhardus du Plessis

 

A Laird business www.lairdtech.com <http://www.lairdtech.com>

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

* Re: Data not freed after remove?
       [not found] ` <CAFLxGvxZS_aqoR059M3aE9zz+TZ-VNhh9vpMNRJYL-97ZFrgZA@mail.gmail.com>
@ 2016-06-03  8:16   ` Sven Eisenberg
  2016-06-14 16:17     ` Richard Weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eisenberg @ 2016-06-03  8:16 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org

Hi Richard and all

On 01.06.2016 13:55, Richard Weinberger wrote:
> ...
> What is the return code of mount()?
>
> > Is there any reason/bug known that would cause this behavior?
>
> Hmm, I don't know.
>
> > I know this can happen, when there i an open filedescriptor to the file.
> > So i verified and this is not the case for me.
>
> Yes, remount can fail if the volume is busy. That's why i wonder what
> the return code is.

Yes the volume is busy:
mount -o remount,ro /mnt/point  = -1 EBUSY (Device or resource busy)

I could not yet identify why it is in busy state.

I added some code to check for open file descriptors. I built a test
application which simulates the sequence. But it runs without a problem.
Can i get informations from the kernel, what file or state causes the
busy state?

br, Sven Eisenberg

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

* Re: Data not freed after remove?
  2016-06-03  8:16   ` Sven Eisenberg
@ 2016-06-14 16:17     ` Richard Weinberger
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Weinberger @ 2016-06-14 16:17 UTC (permalink / raw)
  To: Sven Eisenberg; +Cc: linux-mtd@lists.infradead.org

Sven,

On Fri, Jun 3, 2016 at 10:16 AM, Sven Eisenberg
<sven.eisenberg@novero.com> wrote:
>> Yes, remount can fail if the volume is busy. That's why i wonder what
>> the return code is.
>
> Yes the volume is busy:
> mount -o remount,ro /mnt/point  = -1 EBUSY (Device or resource busy)
>
> I could not yet identify why it is in busy state.
>
> I added some code to check for open file descriptors. I built a test
> application which simulates the sequence. But it runs without a problem.
> Can i get informations from the kernel, what file or state causes the
> busy state?

EBUSY can have many reasons. I'd guess an open file in RW mode.
Did you try lsof?

-- 
Thanks,
//richard

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

end of thread, other threads:[~2016-06-14 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 11:35 Data not freed after remove? Sven Eisenberg
     [not found] ` <CAFLxGvxZS_aqoR059M3aE9zz+TZ-VNhh9vpMNRJYL-97ZFrgZA@mail.gmail.com>
2016-06-03  8:16   ` Sven Eisenberg
2016-06-14 16:17     ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).