> -----Oorspronkelijk bericht-----
> Van: Szakacsits Szabolcs [mailto:[EMAIL PROTECTED] 
> Verzonden: zaterdag 6 januari 2007 23:25
> Aan: [EMAIL PROTECTED]
> CC: [email protected]
> Onderwerp: Re: [ntfs-3g-devel] error on transfer of very 
> small files over LAN
> 
> 
> 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,
> 
Wow! You are amazing!

This solves the problem completely!
Is there anything I should be watching out for? I mean: any new problems
that could arise following this patch? Not being pessimistic though ;-)

I'll send you the new verbose samba log anyhow just in case you might be
curious... I'm using ver. 3.0.23d-2+b1 on Debian Etch 2.6.18-3-k7, fuse
2.6.1

Thanks again!
Rein


-------------------------------------------------------------------------
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