Boost Users :
Subject: Re: [Boost-users] [filesystem] problem: is_regular_file and deduplified files (reparse+sparse)
From: Paul Harris (harris.pc_at_[hidden])
Date: 2015-07-23 01:57:35
Hi Niall, you can use the Azure to test this sort of thing... I think. I'm
trying it out now.
On 23 July 2015 at 09:54, Niall Douglas <s_sourceforge_at_[hidden]> wrote:
> On 23 Jul 2015 at 8:56, Paul Harris wrote:
> > With this server comes the new "dedup" feature, that can automatically
> > deduplify files. This happens on a schedule, eg 2am saturday. So
> > we are getting messages of failures of software from all over the place,
> > due to fs::is_regular_file()
> > Deduped files have the REPARSE and SPARSE flag set.
> > On the command line, you can run
> > FSUTIL REPARSEPOINT QUERY
> > and the "Reparse Tag Value" is 0x80000013
> > Which is a relatively new flag known as IO_REPARSE_TAG_DEDUP
> > These files act as normal files, you can fopen and fread them, so I
> > they should be treated almost like symlink by boost... perhaps not quite
> > symlink because I assume the "lstat" link properties are identical to the
> > file's stat properties.
> > Typically, I iterate over directories and only process files if
> > fs::is_regular_file(filename) is true.
> > I wrote some code to check what the properties were on these files, and
> > not any of the possible enums detected by file_status::type().
> > ideas?
> Proposed Boost.AFIO doesn't support IO_REPARSE_TAG_DEDUP because I
> have no access to any system to test the support upon.
> However, if AFIO were to support IO_REPARSE_TAG_DEDUP, it would treat
> it identically to a symlink/junction point.
> I'd suggest Boost.Filesystem do the same, and treat pseudo-symlinks
> as symlinks. That probably means adding full symlink support for
> Filesystem on Windows. Here are some links to example implementation
> Reading a symlink target:
> Writing a symlink:
> Obviously best not allow rewriting a pseudo-symlink like
> IO_REPARSE_TAG_DEDUP, make it read only.
> ned Productions Limited Consulting
> Boost-users mailing list
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net