<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/remove.c, branch v7.2</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.2</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2008-10-21T06:10:29Z</updated>
<entry>
<title>reflect gnulib's removal of lstat.h</title>
<updated>2008-10-21T06:10:29Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-21T05:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=08c38ab7cbc0c6f3721885256ae3634f1e76f174'/>
<id>urn:sha1:08c38ab7cbc0c6f3721885256ae3634f1e76f174</id>
<content type='text'>
* src/copy.h: Don't include "lstat.h".
* src/ls.c: Likewise.
* src/remove.c: Likewise.
* src/rm.c: Likewise.
</content>
</entry>
<entry>
<title>accommodate gnulib header removals</title>
<updated>2008-10-19T12:15:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-19T11:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31a884dab7510d84a689ef8092132c93e3dcc4ad'/>
<id>urn:sha1:31a884dab7510d84a689ef8092132c93e3dcc4ad</id>
<content type='text'>
* src/copy.c: Don't include "euidaccess.h" or "lchmod.h".
* src/cp.c: Don't include "lchmod.h".
* src/ls.c: Don't include "dirfd.h".
* src/mkdir.c: Don't include "lchmod.h".
* src/pwd.c: Don't include "dirfd.h".
* src/remove.c: Don't include "dirfd.h" or "euidaccess.h".
* src/test.c: Don't include "euidaccess.h".
* gl/modules/getloadavg.diff: Adjust diff for changed context.
* src/uptime.c (uptime): Remove declaration.
</content>
</entry>
<entry>
<title>maint: avoid warnings due to attribute warn_unused_result</title>
<updated>2008-10-17T05:06:54Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-08T08:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bb7fa1e9321e6469c0738c33f5e5bb8ac3d62067'/>
<id>urn:sha1:bb7fa1e9321e6469c0738c33f5e5bb8ac3d62067</id>
<content type='text'>
Now that a (void) cast no longer suffices to ignore warnings from gcc
about uses of functions marked with the warn_unused_result attribute,
we need an alternative.  For the record, here's one of the ignorable
warnings: "copy.c:233: warning: ignoring return value of 'fchown',
declared with attribute warn_unused_result"
* bootstrap.conf (gnulib_modules): Import ignore-value.
* src/copy.c: Include "ignore-value.h".
(set_owner): Use ignore_value in place of "(void)" casts,
to ignore lchown and fchown failures.
* src/cp.c (re_protect): Likewise, to ignore lchown failure.
* src/remove.c (preprocess_dir): Remove unnecessary "(void)" cast.
</content>
</entry>
<entry>
<title>remove.c: avoid compile failure on OS/2</title>
<updated>2008-10-06T05:31:50Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-06T05:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ed0a1c9f943ed112c7ef24b8ab85d530ce5ca324'/>
<id>urn:sha1:ed0a1c9f943ed112c7ef24b8ab85d530ce5ca324</id>
<content type='text'>
* src/remove.c (dirent_inode_sort_may_be_useful): Guard also with
"#if defined __linux__".  Reported by Elbert Pol.
</content>
</entry>
<entry>
<title>remove.c: allow compilation on cygwin</title>
<updated>2008-10-02T11:17:48Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2008-10-02T02:52:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0628b73f355d9d584ddbd383dddf99f15c088729'/>
<id>urn:sha1:0628b73f355d9d584ddbd383dddf99f15c088729</id>
<content type='text'>
* src/remove.c (dirent_inode_sort_may_be_useful)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Elide definition when there is no point
in trying to use it.
</content>
</entry>
<entry>
<title>remove.c: combine two helper functions, to avoid sign-extension</title>
<updated>2008-10-01T10:27:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-01T10:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=94c59c97f9bed27ac820c5501c1e3a531ea918f0'/>
<id>urn:sha1:94c59c97f9bed27ac820c5501c1e3a531ea918f0</id>
<content type='text'>
* src/remove.c (fs_handles_readdir_ordered_dirents_efficiently):
Remove function, so as not to have to worry about the type of
statfs.f_type and sign extension.
(dirent_inode_sort_may_be_useful): Adjust comment.
Perform the switch directly on the struct.member here, instead.
Andreas Schwab spotted the potential for a sign-extension bug,
that happens not to bite for the S_* f_type values currently used.
</content>
</entry>
<entry>
<title>rm: don't preprocess a directory on a file system of type tmpfs or nfs</title>
<updated>2008-10-01T07:00:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-01T06:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ab02e256e957a0b0b17cc00b39415862753629bd'/>
<id>urn:sha1:ab02e256e957a0b0b17cc00b39415862753629bd</id>
<content type='text'>
The preprocessing phase is not necessary on tmpfs, and induces
a 20% performance decrease when removing a 2M-entry directory.
* src/remove.c (fs_handles_readdir_ordered_dirents_efficiently):
(dirent_inode_sort_may_be_useful): New functions from gnulib/fts.c.
They'll probably become a gnulib module -- eventually.
(preprocess_dir): Use dirent_inode_sort_may_be_useful.
</content>
</entry>
<entry>
<title>remove.c: avoid compiler warning</title>
<updated>2008-09-28T00:14:07Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2008-09-28T00:14:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=58aaf71f0756eada2180553bcbf3686a0c3249bd'/>
<id>urn:sha1:58aaf71f0756eada2180553bcbf3686a0c3249bd</id>
<content type='text'>
* src/remove.c (compare_ino, dirent_count)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Mask declaration when unused.

Signed-off-by: Eric Blake &lt;ebb9@byu.net&gt;
</content>
</entry>
<entry>
<title>rm -r: avoid O(n^2) performance for a directory with very many entries</title>
<updated>2008-09-26T22:10:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-09-22T20:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=24412edeaf556a96a5ee122851de7c3e37726bdb'/>
<id>urn:sha1:24412edeaf556a96a5ee122851de7c3e37726bdb</id>
<content type='text'>
This enhancement works around a problem that is specific to at least
ext3 and ext4 file systems.  With them, it would take hours to remove
a two-million-entry directory.  RAM-backed file systems (tmpfs) are
not affected, since there is no seek penalty.
* remove.c (rm_malloc, rm_free, compare_ino): New functions.
(dirent_count, preprocess_dir): New function.
[struct readdir_data]: New struct.
(remove_cwd_entries): Call preprocess_dir.
* tests/rm/ext3-perf: New file.  Test for the performance fix.
* NEWS: mention the new feature
</content>
</entry>
<entry>
<title>remove.c: don't use xmalloc; don't let obstack call exit on failure</title>
<updated>2008-09-26T22:10:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-09-24T08:27:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a5111af33ea6a5d27c3f7ab67afdb2a5884c38b6'/>
<id>urn:sha1:a5111af33ea6a5d27c3f7ab67afdb2a5884c38b6</id>
<content type='text'>
(obstack_chunk_alloc, obstack_chunk_free): Don't define.
(top_dir): Param is no longer "const".
Use malloc, not xmalloc, and call longjmp upon failed malloc.
(obstack_init_minimal): New function.
(ds_init): Don't use xmalloc.  Instead, use caller-supplied buffer.
Use obstack_specify_allocation_with_arg, not obstack_init, so
that we control what happens upon allocation failure.
Arrange for ds_free not to free uninitialized if/when
any obstack_specify_allocation_with_arg allocation fails.
(ds_free): Don't free DS, now that it's no longer malloc'd.
(rm): Allocate DS on the stack.
Arrange to handle ds_init allocation failure.

step1
</content>
</entry>
</feed>
