← Back to team overview

kernel-packages team mailing list archive

[Bug 1474493] Re: Directory size grows when creating/deleting thousands of files

 

Even if the files are huge, the size of the folder doesn't change. If I
create 100,000 5 byte files or 100,000 1mb files, the folder size is
about 2mb after I delete all the files.

However, it should be noted that when using much bigger files ( 200mb+
), the folder size can be slightly bigger, but it is not the size of the
deleted files.

I added a modified script.

lsof | grep deleted shows nothing.

** Attachment added: "Reproduce using 1mb files."
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1474493/+attachment/4428985/+files/urandom-test

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1474493

Title:
  Directory size grows when creating/deleting thousands of files

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Run the attached bash script. ( it might cause wear and tear on your
  hard drive ).

  What I expect should happen :

  Folder size of test should be 4.0K like before I ran the test.

  What actually happened :

  Folder size is not 2.1M ( 2138112 bytes ).

  There does not seem to be any way to recover the 2 megabytes lost and
  the only way to get the folder size back to 4.0K is to delete it and
  recreate it.

  
  lsb_release -rd :
  Description:	Ubuntu 14.04.1 LTS
  Release:	14.04

  apt-cache policy linux-generic :
  linux-generic:
    Installed: 3.13.0.35.42
    Candidate: 3.13.0.57.64
    Version table:
       3.13.0.57.64 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
   *** 3.13.0.35.42 0
          100 /var/lib/dpkg/status
       3.13.0.24.28 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages


  This also affects other versions of Ubuntu, including but not limited
  to Ubuntu 10.04 and Ubuntu 12.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1474493/+subscriptions


References