This is the mail archive of the cygwin-patches mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Jun 19 11:47, Joe Lowe wrote: > > On 2017-06-19 04:45, Corinna Vinschen wrote:> Hi Joe, > > > > As discussed in the previous iteration of this patch, this change > > results in nuking DT_UNKNOWN for reparse points we don't handle. Still, > > IMHO, if we have reparse points we know nothing about, they should stay > > DT_UNKNOWN. > > > > Why is changing them to DT_DIR/DT_REG a good idea? Please convince me. > > As coded, the patch makes the dentry.d_type field consistent with > S_ISREG and S_ISDIR on the results of lstat-ing the same name. This > seems correct to me, from the standpoint of avoiding compatibility > issues with any *nix application code that may look at the d_type > value and make some inference from it. I do not know of any specific > application examples where this is actually a problem. > > My concern with DT_UNKNOWN for unknown reparse tags: it indicates > to cygwin applications and developers that reparse tags are an > extended file system node type enumeration. In general this is > incorrect. Reparse tags are a type of extended attribute that can be > attached to any regular NTFS file or directory. Reparse tags do not > necessarily do anything to prevent normal access to the > file/directory. Actually, DT_UNKNOWN indicates nothing. The sole purpose of this value is to tell the application that the information is not readily available without having to perform costly operations, which often is the case for remote filesystems. From the Linux man page: DT_UNKNOWN The file type could not be determined. Currently, only some filesystems (among them: Btrfs, ext2, ext3, and ext4) have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN. > If you like, I will redo the patch to return dentry.d_type of > DT_UNKNOWN for files/directories with unknown reparse tags. > Let me know. No, it's ok. Let's go with this as you wrote it. I pushed your patch, plus a follow-up patch to handle remote reparse points correctly, as outlined in my previous reply. I uploaded new developer snapshots to https://cygwin.com/snapshots/ Please give them a try. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |