public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yura Pakhuchiy <pakhuchiy@iptel.by>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org,
	linux-ntfs-dev@lists.sourceforge.net
Subject: Re: [Linux-NTFS-Dev] [2.6-GIT] NTFS: Release 2.1.25.
Date: Mon, 31 Oct 2005 23:25:39 +0200	[thread overview]
Message-ID: <1130793939.2104.19.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.0510312040010.10190@hermes-1.csi.cam.ac.uk>

On Mon, 2005-10-31 at 20:49 +0000, Anton Altaparmakov wrote:
> On Mon, 31 Oct 2005, Yura Pakhuchiy wrote:
> > On Mon, 2005-10-31 at 14:22 +0000, Anton Altaparmakov wrote:
> > > And people: please try it before Linus releases 2.6.15 and report back 
> > > (especially if you find bugs but even a "it works" would be nice to hear 
> > > from a few more people)...
> > 
> > One more bug, steps to reproduce:
> > 1) Create fragmented file with DATA attribute split on several records.
> > (using windows or ntfsmount)
> 
> That is just evil.  Attribute list attribute is not supported yet!  And 
> majority of files are not fragmented like that...

It seems you forgot to place somewhere "return -EOPNOTSUPP;", if I was
able to overwrite them.

> btw. Did you run a chkdsk fter using ntfsmount and before mounting with 
> the ntfs driver?  I keep finding that chkdsk finds lots of (minor) 
> problems after ntfsmount has written to a drive (I haven't investigated 
> since then only times I have done it I was also messing with "strange" 
> filenames and things like that so I was not expecting it to necessarily 
> work and I haven't had time since to do it again on a clean volume).

Yes, I was forced to do that, because after I received NULL pointer
dereference first time umount failed and thus dirty bit was on the
volume.

BTW, ntfsmount in almost all truncating cases leave absolutely clean
volume chkdsk happy with, except one case with updating length of
resident file length in index. About file creation/deletion yes, volume
sometimes have minor inconsistencies, but windows driver itself often
leave them (in case file have 2 names, when you change size for one,
windows does not update another size in index).

> Not that that is any excuse for the ntfs driver to crash...  It should 
> deal with corruption...
> 
> > 2) Overwrite this file with some small (few bytes, but non-zero) file.
> > (using kernel driver)
> 
> Again, the required truncate is not supported so this cannot work.

Again, it works, but not in such way as it should.

