Re: [notmuch] [PATCH] d_type fix

Subject: Re: [notmuch] [PATCH] d_type fix

Date: Sat, 23 Jan 2010 18:48:35 +1300

To: Geo Carncross,


From: Carl Worth

On Thu, 21 Jan 2010 15:10:18 -0500, Geo Carncross <> wrote:
> A review of notmuch-new.c shows three uses of ->d_type:

Excellent, thank you.

> Near line 153, in _entries_resemble_maildir() we can simply allow for
> DT_UNKNOWN. This would fail if people have MH-style folders which have
> three folders called "new" "cur" and "tmp", but that seems unlikely, in
> which case the "tmp" folder would simply not be scanned.

The check will also fail if someone happens to have two regular files
named "cur" and "new" next to a directory named "tmp", (which would then
be ignored). But I agree this seems very unlikely.

> [snip]

The rest of your analysis looks good to me. And it's nice to see how
simple the final patch is.

> Attached is a patch which was tested with reiserfs. It should also work
> with xfs.

I had been waiting to apply the previous patch until I could test it on
a filesystem returning DT_UNKNOWN. But this one looks clean enough to
apply immediately.

One thing that would have made that easier would be a commit message,
(such as making a commit with "git commit" then using "git format-patch"
and "git send-email" to send it). But I'll go ahead and make one up.

Thanks again!

part-000.sig (application/pgp-signature)