Andrew Borodin
0dacce4228
Do not include <sys/select> globally via "lib/global.h".
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
7a602de0d2
(mc_symlink): test vpath2 before use.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
4667a9be0d
lib/vfs/interface.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
8411b93ff7
(vfs_stamp_compare): fix NULL dereference.
...
(vfs_stamp): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
7ce3ca0991
Make VFS faster a bit.
...
Each VSF entry is added to VFS using vfs_s_insert_entry() via
g_list_append(). For long lists, a lot of walking through entire list
is performed. To get rid that, change type of vfs_s_inode::subdir from
GList to GQueue.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
a5826c3f6e
(vfs_s_normalize_filename_leading_spaces): minor refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
651c3539b6
VFS: trivial optimization
...
* (vfs_s_opendir): test if path is invalid or not ASAP.
* (vfs_s_readlink): likewise.
* (vfs_s_open): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
9df841478b
VFS: move flush member from vfs_s_subclass to vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
45bd20ab0b
VFS: move logfile member from vfs_s_subclass to vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
94c0b79f37
VFS: change vfs_class::nothingisopen members
...
Do not free VFS before nested one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
5b0f177e62
vfs_class::nothingisopen: return gboolean instead of int.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
3d6d6bd9a6
lib/vfs/gc.c: yet another fixups
...
* (vfs_expire): refactor.
* Fix typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
7548679271
VFS: invalidate file descriptors after close.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
210ccc2f65
(vfs_path_from_str_uri_parser): get rid of extra type cast.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
0c66d9cef6
extfs: refactoring: use standard VFS structures.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
533cbbd971
VFS: make vfs_file_handler related macros more readable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
6d21416672
VFS: derive VFS-specific file handler class from vfs_file_handler_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
3e08cc7226
VFS: derive VFS-specific super class from vfs_s_super.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
d51f1f4963
VFS: refactor VFS unit initialization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
672ba46c8b
VFS: make vfs_class and vfs_s_subclass related macros more readable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
0fbd98fece
Join vfs_class_flags_t and vfs_subclass_flags_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
c764d60238
VFS: (vfs_s_subclass): derive from vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
f11c78f9d0
(vfs_unregister_class): new API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
45b10aed6b
VFS GC: fixups of reimplement using GSList.
...
Fixups for commit f45ea691db
.
Don't use g_list_foreach() for list that is being modified.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
28cdea55cd
Revert "VFS GC: use mc_timer."
...
This reverts commit f21f27c5ae
to fix an unexpected segfaults.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
f21f27c5ae
VFS GC: use mc_timer.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
f45ea691db
VFS GC: reimplement using GSList.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
d451d5978f
vfs_stamping: make opaque.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
1dd8a47987
Ticket #3955 : code cleanup before 4.8.23 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
ba6845f2d6
(vfs_stamp_path): get rid of path conversion.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-01-13 12:33:06 +03:00
Andrew Borodin
792d25a48b
Sync with gnulib 4d4877e6c2123c4862c321f3eab28a55bf886216.
...
Remove support for AIX PS/2.
* m4.include/gnulib/fsusage.m4: (gl_PREREQ_FSUSAGE_EXTRA): Don't check
for dustat.h.
* lib/unixcompat.h: Remove code for AIX PS/2.
* lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
* lib/vfs/vfs.c: Likewise.
* src/filemanager/mountlist.c: Likewise.
* src/vfs/smbfs/helpers/include/includes.h: Likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
1fec6e9854
Partially revert "VFS: (vfs_s_subclass): make the derived class from vfs_class."
...
This reverts commit 5d1284c4a6
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-10 12:47:12 +03:00
Andrew Borodin
c7206191bc
Revert "VFS: make VFS-specific super class as derived one from vfs_s_super."
...
This reverts commit ab033ad318
.
2018-09-10 12:47:12 +03:00
Andrew Borodin
c91e3d5edb
Revert "VFS: make VFS-specific file handler class the derived one from vfs_file_handler_t."
...
This reverts commit 2d58e4d624
.
2018-09-10 12:47:12 +03:00
Andrew Borodin
88d6157323
(vfs_preallocate): check mc_global.vfs.preallocate_space before call.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
b684ce2565
Clarify usage of FL_NONE value.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
2d58e4d624
VFS: make VFS-specific file handler class the derived one from vfs_file_handler_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
ab033ad318
VFS: make VFS-specific super class as derived one from vfs_s_super.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
5d1284c4a6
VFS: (vfs_s_subclass): make the derived class from vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
2e5cd866f9
Check linux/fs.h file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:44:42 +03:00
Andrew Borodin
23a2056a18
(vfs_clone_file): clarify errno in case of bad file descriptors.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:33:32 +03:00
gray_-_wolf
0493a5e90e
Ticket #1983 : support BTRFS's file clone operation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:33:32 +03:00
Andrew V. Samoilov
35376105d4
(vfs_url_split): Fix 2 memory leaks found by valgrind.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew Borodin
af466458b7
vfs: create enum vfs_linear_state_t instead of defines.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
95e1ab3064
vfs: use LS_NOT_LINEAR constant.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
cb354e5490
(vfs_file_handler_t::changed): change type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
a514ce6d13
(vfs_s_super::want_stale): change type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
f1d9b67bb5
lib/vfs/direntry.c: apply cpding style; cosmetics.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
6e994011f5
(vfs_path_url_split): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00