Skip to content

Commit 6c64d75

Browse files
committed
Add configfs, securityfs, cgroup and cgroup2 to blacklisted filesystems.
Use read/write loop for copying files from these filesystems, as they contain generated content and have inaccurate file sizes.
1 parent 8e4e89c commit 6c64d75

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

doc/release_history.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ <h2>1.91.0</h2>
5454
</ul>
5555
</li>
5656
<li>On DragonFly BSD, NetBSD and Solaris, Boost.Filesystem default path locale now uses UTF-8 for path character encoding.</li>
57+
<li>On Linux, use <code>read</code>/<code>write</code> loop implementation of <code>copy_file</code> and <code>copy</code> for configfs, securityfs, cgroup and cgroup2 filesystems, in addition to the previously blacklisted filesystems.</li>
5758
</ul>
5859

5960
<h2>1.90.0</h2>

src/operations.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,14 @@ int check_fs_type(int infile, int outfile, uintmax_t size, std::size_t blksize)
984984

985985
if (BOOST_UNLIKELY(sfs.f_type == PROC_SUPER_MAGIC ||
986986
sfs.f_type == SYSFS_MAGIC ||
987+
#if defined(CGROUP2_SUPER_MAGIC)
988+
sfs.f_type == CGROUP2_SUPER_MAGIC ||
989+
#endif
990+
#if defined(CGROUP_SUPER_MAGIC)
991+
sfs.f_type == CGROUP_SUPER_MAGIC ||
992+
#endif
993+
sfs.f_type == SECURITYFS_MAGIC ||
994+
sfs.f_type == 0x62656570 || // CONFIGFS_MAGIC
987995
sfs.f_type == TRACEFS_MAGIC ||
988996
sfs.f_type == DEBUGFS_MAGIC))
989997
{

0 commit comments

Comments
 (0)