> > After this cp segfaults on my system and I receive following in dmesg:
> 
> Ouch!  It certainly should not do that!  )-:
> 
> > NTFS-fs error (device hda4): ntfs_truncate(): Cannot truncate inode 
> > 0x169e, attribute type 0x80, because the attribute is highly fragmented 
> > (it consists of multiple extents) and this case is not implemented yet.
> 
> That is correct.  Attribute list attribute is not supported yet.
> 
> > Unable to handle kernel NULL pointer dereference at virtual address 00000029
> >  printing eip:
> > c01ece9e
> > *pde = 00000000
> > Oops: 0000 [#1]
> > PREEMPT 
> > Modules linked in: ltserial ltmodem fglrx vmmon subfs
> > CPU:    0
> > EIP:    0060:[<c01ece9e>]    Tainted: P      VLI
> > EFLAGS: 00010246   (2.6.14-ck1) 
> > EIP is at ntfs_prepare_pages_for_non_resident_write+0x4ce/0x1f70
> > eax: 00000200   ebx: 00000000   ecx: c78ebcd8   edx: 00000029
> > esi: c774e9c4   edi: 00000000   ebp: 00000000   esp: c78ebbec
> > ds: 007b   es: 007b   ss: 0068
> > Process cp (pid: 2420, threadinfo=c78ea000 task=c9178ad0)
> > Stack: c87c1b44 c774e9c4 00000000 ceee43c0 cf596030 c04fd960 00000001 00000000 
> >        00000096 00000000 cf603f3c 00000001 c78ebc5c c90bbc54 c78ea000 00000000 
> >        00001000 00000000 c90bbc20 09003200 00000000 00000000 00000000 00000000 
> > Call Trace:
> >  [<c01c40c7>] journal_end+0xa7/0x100
> >  [<c01218f1>] current_fs_time+0x51/0x70
> >  [<c017d453>] inode_update_time+0xb3/0xe0
> >  [<c01f04d6>] ntfs_file_aio_write_nolock+0x216/0x260
> >  [<c013f5e1>] __generic_file_aio_read+0x1f1/0x230
> >  [<c013f310>] file_read_actor+0x0/0xe0
> >  [<c01f06c2>] ntfs_file_writev+0xc2/0x140
> >  [<c01320e0>] autoremove_wake_function+0x0/0x60
> >  [<c01f0777>] ntfs_file_write+0x37/0x40
> >  [<c0160c57>] vfs_write+0xa7/0x180
> >  [<c0160e01>] sys_write+0x51/0x80
> >  [<c01032e1>] syscall_call+0x7/0xb
> > Code: 00 00 00 39 4c 24 74 0f 87 66 ff ff ff 8b 6c 24 58 85 ed 75 69 c7 44 24 5c 00 00 00 00 8b 5c 24 5c 8b b4 24 08 01 00 00 8b 14 9e <8b> 02 f6 c4 08 74 42 8b 52 0c 89 54 24 78 89 d5 89 f6 8b 45 00 
> 
> Hmm.  Looks like error handling gone wrong.  Will investigate tomorrow.  
> It is osx evening now.
> 
> > BTW, great work, but IMHO to early for mainline.
> 
> Too late!  (-;  It it there already.  Also it really is not too early!  
> Look yourself: you tested it only when I sent it to mainline, you must 
> have seen the posts when I asked for testers and also when it was in 
> -mm but you didn't test it then.  And I imagine neither did anyone else 
> except for me and one other person who reported a bug which I fixed 
> prompty...

Anyway mainline is not place for unstable code IMHO, or people will
simply stop trust it. You have test your code better (at least such
obvious cases), even if no one except you do not want to test it. BTW,
when I implemented file creation in libntfs, almost no one except
several persons tested it too.

About me, I did not tested this code before, at least because you had
not posted patches to mailing list when you send it to -mm. Sorry, but I
do not have git repository.

-- 
Best regards,
        Yura


  reply	other threads:[~2005-10-31 21:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 14:22 [2.6-GIT] NTFS: Release 2.1.25 Anton Altaparmakov
2005-10-31 14:24 ` [PATCH 1/17] NTFS: Change ntfs_map_runlist_nolock() to also take an optional attribute search context Anton Altaparmakov
2005-10-31 14:25 ` [PATCH 2/17] NTFS: Change ntfs_attr_find_vcn_nolock() " Anton Altaparmakov
2005-10-31 14:26 ` [PATCH 3/17] NTFS: - Change {__,}ntfs_cluster_free() " Anton Altaparmakov
2005-10-31 14:27 ` [PATCH 4/17] NTFS: - Change ntfs_cluster_alloc() to take an extra boolean parameter Anton Altaparmakov
2005-10-31 14:27 ` [PATCH 5/17] NTFS: Change ntfs_attr_make_non_resident to take the attribute value size Anton Altaparmakov
2005-10-31 14:29 ` [PATCH 6/17] NTFS: Fix ntfs_attr_make_non_resident() to update the vfs inode i_blocks Anton Altaparmakov
2005-10-31 14:30 ` [PATCH 7/17] NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_extend_allocation() Anton Altaparmakov
2005-10-31 14:31 ` [PATCH 8/17] NTFS: Implement fs/ntfs/inode.[hc]::ntfs_truncate() Anton Altaparmakov
2005-10-31 14:32 ` [PATCH 9/17] NTFS: Enable ATTR_SIZE attribute changes in ntfs_setattr() Anton Altaparmakov
2005-10-31 14:32 ` [PATCH 10/17] NTFS: In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited() Anton Altaparmakov
2005-10-31 14:33 ` [PATCH 11/17] NTFS: Remove address space operations ->prepare_write and ->commit_write Anton Altaparmakov
2005-10-31 14:36 ` [PATCH 12/17] NTFS: The big ntfs write(2) rewrite has arrived Anton Altaparmakov
2005-10-31 14:38 ` [PATCH 13/17] NTFS: $EA attributes can be both resident non-resident Anton Altaparmakov
2005-10-31 14:38 ` [PATCH 14/17] NTFS: Fix serious data corruption issue when writing Anton Altaparmakov
2005-10-31 14:40 ` [PATCH 15/17] NTFS: Use %z for size_t to fix compilation warnings. (Andrew Morton) Anton Altaparmakov
2005-10-31 14:41 ` [PATCH 16/17] NTFS: Fix compilation warnings with gcc-4.0.2 on SUSE 10.0 Anton Altaparmakov
2005-10-31 14:42 ` [PATCH 17/17] NTFS: Document extended attribute ($EA) NEED_EA flag Anton Altaparmakov
2005-10-31 19:30 ` [Linux-NTFS-Dev] [2.6-GIT] NTFS: Release 2.1.25 Yuval
2005-10-31 20:05   ` Anton Altaparmakov
2005-10-31 20:24 ` Yura Pakhuchiy
2005-10-31 20:49   ` Anton Altaparmakov
2005-10-31 21:25     ` Yura Pakhuchiy [this message]
2005-10-31 21:54       ` Anton Altaparmakov
2005-11-01 14:48         ` Yura Pakhuchiy
2005-11-01 14:56           ` Anton Altaparmakov
2005-11-01 15:01             ` Yura Pakhuchiy
2005-11-01 16:22               ` Anton Altaparmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1130793939.2104.19.camel@localhost \
    --to=pakhuchiy@iptel.by \
    --cc=aia21@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=pakhuchiy@gmail.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox