John Baldwin
9f72c0322c
Fix some edge cases with rewinddir():
...
- In the unionfs case, opendir() and fdopendir() read the directory's full
contents and cache it. This cache is not refreshed when rewinddir() is
called, so rewinddir() will not notice updates to a directory. Fix this
by splitting the code to fetch a directory's contents out of
__opendir_common() into a new _filldir() function and call this from
rewinddir() when operating on a unionfs directory.
- If rewinddir() is called on a directory opened with fdopendir() before
any directory entries are fetched, rewinddir() will not adjust the seek
location of the backing file descriptor. If the file descriptor passed
to fdopendir() had a non-zero offset, the rewinddir() will not rewind to
the beginning. Fix this by always seeking back to 0 in rewinddir().
This means the dd_rewind hack can also be removed.
While here, add missing locking to rewinddir().
CR: https://phabric.freebsd.org/D312
Reviewed by: jilles
MFC after: 1 week
2014-07-11 16:16:26 +00:00
..
2010-08-17 09:13:26 +00:00
2011-11-26 16:49:25 +00:00
2011-02-18 21:44:53 +00:00
2012-02-12 18:29:56 +00:00
2012-09-29 11:54:34 +00:00
2012-08-11 12:07:24 +00:00
2011-06-18 00:33:34 +00:00
2011-06-18 00:33:34 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-03-16 11:04:44 +00:00
2014-06-23 08:25:03 +00:00
2012-12-21 22:20:59 +00:00
2014-06-23 08:25:03 +00:00
2012-08-21 09:17:13 +00:00
2013-08-18 20:11:34 +00:00
2010-10-08 12:40:16 +00:00
2011-10-01 12:19:48 +00:00
2011-10-01 12:19:48 +00:00
2011-09-28 18:53:36 +00:00
2013-08-18 20:11:34 +00:00
2012-05-19 14:30:49 +00:00
2013-06-04 07:37:06 +00:00
2012-02-17 10:49:29 +00:00
2014-06-23 08:25:03 +00:00
2012-01-07 10:33:01 +00:00
2013-08-18 13:25:18 +00:00
2013-08-16 13:10:30 +00:00
2011-01-08 17:13:43 +00:00
2012-04-26 19:21:58 +00:00
2013-08-31 22:32:42 +00:00
2012-01-03 18:51:58 +00:00
2011-05-25 14:13:53 +00:00
2010-05-13 12:07:55 +00:00
2012-12-10 17:56:51 +00:00
2013-08-08 09:04:02 +00:00
2012-12-04 16:54:43 +00:00
2014-06-23 08:25:03 +00:00
2012-09-27 22:05:54 +00:00
2013-05-28 21:05:06 +00:00
2014-01-12 20:47:08 +00:00
2014-03-06 22:47:11 +00:00
2012-08-09 15:11:38 +00:00
2014-07-11 16:16:26 +00:00
2012-11-16 12:03:50 +00:00
2010-10-08 12:40:16 +00:00
2012-12-10 17:56:51 +00:00
2013-03-13 18:18:16 +00:00
2012-09-29 11:54:34 +00:00
2011-04-14 08:53:04 +00:00
2012-12-10 17:56:51 +00:00
2012-02-20 20:46:27 +00:00
2014-04-05 18:14:58 +00:00
2012-12-10 17:56:51 +00:00
2011-12-14 08:35:08 +00:00
2010-08-17 09:13:26 +00:00
2014-06-23 08:25:03 +00:00
2010-08-17 09:13:26 +00:00
2014-01-20 18:15:06 +00:00
2012-12-10 17:56:51 +00:00
2014-06-23 08:25:03 +00:00
2013-10-15 13:32:01 +00:00
2011-12-20 22:56:13 +00:00
2013-04-11 20:15:37 +00:00
2010-05-19 08:57:53 +00:00
2012-11-11 13:28:04 +00:00
2011-12-23 15:00:37 +00:00
2013-09-12 00:53:38 +00:00
2014-03-04 02:19:39 +00:00
2011-10-21 06:40:36 +00:00
2012-08-09 22:05:40 +00:00
2012-09-29 11:54:34 +00:00
2014-07-11 16:16:26 +00:00
2014-01-30 18:04:39 +00:00
2013-05-20 17:31:18 +00:00
2013-10-20 20:50:17 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2011-07-10 14:20:11 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2014-06-23 08:25:03 +00:00
2012-03-26 15:18:14 +00:00
2013-04-17 21:08:15 +00:00
2010-05-07 17:20:15 +00:00
2012-09-11 12:55:15 +00:00
2014-07-11 16:16:26 +00:00
2010-11-13 10:38:06 +00:00
2012-09-29 11:54:34 +00:00
2014-07-11 16:16:26 +00:00
2011-02-06 23:26:14 +00:00
2014-04-02 16:07:48 +00:00
2014-04-02 16:07:48 +00:00
2014-04-02 16:07:48 +00:00
2012-05-19 12:44:27 +00:00
2014-05-10 19:08:07 +00:00
2010-05-19 08:57:53 +00:00
2014-05-29 13:35:13 +00:00
2012-02-25 02:12:17 +00:00
2014-06-23 08:25:03 +00:00
2013-06-30 20:51:15 +00:00
2011-02-04 16:40:50 +00:00
2013-09-03 08:19:06 +00:00
2013-06-30 20:51:15 +00:00
2014-06-23 08:25:03 +00:00
2013-04-23 13:03:03 +00:00
2013-04-23 13:03:03 +00:00
2013-08-21 23:04:48 +00:00
2014-04-03 08:16:45 +00:00
2013-04-26 21:43:42 +00:00
2014-07-09 19:12:18 +00:00
2013-07-26 02:00:06 +00:00
2012-09-06 20:15:44 +00:00
2012-12-12 15:27:33 +00:00
2013-10-20 21:04:44 +00:00
2010-05-19 08:57:53 +00:00
2010-11-02 17:00:56 +00:00
2012-05-19 12:44:27 +00:00
2014-07-11 16:16:26 +00:00
2010-11-02 17:00:56 +00:00
2012-01-03 18:51:58 +00:00
2014-07-07 00:27:09 +00:00
2012-01-21 18:00:28 +00:00
2012-12-18 16:37:24 +00:00
2012-03-23 08:26:31 +00:00
2012-11-13 12:55:52 +00:00
2013-08-27 21:47:01 +00:00