On Sat, 6 Jan 2007, Szakacsits Szabolcs wrote:
> 
> Our task could be to make samba believe that the small files are not spare. 
> Maybe this can be configured somewhere, maybe not. Meanwhile I'll check why 
> samba guess this attribute wrongly.

Yes, it's based on the sometimes incorrect ->st_block value. Could you 
please try the below ntfs-3g patch? It should make samba think that the 
small files are not sparse. Does activesync still fail for all files or 
does the situation improve?

If it still doesn't work then please send the verbose samba log again and 
also what samba version you use (I can see only that it's quite recent).

        Szaka

diff -u -d -p -r1.18 ntfs-3g.c
--- src/ntfs-3g.c       17 Dec 2006 19:48:34 -0000      1.18
+++ src/ntfs-3g.c       6 Jan 2007 22:18:50 -0000
@@ -376,7 +376,7 @@ static int ntfs_fuse_getattr(const char
                /* Regular or Interix (INTX) file. */
                stbuf->st_mode = S_IFREG;
                stbuf->st_size = ni->data_size;
-               stbuf->st_blocks = ni->allocated_size >> 9;
+               stbuf->st_blocks = (ni->allocated_size >> 9) + 1;
                stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count);
                if (ni->flags & FILE_ATTR_SYSTEM || stream_name_len) {
                        na = ntfs_attr_open(ni, AT_DATA, stream_name,

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to