<div dir="ltr">As I got stuck with some C-related things in the changes for much longer than I <br>anticipated, I'm making just this reply now - patches will came once I get it <div>working.</div><div><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 17, 2015 at 9:32 PM, Christoph Hellwig <span dir="ltr"><<a href="mailto:hch@infradead.org" target="_blank">hch@infradead.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Do you have any idea why MacOS defines a uuid_t, but wants unsigned<br>
char arguments to uuid_compare?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">uuid_t works too. :-)<span style="font-family:arial,helvetica,sans-serif"></span></div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
> +static inline int nftw64(const char *path, int (*fn)(const char *, const struct stat *ptr, int flag, struct FTW *), int depth,<br>
> + int flags)<br>
> +{<br>
> + return nftw(path, fn, depth, flags);<br>
> +}</span> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
> +#define MREMAP_FIXED 1<br>
> +#define MREMAP_MAYMOVE 2<br>
> +static inline void *mremap(void *old_address, size_t old_size,<br>
> + size_t new_size, int flags, ... /* void *new_address */)<br>
> +{<br>
> + return NULL;<br>
> +}<br>
> +<br>
> +/* FSR */<br>
<br>
</span>Please just build the mremap file in xfs_io conditional.<br></blockquote><br>Well, if I make io/mmap.c <div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">(</div>where mremap is used<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">) c</div>onditional, then I need to</div><div class="gmail_quote">make multiple dummy calls<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline"> </div>or put ifdefs around every call from this file. So instead of a sing</div><div class="gmail_quote"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Well, if I make io/mmap.c, where mremap is used, conditional, then I need to</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">make multiple dummy calls or put ifdefs around every call from that file.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So instead of a single dummy call and two defines, I ends with more</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">changes...</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">IOW, I don't see any file I could remove from xfs_io without bigger changes.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
> +typedef int __fsblkcnt_t;<br>
> +typedef int __fsfilcnt_t;<br>
> +typedef long long int __fsblkcnt64_t;<br>
> +typedef long long int __fsfilcnt64_t;<br>
> +<br>
> +struct statvfs64<br>
> +{<br>
> + unsigned long int f_bsize;<br>
> + unsigned long int f_frsize;<br>
> + __fsblkcnt64_t f_blocks;<br>
> + __fsblkcnt64_t f_bfree;<br>
> + __fsblkcnt64_t f_bavail;<br>
> + __fsfilcnt64_t f_files;<br>
> + __fsfilcnt64_t f_ffree;<br>
> + __fsfilcnt64_t f_favail;<br>
> + unsigned long int f_fsid;<br>
> + int __f_unused;<br>
> + unsigned long int f_flag;<br>
> + unsigned long int f_namemax;<br>
> + int __f_spare[6];<br>
> +};<br>
<br>
</span>Does MacOS support statvfs? or statfs? We should use the proper API<br>
here instead of a dummy. Or maybe just not build fsr on OSX for now,<br>
as that would solve the fsetxattr issue as well.<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Now, this is what stopped me. As far as I can tell, simple</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#define statvfs64 statfs</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">do the job, as Mac has the struct and the call. But statfs on Mac is missing</div></div><div class="gmail_default" style="">f_frsize and related members. I tried to make something with it, but I run </div><div class="gmail_default" style="">out of ideas others than redefine the struct...</div><div> </div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I still don't like the idea of removing fsr from OSX build, but if the amount</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">of dummies is too big, it may end that way... :-(</div></div></div><div class="gmail_extra"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Jan</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jan Tulak<br></div><a href="mailto:jtulak@redhat.com" target="_blank">jtulak@redhat.com</a> / <a href="mailto:jan@tulak.me" target="_blank">jan@tulak.me</a></div></div></div></div>
</div></div></div>