]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'debian'
authorDavid Bremner <david@tethera.net>
Sun, 2 Jul 2017 13:50:17 +0000 (10:50 -0300)
committerDavid Bremner <david@tethera.net>
Sun, 2 Jul 2017 13:50:17 +0000 (10:50 -0300)
merge in changes from 0.23.7-3 debian upload

364 files changed:
.gitignore
Makefile
Makefile.global [new file with mode: 0644]
Makefile.local
NEWS
bindings/Makefile.local
bindings/python/notmuch/database.py
bindings/python/notmuch/query.py
bindings/python/notmuch/version.py
bindings/ruby/extconf.rb
bindings/ruby/query.c
compat/have_timegm.c
completion/notmuch-completion.bash
configure
debian/changelog
debian/control
debian/libnotmuch4.install [deleted file]
debian/libnotmuch4.symbols [deleted file]
debian/libnotmuch5.install [new file with mode: 0644]
debian/libnotmuch5.symbols [new file with mode: 0644]
debian/notmuch.install
devel/emacs-keybindings.org [new file with mode: 0644]
devel/nmbug/nmbug
devel/schemata
doc/.gitignore
doc/Makefile.local
doc/conf.py
doc/man1/notmuch-address.rst
doc/man1/notmuch-config.rst
doc/man1/notmuch-count.rst
doc/man1/notmuch-dump.rst
doc/man1/notmuch-emacs-mua.rst
doc/man1/notmuch-restore.rst
doc/man1/notmuch.rst
doc/man7/notmuch-search-terms.rst
doc/mkdocdeps.py [deleted file]
doc/notmuch-emacs.rst
emacs/Makefile.local
emacs/notmuch-address.el
emacs/notmuch-company.el
emacs/notmuch-compat.el
emacs/notmuch-crypto.el
emacs/notmuch-draft.el [new file with mode: 0644]
emacs/notmuch-emacs-mua [new file with mode: 0755]
emacs/notmuch-emacs-mua.desktop [new file with mode: 0644]
emacs/notmuch-hello.el
emacs/notmuch-jump.el
emacs/notmuch-lib.el
emacs/notmuch-maildir-fcc.el
emacs/notmuch-mua.el
emacs/notmuch-show.el
emacs/notmuch-tag.el
emacs/notmuch-tree.el
emacs/notmuch.el
lib/Makefile.local
lib/database-private.h
lib/database.cc
lib/gen-version-script.sh [deleted file]
lib/index.cc
lib/libsha1.c [deleted file]
lib/libsha1.h [deleted file]
lib/message-property.cc
lib/message.cc
lib/notmuch-private.h
lib/notmuch.h
lib/notmuch.sym [new file with mode: 0644]
lib/query.cc
lib/regexp-fields.cc [new file with mode: 0644]
lib/regexp-fields.h [new file with mode: 0644]
lib/sha1.c
lib/thread.cc
mime-node.c
notmuch-client.h
notmuch-config.c
notmuch-count.c
notmuch-dump.c
notmuch-emacs-mua [deleted file]
notmuch-new.c
notmuch-reply.c
notmuch-search.c
notmuch-show.c
notmuch-tag.c
notmuch.c
notmuch.desktop [deleted file]
performance-test/M02-show.sh [new file with mode: 0755]
performance-test/M03-search.sh [new file with mode: 0755]
performance-test/M04-reply.sh [new file with mode: 0755]
performance-test/perf-test-lib.sh
tag-util.c
test/Makefile.local
test/README
test/T000-basic.sh
test/T010-help-test.sh
test/T020-compact.sh
test/T050-new.sh
test/T060-count.sh
test/T070-insert.sh
test/T080-search.sh
test/T090-search-output.sh
test/T095-address.sh
test/T150-tagging.sh
test/T160-json.sh
test/T170-sexp.sh
test/T190-multipart.sh
test/T200-thread-naming.sh
test/T220-reply.sh
test/T240-dump-restore.sh
test/T260-thread-order.sh
test/T310-emacs.sh
test/T320-emacs-large-search-buffer.sh
test/T340-maildir-sync.sh
test/T350-crypto.sh
test/T355-smime.sh
test/T360-symbol-hiding.sh
test/T370-search-folder-coherence.sh
test/T380-atomicity.sh
test/T390-python.sh
test/T395-ruby.sh
test/T400-hooks.sh
test/T410-argument-parsing.sh
test/T440-emacs-hello.sh
test/T450-emacs-show.sh
test/T455-emacs-charsets.sh
test/T460-emacs-tree.sh
test/T470-missing-headers.sh
test/T480-hex-escaping.sh
test/T500-search-date.sh
test/T510-thread-replies.sh
test/T530-upgrade.sh
test/T560-lib-error.sh
test/T570-revision-tracking.sh
test/T580-thread-search.sh
test/T590-thread-breakage.sh
test/T600-named-queries.sh
test/T610-message-property.sh
test/T630-emacs-draft.sh [new file with mode: 0755]
test/T640-database-modified.sh [new file with mode: 0755]
test/T650-regexp-query.sh [new file with mode: 0755]
test/T660-bad-date.sh [new file with mode: 0755]
test/T680-html-indexing.sh [new file with mode: 0755]
test/atomicity.py
test/corpora/README
test/corpora/html/attribute-text [new file with mode: 0644]
test/corpora/html/embedded-image [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000260:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000261:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000265:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000323:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000324:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000325:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000539:2, [new file with mode: 0644]
test/corpora/lkml/cur/1354585346.000541:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001724:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001730:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001731:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001732:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001733:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001734:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001735:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001736:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001738:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001739:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001740:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001887:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001892:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.001970:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002189:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002193:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002194:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002195:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002196:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002197:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002201:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002228:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002878:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002912:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002915:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002917:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.002997:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003106:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003112:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003117:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003118:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003171:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003317:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003318:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.003486:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.004581:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298587.004582:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001724:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001730:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001731:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001732:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001733:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001734:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001735:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001736:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001738:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001739:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001740:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001887:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.001892:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002189:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002191:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002193:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002194:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002195:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002196:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002197:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002201:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002878:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002879:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002911:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002912:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002915:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002917:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002930:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.002997:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003106:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003117:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003118:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003171:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003317:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003318:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003486:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.003499:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.004581:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298770.004582:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.002830:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.002978:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.002992:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.002999:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.003976:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.004354:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.004363:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298775.004374:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002253:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002254:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002255:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002256:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002257:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002258:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002259:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002260:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002261:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002262:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002263:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002264:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002265:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002266:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002267:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002268:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002269:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002270:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002271:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002272:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002273:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002274:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002275:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002276:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002277:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002278:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002279:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002280:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002281:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002282:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002283:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002284:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002285:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002286:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002287:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002288:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002289:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002290:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002292:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002293:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002294:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002296:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002297:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002298:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002299:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002302:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002309:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002329:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002340:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002400:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002432:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002468:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002543:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002557:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002575:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002576:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002639:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002642:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002661:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002662:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002663:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002664:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002665:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002666:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002667:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002668:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002669:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002670:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002671:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002679:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002688:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.002699:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003013:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003145:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003148:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003216:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003231:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003278:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003295:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003316:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003334:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003340:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003448:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003459:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003462:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003468:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003471:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003472:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003478:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003497:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003501:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003503:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.003971:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.004059:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.004091:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298793.004190:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298795.000299:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298795.001362:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298795.002635:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298796.001941:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004526:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004551:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004613:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004614:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004615:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004617:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004618:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004619:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004636:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004638:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004639:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004640:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004642:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004653:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004665:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004680:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004688:2, [new file with mode: 0644]
test/corpora/lkml/cur/1382298805.004906:2, [new file with mode: 0644]
test/test-databases/Makefile.local
test/test-lib-FREEBSD.sh [new file with mode: 0644]
test/test-lib-common.sh
test/test-lib.sh
test/test-verbose
util/Makefile.local
util/endian-util.h [deleted file]
util/gmime-extra.c [new file with mode: 0644]
util/gmime-extra.h [new file with mode: 0644]
version

index 296030c76977b8a6f99eca86eaeb2f26456efe72..7b283fb3bff2482738b29e5a502596ed2176ec4b 100644 (file)
@@ -7,7 +7,6 @@ tags
 *cscope*
 .deps
 /notmuch
-notmuch.sym
 notmuch-shared
 libnotmuch.so*
 libnotmuch*.dylib
index 4c0e8c62011393277cc1041a69859cde5296c2ea..d2010fe48669e549cc4c0865362c3f5103a349ca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,35 @@ include Makefile.config
 global_deps = Makefile Makefile.config Makefile.local \
        $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
 
+INCLUDE_MORE := yes
+ifneq ($(filter clean distclean dataclean, $(word 1, $(MAKECMDGOALS))),)
+CLEAN_GOAL := $(word 1, $(MAKECMDGOALS))
+
+# If there are more goals following CLEAN_GOAL, run $(MAKE)s in parts.
+ifneq ($(word 2, $(MAKECMDGOALS)),)
+INCLUDE_MORE := no
+FOLLOWING_GOALS := $(wordlist 2, 99, $(MAKECMDGOALS))
+
+.PHONY: $(FOLLOWING_GOALS) make_in_parts
+$(FOLLOWING_GOALS):
+       @true
+$(CLEAN_GOAL): make_in_parts
+make_in_parts:
+       $(MAKE) $(CLEAN_GOAL)
+       $(MAKE) $(FOLLOWING_GOALS) configure_options="$(configure_options)"
+endif
+
+else
+CLEAN_GOAL :=
+endif
+
+# Potentially speedup make clean, distclean and dataclean ; avoid
+# re-creating Makefile.config if it exists but configure is newer.
+ifneq ($(CLEAN_GOAL),)
+Makefile.config: | $(srcdir)/configure
+else
 Makefile.config: $(srcdir)/configure
+endif
 ifeq ($(configure_options),)
        @echo ""
        @echo "Note: Calling ./configure with no command-line arguments. This is often fine,"
@@ -33,7 +61,11 @@ ifeq ($(configure_options),)
 endif
        $(srcdir)/configure $(configure_options)
 
+ifeq ($(INCLUDE_MORE),yes)
+# runtime variable definitions available in all subdirs
+include $(srcdir)/Makefile.global
 # Finally, include all of the Makefile.local fragments where all the
 # real work is done.
 
 include $(subdirs:%=%/Makefile.local) Makefile.local
+endif
diff --git a/Makefile.global b/Makefile.global
new file mode 100644 (file)
index 0000000..cae4c7d
--- /dev/null
@@ -0,0 +1,65 @@
+# Here's the (hopefully simple) versioning scheme.
+#
+# Releases of notmuch have a two-digit version (0.1, 0.2, etc.). We
+# increment the second digit for each release and increment the first
+# digit when we reach particularly major milestones of usability.
+#
+# Between releases, (such as when compiling notmuch from the git
+# repository), we let git append identification of the actual commit.
+PACKAGE=notmuch
+
+IS_GIT:=$(if $(wildcard ${srcdir}/.git),yes,no)
+
+ifeq ($(IS_GIT),yes)
+DATE:=$(shell git --git-dir=${srcdir}/.git log --date=short -1 --pretty=format:%cd)
+else
+DATE:=$(shell date +%F)
+endif
+
+VERSION:=$(shell cat ${srcdir}/version)
+ELPA_VERSION:=$(subst ~,_,$(VERSION))
+ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
+ifeq ($(IS_GIT),yes)
+VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
+# drop the ~g$sha1 part
+ELPA_VERSION:=$(word 1,$(subst ~, ,$(VERSION)))
+# convert git version to package.el friendly form
+ELPA_VERSION:=$(subst +,snapshot,$(ELPA_VERSION))
+
+# Write the file 'version.stamp' in case its contents differ from $(VERSION)
+FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
+ifneq ($(FILE_VERSION),$(VERSION))
+       $(shell echo "$(VERSION)" > version.stamp)
+endif
+endif
+endif
+
+UPSTREAM_TAG=$(subst ~,_,$(VERSION))
+DEB_TAG=debian/$(UPSTREAM_TAG)-1
+
+RELEASE_HOST=notmuchmail.org
+RELEASE_DIR=/srv/notmuchmail.org/www/releases
+RELEASE_URL=https://notmuchmail.org/releases
+TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz
+ELPA_FILE:=$(PACKAGE)-emacs-$(ELPA_VERSION).tar
+DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz
+SHA256_FILE=$(TAR_FILE).sha256
+GPG_FILE=$(SHA256_FILE).asc
+
+PV_FILE=bindings/python/notmuch/version.py
+
+# Smash together user's values with our extra values
+STD_CFLAGS := -std=gnu99
+FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
+FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lnotmuch_util -Llib -lnotmuch
+ifeq ($(LIBDIR_IN_LDCONFIG),0)
+FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
+endif
+FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
+FINAL_NOTMUCH_LINKER = CC
+ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
+FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
+FINAL_NOTMUCH_LINKER = CXX
+endif
+FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
index 0a122ab0e208c29c501bc3aee9c37243e06b13c9..6bc78ef8e969b2d8649d68de6b590e8ded886cec 100644 (file)
@@ -1,67 +1,5 @@
 # -*- makefile -*-
 
-# Here's the (hopefully simple) versioning scheme.
-#
-# Releases of notmuch have a two-digit version (0.1, 0.2, etc.). We
-# increment the second digit for each release and increment the first
-# digit when we reach particularly major milestones of usability.
-#
-# Between releases, (such as when compiling notmuch from the git
-# repository), we let git append identification of the actual commit.
-PACKAGE=notmuch
-
-IS_GIT:=$(if $(wildcard ${srcdir}/.git),yes,no)
-
-ifeq ($(IS_GIT),yes)
-DATE:=$(shell git --git-dir=${srcdir}/.git log --date=short -1 --pretty=format:%cd)
-else
-DATE:=$(shell date +%F)
-endif
-
-VERSION:=$(shell cat ${srcdir}/version)
-ELPA_VERSION:=$(subst ~,_,$(VERSION))
-ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
-ifeq ($(IS_GIT),yes)
-VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
-# drop the ~g$sha1 part
-ELPA_VERSION:=$(word 1,$(subst ~, ,$(VERSION)))
-# Write the file 'version.stamp' in case its contents differ from $(VERSION)
-FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
-ifneq ($(FILE_VERSION),$(VERSION))
-       $(shell echo "$(VERSION)" > version.stamp)
-endif
-endif
-endif
-
-UPSTREAM_TAG=$(subst ~,_,$(VERSION))
-DEB_TAG=debian/$(UPSTREAM_TAG)-1
-
-RELEASE_HOST=notmuchmail.org
-RELEASE_DIR=/srv/notmuchmail.org/www/releases
-RELEASE_URL=https://notmuchmail.org/releases
-TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz
-DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz
-SHA1_FILE=$(TAR_FILE).sha1
-GPG_FILE=$(SHA1_FILE).asc
-
-PV_FILE=bindings/python/notmuch/version.py
-
-# Smash together user's values with our extra values
-STD_CFLAGS := -std=gnu99
-FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
-FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
-ifeq ($(LIBDIR_IN_LDCONFIG),0)
-FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
-endif
-FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
-FINAL_NOTMUCH_LINKER = CC
-ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
-FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
-FINAL_NOTMUCH_LINKER = CXX
-endif
-FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
-
 .PHONY: all
 all: notmuch notmuch-shared build-man ruby-bindings
 ifeq ($(MAKECMDGOALS),)
@@ -93,17 +31,18 @@ $(TAR_FILE):
        fi ; \
        git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ $$ref > $(TAR_FILE).tmp
        echo $(VERSION) > version.tmp
-       tar --append -f $(TAR_FILE).tmp --transform s_^_$(PACKAGE)-$(VERSION)/_  --transform 's_.tmp$$__' version.tmp
+       tar --owner root --group root --append -f $(TAR_FILE).tmp \
+               --transform s_^_$(PACKAGE)-$(VERSION)/_  \
+               --transform 's_.tmp$$__' version.tmp
        rm version.tmp
        gzip < $(TAR_FILE).tmp > $(TAR_FILE)
        @echo "Source is ready for release in $(TAR_FILE)"
 
-$(SHA1_FILE): $(TAR_FILE)
-       sha1sum $^ > $@
+$(SHA256_FILE): $(TAR_FILE)
+       sha256sum $^ > $@
 
-$(GPG_FILE): $(SHA1_FILE)
-       @echo "Please enter your GPG password to sign the checksum."
-       gpg --armor --sign $^ 
+$(GPG_FILE): $(SHA256_FILE)
+       gpg --armor --sign $^
 
 .PHONY: dist
 dist: $(TAR_FILE)
@@ -133,11 +72,11 @@ release: verify-source-tree-and-version
        pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
        git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
        mkdir -p releases
-       mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
+       mv $(TAR_FILE) $(SHA256_FILE) $(GPG_FILE) releases
        $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
 ifeq ($(REALLY_UPLOAD),yes)
        git push origin $(VERSION)
-       cd releases && scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
+       cd releases && scp $(TAR_FILE) $(SHA256_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
        ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-* ; ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(TAR_FILE)"
 endif
        @echo "Please send a release announcement using $(PACKAGE)-$(VERSION).announce as a template."
@@ -177,9 +116,9 @@ release-message:
        @echo ""
        @echo "Which can be verified with:"
        @echo ""
-       @echo "  $(RELEASE_URL)/$(SHA1_FILE)"
+       @echo "  $(RELEASE_URL)/$(SHA256_FILE)"
        @echo -n "  "
-       @cat releases/$(SHA1_FILE)
+       @cat releases/$(SHA256_FILE)
        @echo ""
        @echo "  $(RELEASE_URL)/$(GPG_FILE)"
        @echo "  (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
@@ -273,6 +212,7 @@ dataclean: distclean
        rm -rf $(DATACLEAN)
 
 notmuch_client_srcs =          \
+       $(notmuch_compat_srcs)  \
        command-line-arguments.c\
        debugger.c              \
        status.c                \
@@ -304,7 +244,7 @@ notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 
 notmuch.o: version.stamp
 
-notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a
+notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libnotmuch_util.a parse-time-string/libparse-time-string.a
        $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
 
 notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
@@ -336,11 +276,6 @@ ifeq ($(WITH_EMACS), 1)
 endif
 endif
 
-.PHONY: install-desktop
-install-desktop:
-       mkdir -p "$(DESTDIR)$(desktop_dir)"
-       desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop
-
 SRCS  := $(SRCS) $(notmuch_client_srcs)
 CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules)
 CLEAN := $(CLEAN) version.stamp notmuch-*.tar.gz.tmp
diff --git a/NEWS b/NEWS
index 7f25ca795eb252e95a73a6781b6ca1d5c1376beb..70bce78825df54cdc06f7ae15f5b11a4cf8e9d6d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,166 @@
+Notmuch 0.24.2 (2017-06-01)
+===========================
+
+Command Line Interface
+----------------------
+
+Fix output from `notmuch dump --include=properties` to not include tags.
+
+Emacs
+-----
+
+Fix filename stashing in tree view.
+
+Notmuch 0.24.1 (2017-04-01)
+===========================
+
+General
+-------
+
+Fix regressions in non-regexp search for `from:` and `subject:`.
+
+  The regexp search code in 0.24 introduced a regression in the
+  handling of empty queries and wildcards. These are both corrected in
+  this release.
+
+Command Line Interface
+----------------------
+
+Fix several memory leaks in `notmuch show`.
+
+Update NEWS for 0.24 to mention schema changes.
+
+Fix bug in dump header.
+
+  The previous version of the dump header failed to mention the
+  inclusion of tags. This fix bumps the version number of the dump
+  format to 3. There are no other changes to the format.
+
+Library Changes
+---------------
+
+Fix a read-after-free in the library.
+
+Notmuch 0.24 (2017-03-12)
+=========================
+
+General
+-------
+
+Regular expression searches supported for `from:` and `subject:`.
+
+  This requires recent Xapian (1.4+) See notmuch-search-terms(7) for
+  details.
+
+Command Line Interface
+----------------------
+
+Run external `notmuch-` prefixed commands as subcommands
+
+  You can now add your own `notmuch-` prefixed commands in PATH, and
+  have notmuch run them as if they were notmuch commands. See the
+  `notmuch(1)` man page for details
+
+New default output format to 3
+
+  See devel/schemata for details. Users of the structured output
+  format are reminded of the `--format-version` argument to `notmuch
+  show` and `notmuch search` which can prevent breakage when the
+  default format changes.
+
+Emacs
+-----
+
+Postpone and resume messages in `notmuch-message-mode` (composition)
+
+  Notmuch now has built in support for postponing, saving and resuming
+  messages. The default bindings are C-x C-s to save a draft, C-c C-p
+  to postpone a draft (save and exit compose buffer), and "e" in show
+  or tree view to resume.
+
+  Draft messages are tagged with `notmuch-draft-tags` (draft by
+  default) so you may wish to add that to the excluded tags list. When
+  saving a previously saved draft message the earlier draft gets
+  tagged deleted.
+
+  Note that attachments added before postponing will be included as
+  they were when you postponed in the final message.
+
+Address Completion
+
+  It is now possible to save the list of address completions for
+  notmuch's internal completion between runs of emacs. This makes the
+  first calls to address completion much better and faster. For
+  privacy reasons it is disabled by default, to enable set or
+  customize `notmuch-address-save-filename`.
+
+Tag jump menu
+
+  It is now possible to configure tagging shortcuts (with an interface
+  like notmuch jump). For example (by default) k u will remove the
+  unread tag, and k s will add a tag "spam" and remove the inbox
+  tag. Pressing k twice will do the reverse operation so, for example,
+  k k s removes the spam tag and adds the inbox tag. See the customize
+  variable `notmuch-tagging-keys` for more information.
+
+Refresh all buffers
+
+  It is now possible to refresh all notmuch buffers to reflect the
+  current state of the database with a single command, `M-=`.
+
+Stop display of application/* parts
+
+  By default gnus displays all application/* parts such as
+  application/zip in the message buffer. This has several undesirable
+  effects for notmuch (security, triggering errors etc). Notmuch now
+  overrides this and does not display them by default. If you have
+  customized `mm-inline-override-types` then we assume you know what
+  you want and do not interfere; if you do want to stop the display of
+  application/* add application/* to your customization. If you want
+  to allow application/* then set `mm-inline-override-types` to
+  "non/existent".
+
+Small change in the api for notmuch-search-tag
+
+  When `notmuch-search-tag` is called non-interactively and the region
+  is set, then it only tags the threads in the region. (Previously it
+  only tagged the current thread.)
+
+Bugfix for sending messages with very long headers.
+
+  Previously emacs didn't fold very long headers when sending which
+  could cause the MTA to refuse to send the message. This makes sure
+  it does fold any long headers so the message is RFC compliant.
+
+`notmuch emacs-mua` command installed with the Emacs interface
+
+  We've carried a `notmuch-emacs-mua` script in the source tree for
+  quite some time. It can be used to launch the Notmuch Emacs
+  interface from the command line in many different ways. Starting
+  with this release, it will be installed with the Emacs
+  interface. With the new external subcommand support, the script
+  transparently becomes a new notmuch command. See the
+  `notmuch-emacs-mua(1)` man page for details.
+
+Notmuch Emacs desktop integration
+
+  The desktop integration file will now be installed with the Notmuch
+  Emacs interface, adding a Notmuch menu item and configuration to
+  allow the user to set up Notmuch Emacs as the `mailto:` URL handler.
+
+Library changes
+---------------
+
+`notmuch_query_count_messages` is now non-destructive.
+
+  Internally the implementation of excludes has changed to make this
+  possible.
+
+Improved handling of DatabaseModifiedError
+
+  Previously uncaught exceptions reading message metadata are now
+  handled.
+
 Notmuch 0.23.7 (2017-02-28)
 ===========================
 
index 11d11d4bcbeb19d217f221f8d250be0d4e2cde32..17b561caac52dfc17a1f4fc9e56758b32dbb25fd 100644 (file)
@@ -8,6 +8,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
        cd $(dir)/ruby && \
                EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
                LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
+               NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
                ruby extconf.rb --vendor
        $(MAKE) -C $(dir)/ruby
 endif
index 67fb1c41142428ed6c06e36a985de8f1f784a1db..8f918069f34d24ad5059a3a89e0a5e55cd8a8b95 100644 (file)
@@ -86,6 +86,11 @@ class Database(object):
     _get_version.argtypes = [NotmuchDatabaseP]
     _get_version.restype = c_uint
 
+    """notmuch_database_get_revision"""
+    _get_revision = nmlib.notmuch_database_get_revision
+    _get_revision.argtypes = [NotmuchDatabaseP, POINTER(c_char_p)]
+    _get_revision.restype = c_uint
+
     """notmuch_database_open"""
     _open = nmlib.notmuch_database_open
     _open.argtypes = [c_char_p, c_uint, POINTER(NotmuchDatabaseP)]
@@ -261,6 +266,17 @@ class Database(object):
         self._assert_db_is_initialized()
         return Database._get_version(self._db)
 
+    def get_revision (self):
+        """Returns the committed database revison and UUID
+
+        :returns: (revison, uuid) The database revision as a positive integer
+        and the UUID of the database.
+        """
+        self._assert_db_is_initialized()
+        uuid = c_char_p ()
+        revision = Database._get_revision(self._db, byref (uuid))
+        return (revision, uuid.value.decode ('utf-8'))
+
     _needs_upgrade = nmlib.notmuch_database_needs_upgrade
     _needs_upgrade.argtypes = [NotmuchDatabaseP]
     _needs_upgrade.restype = bool
index a0f4f64ba4b37eb85edf337f4e0807fd6cdae77e..06c7b11bb8648de7488092c6c2d63efed3e13bf0 100644 (file)
@@ -134,10 +134,10 @@ class Query(object):
         self._assert_query_is_initialized()
         self._exclude_tag(self._query, _str(tagname))
 
-    """notmuch_query_search_threads_st"""
-    _search_threads_st = nmlib.notmuch_query_search_threads_st
-    _search_threads_st.argtypes = [NotmuchQueryP, POINTER(NotmuchThreadsP)]
-    _search_threads_st.restype = c_uint
+    """notmuch_query_search_threads"""
+    _search_threads = nmlib.notmuch_query_search_threads
+    _search_threads.argtypes = [NotmuchQueryP, POINTER(NotmuchThreadsP)]
+    _search_threads.restype = c_uint
 
     def search_threads(self):
         """Execute a query for threads
@@ -155,7 +155,7 @@ class Query(object):
         """
         self._assert_query_is_initialized()
         threads_p = NotmuchThreadsP() # == NULL
-        status = Query._search_threads_st(self._query, byref(threads_p))
+        status = Query._search_threads(self._query, byref(threads_p))
         if status != 0:
             raise NotmuchError(status)
 
@@ -164,9 +164,9 @@ class Query(object):
         return Threads(threads_p, self)
 
     """notmuch_query_search_messages_st"""
-    _search_messages_st = nmlib.notmuch_query_search_messages_st
-    _search_messages_st.argtypes = [NotmuchQueryP, POINTER(NotmuchMessagesP)]
-    _search_messages_st.restype = c_uint
+    _search_messages = nmlib.notmuch_query_search_messages
+    _search_messages.argtypes = [NotmuchQueryP, POINTER(NotmuchMessagesP)]
+    _search_messages.restype = c_uint
 
     def search_messages(self):
         """Filter messages according to the query and return
@@ -177,7 +177,7 @@ class Query(object):
         """
         self._assert_query_is_initialized()
         msgs_p = NotmuchMessagesP() # == NULL
-        status = Query._search_messages_st(self._query, byref(msgs_p))
+        status = Query._search_messages(self._query, byref(msgs_p))
         if status != 0:
             raise NotmuchError(status)
 
@@ -185,7 +185,7 @@ class Query(object):
             raise NullPointerError
         return Messages(msgs_p, self)
 
-    _count_messages = nmlib.notmuch_query_count_messages_st
+    _count_messages = nmlib.notmuch_query_count_messages
     _count_messages.argtypes = [NotmuchQueryP, POINTER(c_uint)]
     _count_messages.restype = c_uint
 
@@ -204,7 +204,7 @@ class Query(object):
             raise NotmuchError(status)
         return count.value
 
-    _count_threads = nmlib.notmuch_query_count_threads_st
+    _count_threads = nmlib.notmuch_query_count_threads
     _count_threads.argtypes = [NotmuchQueryP, POINTER(c_uint)]
     _count_threads.restype = c_uint
 
index e1a495227c98833c0af31bd3aceefc1414a9749d..6101902b8ecd20a8a79af1cb77cc4d189fe83d35 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.23.7'
-SOVERSION = '4'
+__VERSION__ = '0.24.2'
+SOVERSION = '5'
index ddaa6841e5ff2d507c65501f6d81dd00f9e942fe..161de5a2c7c52bb6d5130ee6db3616c36acdba1d 100644 (file)
@@ -5,7 +5,7 @@
 
 require 'mkmf'
 
-dir = File.join('..', '..', 'lib')
+dir = File.join(ENV['NOTMUCH_SRCDIR'], 'lib')
 
 # includes
 $INCFLAGS = "-I#{dir} #{$INCFLAGS}"
index ce66926cfe7428b0c825fcb388d69d898f332aa4..8b46d700bdab01554c8944ec7903ea9ce8a3707e 100644 (file)
@@ -138,7 +138,7 @@ notmuch_rb_query_search_threads (VALUE self)
 
     Data_Get_Notmuch_Query (self, query);
 
-    status = notmuch_query_search_threads_st (query, &threads);
+    status = notmuch_query_search_threads (query, &threads);
     if (status)
        notmuch_rb_status_raise (status);
 
@@ -159,7 +159,7 @@ notmuch_rb_query_search_messages (VALUE self)
 
     Data_Get_Notmuch_Query (self, query);
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (status)
        notmuch_rb_status_raise (status);
 
@@ -180,7 +180,7 @@ notmuch_rb_query_count_messages (VALUE self)
 
     Data_Get_Notmuch_Query (self, query);
 
-    status = notmuch_query_count_messages_st (query, &count);
+    status = notmuch_query_count_messages (query, &count);
     if (status)
        notmuch_rb_status_raise (status);
 
@@ -201,7 +201,7 @@ notmuch_rb_query_count_threads (VALUE self)
 
     Data_Get_Notmuch_Query (self, query);
 
-    status = notmuch_query_count_threads_st (query, &count);
+    status = notmuch_query_count_threads (query, &count);
     if (status)
        notmuch_rb_status_raise (status);
 
index b62b7937feab0362464bfb7856a15f4236978843..483fc3b6685dd3df772382a888edfd7dde3401d5 100644 (file)
@@ -1,5 +1,4 @@
 #include <time.h>
-#include "compat.h"
 
 int main()
 {
index 78047b5f424de5bf9b6d55548d6c960e1bbceb8f..e4e4b36bccf723ead969dd8c48bb01cccfc96682 100644 (file)
@@ -58,6 +58,34 @@ _notmuch_email()
        sed 's/[^<]*<\([^>]*\)>/\1/' | tr "[:upper:]" "[:lower:]" | sort -u
 }
 
+_notmuch_mimetype()
+{
+    # use mime types from mime-support package if available, and fall
+    # back to a handful of common ones otherwise
+    if [ -r "/etc/mime.types" ]; then
+       sed -n '/^[[:alpha:]]/{s/[[:space:]].*//;p;}' /etc/mime.types
+    else
+       cat <<EOF
+application/gzip
+application/msword
+application/pdf
+application/zip
+audio/mpeg
+audio/ogg
+image/gif
+image/jpeg
+image/png
+message/rfc822
+text/calendar
+text/html
+text/plain
+text/vcard
+text/x-diff
+text/x-vcalendar
+EOF
+    fi
+}
+
 _notmuch_search_terms()
 {
     local cur prev words cword split
@@ -85,8 +113,16 @@ _notmuch_search_terms()
            COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
                sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
            ;;
+       mimetype:*)
+           compopt -o nospace
+           COMPREPLY=( $(compgen -P "mimetype:" -W "`_notmuch_mimetype ${cur}`" -- ${cur##mimetype:}) )
+           ;;
+       query:*)
+           compopt -o nospace
+           COMPREPLY=( $(compgen -P "query:" -W "`notmuch config list | sed -n '/^query\./s/^query\.\([^=]*\)=.*/\1/p'`" -- ${cur##query:}) )
+           ;;
        *)
-           local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod:"
+           local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod: query: property:"
            compopt -o nospace
            COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
            ;;
@@ -204,6 +240,38 @@ _notmuch_dump()
     esac
 }
 
+_notmuch_emacs_mua()
+{
+    local cur prev words cword split
+    _init_completion -s || return
+
+    $split &&
+    case "${prev}" in
+       --to|--cc|--bcc)
+           COMPREPLY=( $(compgen -W "`_notmuch_email to:${cur}`" -- ${cur}) )
+           return
+           ;;
+       --body)
+           _filedir
+           return
+           ;;
+    esac
+
+    ! $split &&
+    case "${cur}" in
+        -*)
+           local options="--subject= --to= --cc= --bcc= --body= --no-window-system --client --auto-daemon --create-frame --print --help --hello"
+
+           compopt -o nospace
+           COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
+           ;;
+       *)
+           COMPREPLY=( $(compgen -W "`_notmuch_email to:${cur}`" -- ${cur}) )
+           return
+           ;;
+    esac
+}
+
 _notmuch_insert()
 {
     local cur prev words cword split
@@ -464,7 +532,7 @@ _notmuch_tag()
 
 _notmuch()
 {
-    local _notmuch_commands="compact config count dump help insert new reply restore search address setup show tag"
+    local _notmuch_commands="compact config count dump help insert new reply restore search address setup show tag emacs-mua"
     local arg cur prev words cword split
 
     # require bash-completion with _init_completion
index f17730441298648bcc31a66992ccd38ef259d6bb..c5e2ffed9e6705a9b16f5cf52f3c57235bc40044 100755 (executable)
--- a/configure
+++ b/configure
@@ -19,7 +19,12 @@ To work around this problem you may try to execute:
 # Store original IFS value so it can be changed (and restored) in many places.
 readonly DEFAULT_IFS="$IFS"
 
+# The top-level directory for the source. This ./configure and all Makefiles
+# are good with ${srcdir} usually being relative. Some components (e.g. tests)
+# are executed in subdirectories and for those it is simpler to use
+# ${NOTMUCH_SRCDIR} which holds absolute path to the source.
 srcdir=$(dirname "$0")
+NOTMUCH_SRCDIR=$(cd "$srcdir" && pwd)
 
 subdirs="util compat lib parse-time-string completion doc emacs"
 subdirs="${subdirs} performance-test test test/test-databases"
@@ -42,6 +47,12 @@ if [ "$srcdir" != "." ]; then
     # Emacs only likes to generate compiled files next to the .el files
     # by default so copy these as well (which is not ideal).
     cp -a "$srcdir"/emacs/*.el emacs
+
+    # We were not able to create fully working Makefile using ruby mkmf.rb
+    # so ruby bindings source files are copied as well (ditto -- not ideal).
+    mkdir bindings/ruby
+    cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby
+    cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby
 fi
 
 # Set several defaults (optionally specified by the user in
@@ -70,6 +81,7 @@ LIBDIR=
 WITH_DOCS=1
 WITH_API_DOCS=1
 WITH_EMACS=1
+WITH_DESKTOP=1
 WITH_BASH=1
 WITH_RUBY=1
 WITH_ZSH=1
@@ -131,7 +143,7 @@ Fine tuning of some installation directories is available:
        --sysconfdir=DIR        Read-only single-machine data [PREFIX/etc]
        --emacslispdir=DIR      Emacs code [PREFIX/share/emacs/site-lisp]
        --emacsetcdir=DIR       Emacs miscellaneous files [PREFIX/share/emacs/site-lisp]
-       --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d]
+       --bashcompletiondir=DIR Bash completions files [PREFIX/share/bash-completion/completions]
        --zshcompletiondir=DIR  Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix]
 
 Some features can be disabled (--with-feature=no is equivalent to
@@ -141,6 +153,7 @@ Some features can be disabled (--with-feature=no is equivalent to
        --without-docs                  Do not install documentation
        --without-api-docs              Do not install API man page
        --without-emacs                 Do not install lisp file
+       --without-desktop               Do not install desktop file
        --without-ruby                  Do not install ruby bindings
        --without-zsh-completion        Do not install zsh completions files
        --without-retry-lock            Do not use blocking xapian opens, even if available
@@ -209,6 +222,14 @@ for option; do
        fi
     elif [ "${option}" = '--without-emacs' ] ; then
        WITH_EMACS=0
+    elif [ "${option%%=*}" = '--with-desktop' ]; then
+       if [ "${option#*=}" = 'no' ]; then
+           WITH_DESKTOP=0
+       else
+           WITH_DESKTOP=1
+       fi
+    elif [ "${option}" = '--without-desktop' ] ; then
+       WITH_DESKTOP=0
     elif [ "${option%%=*}" = '--with-bash-completion' ]; then
        if [ "${option#*=}" = 'no' ]; then
            WITH_BASH=0
@@ -301,22 +322,29 @@ errors=0
 printf "int main(void){return 0;}\n" > minimal.c
 
 printf "Sanity checking C compilation environment... "
-if ${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
+test_cmdline="${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal"
+if  ${test_cmdline} > /dev/null 2>&1
 then
     printf "OK.\n"
 else
     printf "Fail.\n"
     errors=$((errors + 1))
+    printf Executed:; printf ' %s' ${test_cmdline}; echo
+    ${test_cmdline}
 fi
 
 printf "Sanity checking C++ compilation environment... "
-if ${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
+test_cmdline="${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal"
+if ${test_cmdline} > /dev/null 2>&1
 then
     printf "OK.\n"
 else
     printf "Fail.\n"
     errors=$((errors + 1))
+    printf Executed:; printf ' %s' ${test_cmdline}; echo
+    ${test_cmdline}
 fi
+unset test_cmdline
 
 if [ $errors -gt 0 ]; then
     cat <<EOF
@@ -342,8 +370,8 @@ int main(void) {
     return 0;
 }
 EOF
-if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \
-       ./_libversion > _libversion.sh && . ./_libversion.sh
+if ${CC} ${CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
+       && ./_libversion > _libversion.sh && . ./_libversion.sh
 then
     printf "OK.\n"
 else
@@ -456,11 +484,18 @@ fi
 GMIME_MINVER=2.6.7
 
 printf "Checking for GMime development files... "
-if pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
-    printf "Yes.\n"
+if pkg-config --exists "gmime-3.0"; then
+    printf "Yes (3.0).\n"
+    have_gmime=1
+    gmime_cflags=$(pkg-config --cflags gmime-3.0)
+    gmime_ldflags=$(pkg-config --libs gmime-3.0)
+    gmime_major=3
+elif pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
+    printf "Yes (2.6).\n"
     have_gmime=1
     gmime_cflags=$(pkg-config --cflags gmime-2.6)
     gmime_ldflags=$(pkg-config --libs gmime-2.6)
+    gmime_major=2
 else
     have_gmime=0
     printf "No.\n"
@@ -483,8 +518,7 @@ else
 fi
 
 if ! pkg-config --exists zlib; then
-  ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \
-         "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 &&
+  ${CC} -o compat/gen_zlib_pc "$srcdir"/compat/gen_zlib_pc.c >/dev/null 2>&1 &&
   compat/gen_zlib_pc > compat/zlib.pc &&
   PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat &&
   export PKG_CONFIG_PATH
@@ -602,6 +636,16 @@ if [ $WITH_DOCS = "1" ] ; then
     fi
 fi
 
+if [ $WITH_DESKTOP = "1" ]; then
+    printf "Checking if desktop-file-install is available... "
+    if command -v desktop-file-install > /dev/null; then
+       printf "Yes.\n"
+    else
+       printf "No (so will not install .desktop file).\n"
+       WITH_DESKTOP=0
+    fi
+fi
+
 libdir_in_ldconfig=0
 
 printf "Checking which platform we are on... "
@@ -660,19 +704,6 @@ else
 EOF
 fi
 
-printf "Checking byte order... "
-cat> _byteorder.c <<EOF
-#include <stdio.h>
-#include <stdint.h>
-uint32_t test = 0x34333231;
-int main() { printf("%.4s\n", (const char*)&test); return 0; }
-EOF
-${CC} ${CFLAGS} _byteorder.c -o _byteorder > /dev/null 2>&1
-util_byte_order=$(./_byteorder)
-echo $util_byte_order
-
-rm -f _byteorder _byteorder.c
-
 if [ $errors -gt 0 ]; then
     cat <<EOF
 
@@ -907,6 +938,7 @@ cat > Makefile.config <<EOF
 # the configure script). This may be different than the build
 # directory (the current directory at the time configure was run).
 srcdir = ${srcdir}
+NOTMUCH_SRCDIR = ${NOTMUCH_SRCDIR}
 
 # subdirectories to build
 subdirs = ${subdirs}
@@ -992,9 +1024,6 @@ prefix = ${PREFIX}
 # LIBDIR_IN_LDCONFIG value below is still set correctly.
 libdir = ${LIBDIR:=\$(prefix)/lib}
 
-# byte order within a 32 bit word. 1234 = little, 4321 = big, 0 = guess
-UTIL_BYTE_ORDER = ${util_byte_order}
-
 # Whether libdir is in a path configured into ldconfig
 LIBDIR_IN_LDCONFIG = ${libdir_in_ldconfig}
 
@@ -1027,7 +1056,7 @@ HAVE_DOXYGEN=${have_doxygen}
 desktop_dir = \$(prefix)/share/applications
 
 # The directory to which bash completions files should be installed
-bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(sysconfdir)/bash_completion.d}
+bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(prefix)/share/bash-completion/completions}
 
 # The directory to which zsh completions files should be installed
 zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completion/Unix}
@@ -1123,6 +1152,9 @@ VALGRIND_CFLAGS = ${valgrind_cflags}
 # Support for emacs
 WITH_EMACS = ${WITH_EMACS}
 
+# Support for desktop file
+WITH_DESKTOP = ${WITH_DESKTOP}
+
 # Support for bash completion
 WITH_BASH = ${WITH_BASH}
 
@@ -1142,9 +1174,9 @@ COMMON_CONFIGURE_CFLAGS = \\
        -DSTD_GETPWUID=\$(STD_GETPWUID)                         \\
        -DSTD_ASCTIME=\$(STD_ASCTIME)                           \\
        -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)           \\
+       -DSILENCE_XAPIAN_DEPRECATION_WARNINGS                   \\
        -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\
-       -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) \\
-       -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)
+       -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK)
 
 CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS)
 
@@ -1158,6 +1190,8 @@ cat > sh.config <<EOF
 # This sh.config was automatically generated by the ./configure
 # script of notmuch.
 
+NOTMUCH_SRCDIR='${NOTMUCH_SRCDIR}'
+
 # Whether the Xapian version in use supports compaction
 NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}
 
@@ -1179,6 +1213,12 @@ NOTMUCH_PYTHON=${python}
 # Are the ruby development files (and ruby) available? If not skip
 # building/testing ruby bindings.
 NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
+
+# Major version of gmime
+NOTMUCH_GMIME_MAJOR=${gmime_major}
+
+# Platform we are run on
+PLATFORM=${platform}
 EOF
 
 # Finally, after everything configured, inform the user how to continue.
index 41b454359bf4dc6e6b57f6b5d8c914398bd82c52..f5df0d75c7fb6c8a67b93cc46d1b3e0801515097 100644 (file)
@@ -1,3 +1,48 @@
+notmuch (0.24.2-1) experimental; urgency=medium
+
+  * Fix dump output to not include tags when not asked for
+  * Fix file name stashing in emacs tree view.
+
+ -- David Bremner <bremner@debian.org>  Thu, 01 Jun 2017 07:24:55 -0300
+
+notmuch (0.24.1-1) experimental; urgency=medium
+
+  * Restore Xapian wildcard queries to from: and subject:
+  * Handle empty queries for from: and subject:
+  * Memory leaks in notmuch show fixed
+  * Fix bug notmuch dump header generation
+
+ -- David Bremner <bremner@debian.org>  Sat, 01 Apr 2017 09:17:47 -0300
+
+notmuch (0.24-1) experimental; urgency=medium
+
+  * New upstream release
+    - regexp search for from: and subject:
+    - Emacs interface improvements:
+      - draft handling
+      - don't automatically expand application/*
+      - jump (shortcut) menu for tagging.
+      - fold long headers when sending
+    - library improvements
+      - catch some stray DatabaseModifiedErrors
+      - make exclude handling non-destructive.
+
+ -- David Bremner <bremner@debian.org>  Sun, 12 Mar 2017 22:14:25 -0300
+
+notmuch (0.24~rc1-1) experimental; urgency=medium
+
+  * New upstream release candidate
+  * upstream release notes
+  * One library internals fix/optimization for regexp processing.
+
+ -- David Bremner <bremner@debian.org>  Wed, 08 Mar 2017 08:08:34 -0400
+
+notmuch (0.24~rc0-1) experimental; urgency=medium
+
+  * New upstream feature release (candidate).
+
+ -- David Bremner <bremner@debian.org>  Sun, 05 Mar 2017 19:32:08 -0400
+
 notmuch (0.23.7-3) unstable; urgency=medium
 
   * Cherry pick fixes to dump header from 0.24.1
index e71a67161dd6c840631c4362f5713852e45a5cb1..3811d825f69e197d3df09d486b53e9e735b7c0b4 100644 (file)
@@ -34,7 +34,7 @@ Vcs-Browser: https://git.notmuchmail.org/git/notmuch
 
 Package: notmuch
 Architecture: any
-Depends: libnotmuch4 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libnotmuch5 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Recommends: notmuch-emacs | notmuch-vim | notmuch-mutt | alot,  gnupg-agent, gpgsm
 Description: thread-based email index, search and tagging
  Notmuch is a system for indexing, searching, reading, and tagging
@@ -44,7 +44,7 @@ Description: thread-based email index, search and tagging
  .
  This package contains the notmuch command-line interface
 
-Package: libnotmuch4
+Package: libnotmuch5
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -61,7 +61,7 @@ Description: thread-based email index, search and tagging (runtime)
 Package: libnotmuch-dev
 Section: libdevel
 Architecture: any
-Depends: ${misc:Depends}, libnotmuch4 (= ${binary:Version})
+Depends: ${misc:Depends}, libnotmuch5 (= ${binary:Version})
 Description: thread-based email index, search and tagging (development)
  Notmuch is a system for indexing, searching, reading, and tagging
  large collections of email messages in maildir or mh format. It uses
@@ -74,7 +74,7 @@ Description: thread-based email index, search and tagging (development)
 Package: python-notmuch
 Architecture: all
 Section: python
-Depends: ${misc:Depends}, ${python:Depends}, libnotmuch4 (>= ${source:Version})
+Depends: ${misc:Depends}, ${python:Depends}, libnotmuch5 (>= ${source:Version})
 Description: python interface to the notmuch mail search and index library
  Notmuch is a system for indexing, searching, reading, and tagging
  large collections of email messages in maildir or mh format. It uses
@@ -87,7 +87,7 @@ Description: python interface to the notmuch mail search and index library
 Package: python3-notmuch
 Architecture: all
 Section: python
-Depends: ${misc:Depends}, ${python3:Depends}, libnotmuch4 (>= ${source:Version})
+Depends: ${misc:Depends}, ${python3:Depends}, libnotmuch5 (>= ${source:Version})
 Description: Python 3 interface to the notmuch mail search and index library
  Notmuch is a system for indexing, searching, reading, and tagging
  large collections of email messages in maildir or mh format. It uses
@@ -167,7 +167,7 @@ Package: notmuch-dbg
 Architecture: any
 Section: debug
 Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, libnotmuch4 (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, libnotmuch5 (= ${binary:Version})
 Description: thread-based email index, search and tagging - debugging symbols
  Notmuch is a system for indexing, searching, reading, and tagging
  large collections of email messages in maildir or mh format. It uses
diff --git a/debian/libnotmuch4.install b/debian/libnotmuch4.install
deleted file mode 100644 (file)
index a513b47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libnotmuch.so.*
diff --git a/debian/libnotmuch4.symbols b/debian/libnotmuch4.symbols
deleted file mode 100644 (file)
index c8a94ba..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-libnotmuch.so.4 libnotmuch4 #MINVER#
- notmuch_built_with@Base 0.23~rc0
- notmuch_config_list_destroy@Base 0.23~rc0
- notmuch_config_list_key@Base 0.23~rc0
- notmuch_config_list_move_to_next@Base 0.23~rc0
- notmuch_config_list_valid@Base 0.23~rc0
- notmuch_config_list_value@Base 0.23~rc0
- notmuch_database_add_message@Base 0.3
- notmuch_database_begin_atomic@Base 0.9~rc1
- notmuch_database_close@Base 0.13~rc1
- notmuch_database_compact@Base 0.17~rc1
- notmuch_database_create@Base 0.3
- notmuch_database_create_verbose@Base 0.20~rc1
- notmuch_database_destroy@Base 0.13~rc1
- notmuch_database_end_atomic@Base 0.9~rc1
- notmuch_database_find_message@Base 0.9~rc2
- notmuch_database_find_message_by_filename@Base 0.9~rc2
- notmuch_database_get_all_tags@Base 0.3
- notmuch_database_get_config@Base 0.23~rc0
- notmuch_database_get_config_list@Base 0.23~rc0
- notmuch_database_get_directory@Base 0.3
- notmuch_database_get_path@Base 0.3
- notmuch_database_get_revision@Base 0.21~rc1
- notmuch_database_get_version@Base 0.3
- notmuch_database_needs_upgrade@Base 0.3
- notmuch_database_open@Base 0.3
- notmuch_database_open_verbose@Base 0.20~rc1
- notmuch_database_remove_message@Base 0.3
- notmuch_database_set_config@Base 0.23~rc0
- notmuch_database_status_string@Base 0.20~rc1
- notmuch_database_upgrade@Base 0.3
- notmuch_directory_delete@Base 0.21~rc1
- notmuch_directory_destroy@Base 0.3
- notmuch_directory_get_child_directories@Base 0.3
- notmuch_directory_get_child_files@Base 0.3
- notmuch_directory_get_mtime@Base 0.3
- notmuch_directory_set_mtime@Base 0.3
- notmuch_filenames_destroy@Base 0.3
- notmuch_filenames_get@Base 0.3
- notmuch_filenames_move_to_next@Base 0.3
- notmuch_filenames_valid@Base 0.3
- notmuch_message_add_property@Base 0.23~rc0
- notmuch_message_add_tag@Base 0.3
- notmuch_message_destroy@Base 0.3
- notmuch_message_freeze@Base 0.3
- notmuch_message_get_date@Base 0.3
- notmuch_message_get_filename@Base 0.3
- notmuch_message_get_filenames@Base 0.5
- notmuch_message_get_flag@Base 0.3
- notmuch_message_get_header@Base 0.3
- notmuch_message_get_message_id@Base 0.3
- notmuch_message_get_properties@Base 0.23~rc0
- notmuch_message_get_property@Base 0.23~rc0
- notmuch_message_get_replies@Base 0.3
- notmuch_message_get_tags@Base 0.3
- notmuch_message_get_thread_id@Base 0.3
- notmuch_message_maildir_flags_to_tags@Base 0.5
- notmuch_message_properties_destroy@Base 0.23~rc0
- notmuch_message_properties_key@Base 0.23~rc0
- notmuch_message_properties_move_to_next@Base 0.23~rc0
- notmuch_message_properties_valid@Base 0.23~rc0
- notmuch_message_properties_value@Base 0.23~rc0
- notmuch_message_remove_all_properties@Base 0.23~rc0
- notmuch_message_remove_all_tags@Base 0.3
- notmuch_message_remove_property@Base 0.23~rc0
- notmuch_message_remove_tag@Base 0.3
- notmuch_message_set_flag@Base 0.3
- notmuch_message_tags_to_maildir_flags@Base 0.5
- notmuch_message_thaw@Base 0.3
- notmuch_messages_collect_tags@Base 0.3
- notmuch_messages_destroy@Base 0.3
- notmuch_messages_get@Base 0.3
- notmuch_messages_move_to_next@Base 0.3
- notmuch_messages_valid@Base 0.3
- notmuch_query_add_tag_exclude@Base 0.12~rc1
- notmuch_query_count_messages@Base 0.3
- notmuch_query_count_messages_st@Base 0.21~rc1
- notmuch_query_count_threads@Base 0.10~rc1
- notmuch_query_count_threads_st@Base 0.21~rc1
- notmuch_query_create@Base 0.3
- notmuch_query_destroy@Base 0.3
- notmuch_query_get_database@Base 0.21~rc1
- notmuch_query_get_query_string@Base 0.4
- notmuch_query_get_sort@Base 0.4
- notmuch_query_search_messages@Base 0.3
- notmuch_query_search_messages_st@Base 0.20~rc1
- notmuch_query_search_threads@Base 0.3
- notmuch_query_search_threads_st@Base 0.20~rc1
- notmuch_query_set_omit_excluded@Base 0.13~rc1
- notmuch_query_set_sort@Base 0.3
- notmuch_status_to_string@Base 0.3
- notmuch_tags_destroy@Base 0.3
- notmuch_tags_get@Base 0.3
- notmuch_tags_move_to_next@Base 0.3
- notmuch_tags_valid@Base 0.3
- notmuch_thread_destroy@Base 0.3
- notmuch_thread_get_authors@Base 0.3
- notmuch_thread_get_matched_messages@Base 0.3
- notmuch_thread_get_messages@Base 0.16
- notmuch_thread_get_newest_date@Base 0.3
- notmuch_thread_get_oldest_date@Base 0.3
- notmuch_thread_get_subject@Base 0.3
- notmuch_thread_get_tags@Base 0.3
- notmuch_thread_get_thread_id@Base 0.3
- notmuch_thread_get_toplevel_messages@Base 0.3
- notmuch_thread_get_total_messages@Base 0.3
- notmuch_threads_destroy@Base 0.3
- notmuch_threads_get@Base 0.3
- notmuch_threads_move_to_next@Base 0.3
- notmuch_threads_valid@Base 0.3
- (c++)"typeinfo for Xapian::LogicError@Base" 0.6.1
- (c++)"typeinfo for Xapian::RuntimeError@Base" 0.6.1
- (c++)"typeinfo for Xapian::DocNotFoundError@Base" 0.6.1
- (c++)"typeinfo for Xapian::InvalidArgumentError@Base" 0.6.1
- (c++)"typeinfo for Xapian::Error@Base" 0.6.1
- (c++|optional=present with Xapian 1.4)"typeinfo for Xapian::QueryParserError@Base" 0.23~rc0
- (c++)"typeinfo name for Xapian::LogicError@Base" 0.6.1
- (c++)"typeinfo name for Xapian::RuntimeError@Base" 0.6.1
- (c++)"typeinfo name for Xapian::DocNotFoundError@Base" 0.6.1
- (c++)"typeinfo name for Xapian::InvalidArgumentError@Base" 0.6.1
- (c++)"typeinfo name for Xapian::Error@Base" 0.6.1
- (c++|optional=present with Xapian 1.4)"typeinfo name for Xapian::QueryParserError@Base" 0.23~rc0
diff --git a/debian/libnotmuch5.install b/debian/libnotmuch5.install
new file mode 100644 (file)
index 0000000..a513b47
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*/libnotmuch.so.*
diff --git a/debian/libnotmuch5.symbols b/debian/libnotmuch5.symbols
new file mode 100644 (file)
index 0000000..9f3323f
--- /dev/null
@@ -0,0 +1,126 @@
+libnotmuch.so.5 libnotmuch5 #MINVER#
+ notmuch_built_with@Base 0.23~rc0
+ notmuch_config_list_destroy@Base 0.23~rc0
+ notmuch_config_list_key@Base 0.23~rc0
+ notmuch_config_list_move_to_next@Base 0.23~rc0
+ notmuch_config_list_valid@Base 0.23~rc0
+ notmuch_config_list_value@Base 0.23~rc0
+ notmuch_database_add_message@Base 0.3
+ notmuch_database_begin_atomic@Base 0.9~rc1
+ notmuch_database_close@Base 0.13~rc1
+ notmuch_database_compact@Base 0.17~rc1
+ notmuch_database_create@Base 0.3
+ notmuch_database_create_verbose@Base 0.20~rc1
+ notmuch_database_destroy@Base 0.13~rc1
+ notmuch_database_end_atomic@Base 0.9~rc1
+ notmuch_database_find_message@Base 0.9~rc2
+ notmuch_database_find_message_by_filename@Base 0.9~rc2
+ notmuch_database_get_all_tags@Base 0.3
+ notmuch_database_get_config@Base 0.23~rc0
+ notmuch_database_get_config_list@Base 0.23~rc0
+ notmuch_database_get_directory@Base 0.3
+ notmuch_database_get_path@Base 0.3
+ notmuch_database_get_revision@Base 0.21~rc1
+ notmuch_database_get_version@Base 0.3
+ notmuch_database_needs_upgrade@Base 0.3
+ notmuch_database_open@Base 0.3
+ notmuch_database_open_verbose@Base 0.20~rc1
+ notmuch_database_remove_message@Base 0.3
+ notmuch_database_set_config@Base 0.23~rc0
+ notmuch_database_status_string@Base 0.20~rc1
+ notmuch_database_upgrade@Base 0.3
+ notmuch_directory_delete@Base 0.21~rc1
+ notmuch_directory_destroy@Base 0.3
+ notmuch_directory_get_child_directories@Base 0.3
+ notmuch_directory_get_child_files@Base 0.3
+ notmuch_directory_get_mtime@Base 0.3
+ notmuch_directory_set_mtime@Base 0.3
+ notmuch_filenames_destroy@Base 0.3
+ notmuch_filenames_get@Base 0.3
+ notmuch_filenames_move_to_next@Base 0.3
+ notmuch_filenames_valid@Base 0.3
+ notmuch_message_add_property@Base 0.23~rc0
+ notmuch_message_add_tag@Base 0.3
+ notmuch_message_destroy@Base 0.3
+ notmuch_message_freeze@Base 0.3
+ notmuch_message_get_date@Base 0.3
+ notmuch_message_get_filename@Base 0.3
+ notmuch_message_get_filenames@Base 0.5
+ notmuch_message_get_flag@Base 0.3
+ notmuch_message_get_header@Base 0.3
+ notmuch_message_get_message_id@Base 0.3
+ notmuch_message_get_properties@Base 0.23~rc0
+ notmuch_message_get_property@Base 0.23~rc0
+ notmuch_message_get_replies@Base 0.3
+ notmuch_message_get_tags@Base 0.3
+ notmuch_message_get_thread_id@Base 0.3
+ notmuch_message_maildir_flags_to_tags@Base 0.5
+ notmuch_message_properties_destroy@Base 0.23~rc0
+ notmuch_message_properties_key@Base 0.23~rc0
+ notmuch_message_properties_move_to_next@Base 0.23~rc0
+ notmuch_message_properties_valid@Base 0.23~rc0
+ notmuch_message_properties_value@Base 0.23~rc0
+ notmuch_message_remove_all_properties@Base 0.23~rc0
+ notmuch_message_remove_all_tags@Base 0.3
+ notmuch_message_remove_property@Base 0.23~rc0
+ notmuch_message_remove_tag@Base 0.3
+ notmuch_message_set_flag@Base 0.3
+ notmuch_message_tags_to_maildir_flags@Base 0.5
+ notmuch_message_thaw@Base 0.3
+ notmuch_messages_collect_tags@Base 0.3
+ notmuch_messages_destroy@Base 0.3
+ notmuch_messages_get@Base 0.3
+ notmuch_messages_move_to_next@Base 0.3
+ notmuch_messages_valid@Base 0.3
+ notmuch_query_add_tag_exclude@Base 0.12~rc1
+ notmuch_query_count_messages@Base 0.3
+ notmuch_query_count_messages_st@Base 0.21~rc1
+ notmuch_query_count_threads@Base 0.10~rc1
+ notmuch_query_count_threads_st@Base 0.21~rc1
+ notmuch_query_create@Base 0.3
+ notmuch_query_destroy@Base 0.3
+ notmuch_query_get_database@Base 0.21~rc1
+ notmuch_query_get_query_string@Base 0.4
+ notmuch_query_get_sort@Base 0.4
+ notmuch_query_search_messages@Base 0.3
+ notmuch_query_search_messages_st@Base 0.20~rc1
+ notmuch_query_search_threads@Base 0.3
+ notmuch_query_search_threads_st@Base 0.20~rc1
+ notmuch_query_set_omit_excluded@Base 0.13~rc1
+ notmuch_query_set_sort@Base 0.3
+ notmuch_status_to_string@Base 0.3
+ notmuch_tags_destroy@Base 0.3
+ notmuch_tags_get@Base 0.3
+ notmuch_tags_move_to_next@Base 0.3
+ notmuch_tags_valid@Base 0.3
+ notmuch_thread_destroy@Base 0.3
+ notmuch_thread_get_authors@Base 0.3
+ notmuch_thread_get_matched_messages@Base 0.3
+ notmuch_thread_get_messages@Base 0.16
+ notmuch_thread_get_newest_date@Base 0.3
+ notmuch_thread_get_oldest_date@Base 0.3
+ notmuch_thread_get_subject@Base 0.3
+ notmuch_thread_get_tags@Base 0.3
+ notmuch_thread_get_thread_id@Base 0.3
+ notmuch_thread_get_toplevel_messages@Base 0.3
+ notmuch_thread_get_total_messages@Base 0.3
+ notmuch_threads_destroy@Base 0.3
+ notmuch_threads_get@Base 0.3
+ notmuch_threads_move_to_next@Base 0.3
+ notmuch_threads_valid@Base 0.3
+ (c++)"typeinfo for Xapian::LogicError@Base" 0.6.1
+ (c++)"typeinfo for Xapian::RuntimeError@Base" 0.6.1
+ (c++)"typeinfo for Xapian::DocNotFoundError@Base" 0.6.1
+ (c++)"typeinfo for Xapian::InvalidArgumentError@Base" 0.6.1
+ (c++)"typeinfo for Xapian::Error@Base" 0.6.1
+ (c++)"typeinfo for Xapian::DatabaseError@Base" 0.24~rc0
+ (c++)"typeinfo for Xapian::DatabaseModifiedError@Base" 0.24~rc0
+ (c++|optional=present with Xapian 1.4)"typeinfo for Xapian::QueryParserError@Base" 0.23~rc0
+ (c++)"typeinfo name for Xapian::LogicError@Base" 0.6.1
+ (c++)"typeinfo name for Xapian::RuntimeError@Base" 0.6.1
+ (c++)"typeinfo name for Xapian::DocNotFoundError@Base" 0.6.1
+ (c++)"typeinfo name for Xapian::InvalidArgumentError@Base" 0.6.1
+ (c++)"typeinfo name for Xapian::Error@Base" 0.6.1
+ (c++)"typeinfo name for Xapian::DatabaseError@Base" 0.24~rc0
+ (c++)"typeinfo name for Xapian::DatabaseModifiedError@Base" 0.24~rc0
+ (c++|optional=present with Xapian 1.4)"typeinfo name for Xapian::QueryParserError@Base" 0.23~rc0
index 86e891d4aefc5ad6a593b68f81981dfa85bbcf45..31b9a37eb18f10b004b2a95b67e7e1c676515209 100644 (file)
@@ -1,3 +1,3 @@
 usr/bin
 usr/share/man
-etc/bash_completion.d
+usr/share/bash-completion
diff --git a/devel/emacs-keybindings.org b/devel/emacs-keybindings.org
new file mode 100644 (file)
index 0000000..464b946
--- /dev/null
@@ -0,0 +1,58 @@
+|-----------+----------------------------------------+-------------------------------------------------------+-----------------------------------------|
+| Key       | Search Mode                            | Show Mode                                             | Tree Mode                               |
+|-----------+----------------------------------------+-------------------------------------------------------+-----------------------------------------|
+| a         | notmuch-search-archive-thread          | notmuch-show-archive-message-then-next-or-next-thread | notmuch-tree-archive-message-then-next  |
+| b         | notmuch-search-scroll-down             | notmuch-show-resend-message                           | notmuch-show-resend-message             |
+| c         | notmuch-search-stash-map               | notmuch-show-stash-map                                | notmuch-show-stash-map                  |
+| d         |                                        |                                                       |                                         |
+| e         |                                        |                                                       | (notmuch-tree-button-activate)          |
+| f         |                                        | notmuch-show-forward-message                          | notmuch-show-forward-message            |
+| g         |                                        |                                                       |                                         |
+| h         |                                        | notmuch-show-toggle-visibility-headers                |                                         |
+| i         |                                        |                                                       |                                         |
+| j         | notmuch-jump-search                    | notmuch-jump-search                                   | notmuch-jump-search                     |
+| k         | notmuch-tag-jump                       | notmuch-tag-jump                                      | notmuch-tag-jump                        |
+| l         | notmuch-search-filter                  | notmuch-show-filter-thread                            |                                         |
+| m         | notmuch-mua-new-mail                   | notmuch-mua-new-mail                                  | notmuch-mua-new-mail                    |
+| n         | notmuch-search-next-thread             | notmuch-show-next-open-message                        | notmuch-tree-next-matching-message      |
+| o         | notmuch-search-toggle-order            |                                                       |                                         |
+| p         | notmuch-search-previous-thread         | notmuch-show-previous-open-message                    | notmuch-tree-prev-matching-message      |
+| q         | notmuch-bury-or-kill-this-buffer       | notmuch-bury-or-kill-this-buffer                      | notmuch-bury-or-kill-this-buffer        |
+| r         | notmuch-search-reply-to-thread-sender  | notmuch-show-reply-sender                             | notmuch-show-reply-sender               |
+| s         | notmuch-search                         | notmuch-search                                        | notmuch-search                          |
+| t         | notmuch-search-filter-by-tag           | toggle-truncate-lines                                 |                                         |
+| u         |                                        |                                                       |                                         |
+| v         |                                        |                                                       | notmuch-show-view-all-mime-parts        |
+| w         |                                        | notmuch-show-save-attachments                         | notmuch-show-save-attachments           |
+| x         | notmuch-bury-or-kill-this-buffer       | notmuch-show-archive-message-then-next-or-exit        | notmuch-tree-quit                       |
+| y         |                                        |                                                       |                                         |
+| z         | notmuch-tree                           | notmuch-tree                                          | notmuch-tree-to-tree                    |
+| A         |                                        | notmuch-show-archive-thread-then-next                 | notmuch-tree-archive-thread             |
+| F         |                                        | notmuch-show-forward-open-messages                    |                                         |
+| G         | notmuch-poll-and-refresh-this-buffer   | notmuch-poll-and-refresh-this-buffer                  | notmuch-poll-and-refresh-this-buffer    |
+| N         |                                        | notmuch-show-next-message                             | notmuch-tree-next-message               |
+| O         |                                        |                                                       |                                         |
+| P         |                                        | notmuch-show-previous-message                         | notmuch-tree-prev-message               |
+| R         | notmuch-search-reply-to-thread         | notmuch-show-reply                                    | notmuch-show-reply                      |
+| S         |                                        |                                                       | notmuch-search-from-tree-current-query  |
+| V         |                                        | notmuch-show-view-raw-message                         | notmuch-show-view-raw-message           |
+| X         |                                        | notmuch-show-archive-thread-then-exit                 |                                         |
+| Z         | notmuch-tree-from-search-current-query | notmuch-tree-from-show-current-query                  |                                         |
+| =!=       |                                        | notmuch-show-toggle-elide-non-matching                |                                         |
+| =#=       |                                        | notmuch-show-print-message                            |                                         |
+| =$=       |                                        | notmuch-show-toggle-process-crypto                    |                                         |
+| =*=       | notmuch-search-tag-all                 | notmuch-show-tag-all                                  | notmuch-tree-tag-thread                 |
+| +         | notmuch-search-add-tag                 | notmuch-show-add-tag                                  | notmuch-tree-add-tag                    |
+| -         | notmuch-search-remove-tag              | notmuch-show-remove-tag                               | notmuch-tree-remove-tag                 |
+| .         |                                        | notmuch-show-part-map                                 |                                         |
+| <         | notmuch-search-first-thread            | notmuch-show-toggle-thread-indentation                |                                         |
+| <DEL>     | notmuch-search-scroll-down             | notmuch-show-rewind                                   | notmuch-tree-scroll-message-window-back |
+| <RET>     | notmuch-search-show-thread             | notmuch-show-toggle-message                           | notmuch-tree-show-message               |
+| <SPC>     | notmuch-search-scroll-up               | notmuch-show-advance                                  | notmuch-tree-scroll-or-next             |
+| <TAB>     |                                        | notmuch-show-next-button                              | notmuch-show-next-button                |
+| <backtab> |                                        | notmuch-show-previous-button                          | notmuch-show-previous-button            |
+| =         | notmuch-refresh-this-buffer            | notmuch-refresh-this-buffer                           | notmuch-tree-refresh-view               |
+| >         | notmuch-search-last-thread             |                                                       |                                         |
+| ?         | notmuch-help                           | notmuch-help                                          | notmuch-help                            |
+| \vert     |                                        | notmuch-show-pipe-message                             | notmuch-show-pipe-message               |
+|-----------+----------------------------------------+-------------------------------------------------------+-----------------------------------------|
index 1dd5f14fe7b4dbaf01a4fdfbd1d5332ae15b983a..6febf16fde3f2eabd5eaa8671703911de239bff0 100755 (executable)
@@ -475,7 +475,7 @@ def log(args=()):
     'nmbug log HEAD..@{upstream}'.
     """
     # we don't want output trapping here, because we want the pager.
-    args = ['log', '--name-status'] + list(args)
+    args = ['log', '--name-status', '--no-renames'] + list(args)
     with _git(args=args, expect=(0, 1, -13)) as p:
         p.wait()
 
index 41dc4a60fff36608e25425c7f113c6f2a1b667b0..00ebb7a6e7148f9f7f2930de214e0e85ae915589 100644 (file)
@@ -26,6 +26,10 @@ v1
 v2
 - Added the thread_summary.query field.
 
+v3
+- Replaced message.filename string with a list of filenames.
+- Added part.content-disposition field.
+
 Common non-terminals
 --------------------
 
@@ -59,7 +63,7 @@ message = {
     # (format_message_sprinter)
     id:             messageid,
     match:          bool,
-    filename:      string,
+    filename:      [string*],
     timestamp:      unix_time, # date header as unix time
     date_relative:  string,   # user-friendly timestamp
     tags:           [string*],
@@ -76,6 +80,7 @@ part = {
     sigstatus?:     sigstatus,
 
     content-type:   string,
+    content-disposition?:       string,
     content-id?:    string,
     # if content-type starts with "multipart/":
     content:        [part*],
index d0da78e510f1d283b214d663ff1efc9512ba25df..9fa35d08a95e3c850ceafccdea523f310f775e43 100644 (file)
@@ -1,4 +1,3 @@
 *.pyc
-docdeps.mk
 _build
 config.dox
index 8633cfcd3b51e24b5df686f576271e63dbc69b4f..c6f05ca879c0999f20b5c63bcfcfaa8a54cccc87 100644 (file)
@@ -7,13 +7,23 @@ SPHINXOPTS    := -q
 SPHINXBUILD   = sphinx-build
 DOCBUILDDIR      := $(dir)/_build
 
-mkdocdeps := $(PYTHON) $(srcdir)/$(dir)/mkdocdeps.py
-
 # Internal variables.
 ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
 APIMAN         := $(DOCBUILDDIR)/man/man3/notmuch.3
 DOXYFILE       := $(srcdir)/$(dir)/doxygen.cfg
 
+MAN1_RST := $(wildcard $(srcdir)/doc/man1/*.rst)
+MAN5_RST := $(wildcard $(srcdir)/doc/man5/*.rst)
+MAN7_RST := $(wildcard $(srcdir)/doc/man7/*.rst)
+MAN_RST_FILES := $(MAN1_RST) $(MAN5_RST) $(MAN7_RST)
+
+MAN1_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN1_RST:.rst=.1))
+MAN5_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN5_RST:.rst=.5))
+MAN7_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN7_RST:.rst=.7))
+MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN5_ROFF) $(MAN7_ROFF)
+
+MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
 
 .PHONY: install-man build-man apidocs install-apidocs
@@ -30,10 +40,6 @@ sphinx-texinfo:
 sphinx-info: sphinx-texinfo
        make -C $(DOCBUILDDIR)/texinfo info
 
--include $(dir)/docdeps.mk
-
-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
-
 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
 ${MAN_ROFF_FILES}: $(DOCBUILDDIR)/.roff.stamp
@@ -53,7 +59,7 @@ else
        @echo "Fatal: build dependency fail."
        @false
 endif
-       touch ${MAN_ROFF_FILES} $@
+       touch $@
 
 install-man: install-apidocs
 
@@ -62,7 +68,7 @@ MAN_GZIP_FILES += ${APIMAN}.gz
 apidocs: $(APIMAN)
 install-apidocs: ${APIMAN}.gz
        mkdir -p "$(DESTDIR)$(mandir)/man3"
-       install -m0644  $(DOCBUILDDIR)/man/man3/*.3.gz  $(DESTDIR)/$(mandir)/man3
+       install -m0644 $(filter %.3.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man3
 
 $(APIMAN): $(dir)/config.dox $(srcdir)/$(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
        mkdir -p $(DOCBUILDDIR)/man/man3
@@ -86,9 +92,9 @@ install-man: ${MAN_GZIP_FILES}
        mkdir -p "$(DESTDIR)$(mandir)/man1"
        mkdir -p "$(DESTDIR)$(mandir)/man5"
        mkdir -p "$(DESTDIR)$(mandir)/man7"
-       install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
-       install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
-       install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
+       install -m0644 $(filter %.1.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man1
+       install -m0644 $(filter %.5.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man5
+       install -m0644 $(filter %.7.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man7
        cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif
 
@@ -96,8 +102,5 @@ $(dir)/config.dox: version.stamp
        echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
        echo "INPUT=${srcdir}/lib/notmuch.h" >> $@
 
-$(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
-       $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@
-
-CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(DOCBUILDDIR)/.roff.stamp
+CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp
 CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox
index 356a2b2b9e0b32db596c4e8301b42977f565e606..a3d8269696a366dca12b1caa4a8d67e6005d993c 100644 (file)
@@ -52,74 +52,74 @@ htmlhelp_basename = 'notmuchdoc'
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 
-man_pages = [
-
-('man1/notmuch','notmuch',
-        u'thread-based email index, search, and tagging',
-        [u'Carl Worth and many others'], 1),
-
-('man1/notmuch-address','notmuch-address',
-        u'output addresses from matching messages',
-        [u'Carl Worth and many others'], 1),
+notmuch_authors = u'Carl Worth and many others'
 
-('man1/notmuch-compact','notmuch-compact',
-        u'compact the notmuch database',
-        [u'Carl Worth and many others'], 1),
+man_pages = [
+    ('man1/notmuch', 'notmuch',
+     u'thread-based email index, search, and tagging',
+     [notmuch_authors], 1),
 
-('man1/notmuch-config','notmuch-config',
-        u'access notmuch configuration file',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-address', 'notmuch-address',
+     u'output addresses from matching messages',
+     [notmuch_authors], 1),
 
-('man1/notmuch-count','notmuch-count',
-        u'count messages matching the given search terms',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-compact', 'notmuch-compact',
+     u'compact the notmuch database',
+     [notmuch_authors], 1),
 
-('man1/notmuch-dump','notmuch-dump',
-        u'creates a plain-text dump of the tags of each message',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-config', 'notmuch-config',
+     u'access notmuch configuration file',
+     [notmuch_authors], 1),
 
-('man1/notmuch-emacs-mua','notmuch-emacs-mua',
-        u'send mail with notmuch and emacs',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-count', 'notmuch-count',
+     u'count messages matching the given search terms',
+     [notmuch_authors], 1),
 
-('man5/notmuch-hooks','notmuch-hooks',
-        u'hooks for notmuch',
-        [u'Carl Worth and many others'], 5),
+    ('man1/notmuch-dump', 'notmuch-dump',
+     u'creates a plain-text dump of the tags of each message',
+     [notmuch_authors], 1),
 
-('man1/notmuch-insert','notmuch-insert',
-        u'add a message to the maildir and notmuch database',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-emacs-mua', 'notmuch-emacs-mua',
+     u'send mail with notmuch and emacs',
+     [notmuch_authors], 1),
 
-('man1/notmuch-new','notmuch-new',
-        u'incorporate new mail into the notmuch database',
-        [u'Carl Worth and many others'], 1),
+    ('man5/notmuch-hooks', 'notmuch-hooks',
+     u'hooks for notmuch',
+     [notmuch_authors], 5),
 
-('man1/notmuch-reply','notmuch-reply',
-        u'constructs a reply template for a set of messages',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-insert', 'notmuch-insert',
+     u'add a message to the maildir and notmuch database',
+     [notmuch_authors], 1),
 
-('man1/notmuch-restore','notmuch-restore',
-        u'restores the tags from the given file (see notmuch dump)',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-new', 'notmuch-new',
+     u'incorporate new mail into the notmuch database',
+     [notmuch_authors], 1),
 
-('man1/notmuch-search','notmuch-search',
-        u'search for messages matching the given search terms',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-reply', 'notmuch-reply',
+     u'constructs a reply template for a set of messages',
+     [notmuch_authors], 1),
 
-('man7/notmuch-search-terms','notmuch-search-terms',
-        u'syntax for notmuch queries',
-        [u'Carl Worth and many others'], 7),
+    ('man1/notmuch-restore', 'notmuch-restore',
+     u'restores the tags from the given file (see notmuch dump)',
+     [notmuch_authors], 1),
 
-('man1/notmuch-show','notmuch-show',
-        u'show messages matching the given search terms',
-        [u'Carl Worth and many others'], 1),
+    ('man1/notmuch-search', 'notmuch-search',
+     u'search for messages matching the given search terms',
+     [notmuch_authors], 1),
 
-('man1/notmuch-tag','notmuch-tag',
-        u'add/remove tags for all messages matching the search terms',
-        [u'Carl Worth and many others'], 1),
+    ('man7/notmuch-search-terms', 'notmuch-search-terms',
+     u'syntax for notmuch queries',
+     [notmuch_authors], 7),
 
+    ('man1/notmuch-show', 'notmuch-show',
+     u'show messages matching the given search terms',
+     [notmuch_authors], 1),
 
+    ('man1/notmuch-tag', 'notmuch-tag',
+     u'add/remove tags for all messages matching the search terms',
+     [notmuch_authors], 1),
 ]
+
 # If true, show URL addresses after external links.
 #man_show_urls = False
 
@@ -132,52 +132,19 @@ man_pages = [
 texinfo_no_detailmenu = True
 
 texinfo_documents = [
- ('notmuch-emacs', 'notmuch-emacs', u'notmuch Documentation',
-   u'Carl Worth and many others', 'notmuch-emacs',
-   'emacs based front-end for notmuch', 'Miscellaneous'),
-('man1/notmuch','notmuch',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch',
-      'thread-based email index, search, and tagging','Miscellaneous'),
-('man1/notmuch-address','notmuch-address',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-address',
-      'output addresses from matching messages','Miscellaneous'),
-('man1/notmuch-compact','notmuch-compact',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-compact',
-      'compact the notmuch database','Miscellaneous'),
-('man1/notmuch-config','notmuch-config',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-config',
-      'access notmuch configuration file','Miscellaneous'),
-('man1/notmuch-count','notmuch-count',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-count',
-      'count messages matching the given search terms','Miscellaneous'),
-('man1/notmuch-dump','notmuch-dump',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-dump',
-      'creates a plain-text dump of the tags of each message','Miscellaneous'),
-('man5/notmuch-hooks','notmuch-hooks',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-hooks',
-      'hooks for notmuch','Miscellaneous'),
-('man1/notmuch-insert','notmuch-insert',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-insert',
-      'add a message to the maildir and notmuch database','Miscellaneous'),
-('man1/notmuch-new','notmuch-new',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-new',
-      'incorporate new mail into the notmuch database','Miscellaneous'),
-('man1/notmuch-reply','notmuch-reply',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-reply',
-      'constructs a reply template for a set of messages','Miscellaneous'),
-('man1/notmuch-restore','notmuch-restore',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-restore',
-      'restores the tags from the given file (see notmuch dump)','Miscellaneous'),
-('man1/notmuch-search','notmuch-search',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-search',
-      'search for messages matching the given search terms','Miscellaneous'),
-('man7/notmuch-search-terms','notmuch-search-terms',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-search-terms',
-      'syntax for notmuch queries','Miscellaneous'),
-('man1/notmuch-show','notmuch-show',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-show',
-      'show messages matching the given search terms','Miscellaneous'),
-('man1/notmuch-tag','notmuch-tag',u'notmuch Documentation',
-      u'Carl Worth and many others', 'notmuch-tag',
-      'add/remove tags for all messages matching the search terms','Miscellaneous'),
+    ('notmuch-emacs', 'notmuch-emacs', u'notmuch-emacs documentation',
+     notmuch_authors, 'notmuch-emacs',
+     'emacs based front-end for notmuch', 'Miscellaneous'),
 ]
+
+# generate texinfo list from man page list
+texinfo_documents += [
+    (
+        x[0],                          # source start file
+        x[1],                          # target name
+        x[1] + u' documentation',      # title
+        x[3][0],                       # author
+        x[1],                          # dir menu entry
+        x[2],                          # description
+        'Miscellaneous'                        # category
+    ) for x in man_pages]
index 7f7214b32fb3e25a91c0bb6bc5464d94b13c6254..446cefbd6758238e0ed27659cfd8b5b2e6a9594b 100644 (file)
@@ -64,11 +64,11 @@ Supported options for **address** include
             messages. This is not applicable with --output=count.
 
         **mailbox**
-           Deduplicate addresses based on the full, case sensitive
-           name and email address, or mailbox. This is effectively
-           the same as piping the --deduplicate=no output to **sort |
-           uniq**, except for the order of results. This is the
-           default.
+            Deduplicate addresses based on the full, case sensitive
+            name and email address, or mailbox. This is effectively
+            the same as piping the --deduplicate=no output to **sort |
+            uniq**, except for the order of results. This is the
+            default.
 
         **address**
             Deduplicate addresses based on the case insensitive
index 5a517ebda95ac290a06f11783f38df73f45a37b2..7483b75f1727e0490b70c001604173815173bb5b 100644 (file)
@@ -129,14 +129,14 @@ The available configuration items are described below.
 
         Name (or full path) of gpg binary to use in verification and
         decryption of PGP/MIME messages.
-    
+
         Default: ``gpg``.
 
     **built_with.<name>**
 
-       Compile time feature <name>. Current possibilities include
-       "compact" (see **notmuch-compact(1)**)
-       and "field_processor" (see **notmuch-search-terms(7)**).
+        Compile time feature <name>. Current possibilities include
+        "compact" (see **notmuch-compact(1)**)
+        and "field_processor" (see **notmuch-search-terms(7)**).
 
     **query.<name>**
 
index 99de13a9871245af98f1ca55e8570179e116883e..90d852ae3adfc0f95971734dd5bf236dc7b2e9c6 100644 (file)
@@ -48,9 +48,9 @@ Supported options for **count** include
         compatible with specifying search terms on the command line.
 
     ``--lastmod``
-       Append lastmod (counter for number of database updates) and UUID
-       to the output. lastmod values are only comparable between databases
-       with the same UUID.
+        Append lastmod (counter for number of database updates) and UUID
+        to the output. lastmod values are only comparable between databases
+        with the same UUID.
 
     ``--input=``\ <filename>
         Read input from given file, instead of from stdin. Implies
index 738ba4a3e0f9c84491ca3b51f23c1683ace65390..f3f2b3942fafd82bcd842a067be93f71c205ff63 100644 (file)
@@ -77,21 +77,21 @@ Supported options for **dump** include
 
       **config**
 
-       Output configuration data stored in the database. Each line
-       starts with "#@ ", followed by a space separated key-value
-       pair.  Both key and value are hex encoded if needed.
+        Output configuration data stored in the database. Each line
+        starts with "#@ ", followed by a space separated key-value
+        pair.  Both key and value are hex encoded if needed.
 
       **properties**
 
-       Output per-message (key,value) metadata.  Each line starts
-       with "#= ", followed by a message id, and a space separated
-       list of key=value pairs.  pair.  Ids, keys and values are hex
-       encoded if needed.
+        Output per-message (key,value) metadata.  Each line starts
+        with "#= ", followed by a message id, and a space separated
+        list of key=value pairs.  pair.  Ids, keys and values are hex
+        encoded if needed.
 
       **tags**
 
-       Output per-message boolean metadata, namely tags. See *format* above
-       for description of the output.
+        Output per-message boolean metadata, namely tags. See *format* above
+        for description of the output.
 
       The default is to include all available types of data.  The
       option can be specified multiple times to select some subset. As
index 7c5729047173815a08bb2ce0c10754120a528db3..87787e20e531157b6ebc18a6d5d852634edc8ae0 100644 (file)
@@ -5,15 +5,15 @@ notmuch-emacs-mua
 SYNOPSIS
 ========
 
-**notmuch-emacs-mua** [options ...] [<to-address> ...]
+**notmuch** **emacs-mua** [options ...] [<to-address> ... | <mailto-url>]
 
 DESCRIPTION
 ===========
 
 Start composing an email in the Notmuch Emacs UI with the specified
-subject, recipients, and message body.
+subject, recipients, and message body, or mailto: URL.
 
-Supported options for **notmuch-emacs-mua** include
+Supported options for **emacs-mua** include
 
     ``-h, --help``
         Display help.
@@ -33,6 +33,10 @@ Supported options for **notmuch-emacs-mua** include
     ``-i, --body=``\ <file>
         Specify a file to include into the body of the message.
 
+    ``--hello``
+        Go to the Notmuch hello screen instead of the message composition
+        window if no message composition parameters are given.
+
     ``--no-window-system``
         Even if a window system is available, use the current terminal.
 
@@ -56,7 +60,9 @@ Supported options for **notmuch-emacs-mua** include
         Output the resulting elisp to stdout instead of evaluating it.
 
 The supported positional parameters and short options are a compatible
-subset of the **mutt** MUA command-line options.
+subset of the **mutt** MUA command-line options. The options and
+positional parameters modifying the message can't be combined with the
+mailto: URL.
 
 Options may be specified multiple times.
 
index c681fa2d18bdf4dcd94a07b83a90005907585b84..cb68bc8a72b2dd4e673934c4c196c75760dd7238 100644 (file)
@@ -54,23 +54,23 @@ Supported options for **restore** include
 
       Control what kind of metadata is restored.
 
-       **config**
+        **config**
 
-         Restore configuration data to the database. Each configuration line starts
-         with "#@ ", followed by a space separated key-value pair.
-         Both key and value are hex encoded if needed.
+          Restore configuration data to the database. Each configuration line starts
+          with "#@ ", followed by a space separated key-value pair.
+          Both key and value are hex encoded if needed.
 
-       **properties**
+        **properties**
 
-         Output per-message (key,value) metadata.  Each line starts
-         with "#= ", followed by a message id, and a space separated
-         list of key=value pairs.  pair.  Ids, keys and values are
-         hex encoded if needed.
+          Output per-message (key,value) metadata.  Each line starts
+          with "#= ", followed by a message id, and a space separated
+          list of key=value pairs.  pair.  Ids, keys and values are
+          hex encoded if needed.
 
-       **tags**
+        **tags**
 
-         Output per-message metadata, namely tags. See *format* above
-         for more details.
+          Output per-message metadata, namely tags. See *format* above
+          for more details.
 
       The default is to restore all available types of data.  The
       option can be specified multiple times to select some subset.
index 7429f517626db277bce71af1f32cc2d14d6b04b1..fbd7f381675748cfca83d5818a50669323485117 100644 (file)
@@ -116,6 +116,15 @@ dump of email tags for backup purposes, and to restore from that dump.
 The **config** command can be used to get or set settings in the notmuch
 configuration file.
 
+CUSTOM COMMANDS
+---------------
+
+If the given command is not known to notmuch, notmuch tries to execute
+the external **notmuch-<subcommand>** in ${PATH} instead. This allows
+users to have their own notmuch related tools to be run via the
+notmuch command. By design, this does not allow notmuch's own commands
+to be overriden using external commands.
+
 ENVIRONMENT
 ===========
 
index de93d7332472c97aae460749ecd23eb4c2fb9eed..47cab48d3ee97df0d9db80028a586c40fd1a3b2f 100644 (file)
@@ -34,10 +34,14 @@ indicate user-supplied values):
 
 -  from:<name-or-address>
 
+-  from:/<regex>/
+
 -  to:<name-or-address>
 
 -  subject:<word-or-quoted-phrase>
 
+-  subject:/<regex>/
+
 -  attachment:<word>
 
 -  mimetype:<word>
@@ -71,6 +75,15 @@ subject of an email. Searching for a phrase in the subject is supported
 by including quotation marks around the phrase, immediately following
 **subject:**.
 
+If notmuch is built with **Xapian Field Processors** (see below) the
+**from:** and **subject** prefix can be also used to restrict the
+results to those whose from/subject value matches a regular expression
+(see **regex(7)**) delimited with //.
+
+::
+
+   notmuch search 'from:/bob@.*[.]example[.]com/'
+
 The **attachment:** prefix can be used to search for specific filenames
 (or extensions) of attachments to email messages.
 
@@ -220,13 +233,18 @@ Boolean and Probabilistic Prefixes
 ----------------------------------
 
 Xapian (and hence notmuch) prefixes are either **boolean**, supporting
-exact matches like "tag:inbox"  or **probabilistic**, supporting a more flexible **term** based searching. The prefixes currently supported by notmuch are as follows.
-
+exact matches like "tag:inbox" or **probabilistic**, supporting a more
+flexible **term** based searching. Certain **special** prefixes are
+processed by notmuch in a way not stricly fitting either of Xapian's
+built in styles. The prefixes currently supported by notmuch are as
+follows.
 
 Boolean
    **tag:**, **id:**, **thread:**, **folder:**, **path:**, **property:**
 Probabilistic
-   **from:**, **to:**, **subject:**, **attachment:**, **mimetype:**
+  **to:**, **attachment:**, **mimetype:**
+Special
+   **from:**, **query:**, **subject:**
 
 Terms and phrases
 -----------------
@@ -396,6 +414,7 @@ Currently the following features require field processor support:
 
 - non-range date queries, e.g. "date:today"
 - named queries e.g. "query:my_special_query"
+- regular expression searches, e.g. "subject:/^\\[SPAM\\]/"
 
 SEE ALSO
 ========
diff --git a/doc/mkdocdeps.py b/doc/mkdocdeps.py
deleted file mode 100644 (file)
index b87fe3e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-import sys
-
-srcdir = sys.argv[1]
-builddir = sys.argv[2]
-outfile = sys.argv[3]
-
-sys.path.insert(0, srcdir)
-import conf
-
-roff_files = []
-rst_files = []
-for page in conf.man_pages:
-    rst_files = rst_files + ["{0:s}/{1:s}.rst".format(srcdir,page[0])]
-    roff_files = roff_files + ["{0:s}/man/{1:s}.{2:d}".format(builddir,page[0],page[4])]
-
-with open(outfile, 'w') as out:
-    out.write('MAN_ROFF_FILES := ' + ' \\\n\t'.join(roff_files) + '\n')
-    out.write('MAN_RST_FILES := ' + ' \\\n\t'.join(rst_files) + '\n')
index d68542d349a017b1fd6acb2bfd7400a38385bd41..5e25996f69b4e9c7f03ab340bba941b78d4c45ef 100644 (file)
@@ -189,10 +189,12 @@ following key bindings:
 ``j``
     Jump to saved searches using :ref:`notmuch-jump`.
 
+.. _notmuch-jump:
+
 notmuch-jump
 ------------
 
-Saved searches configured through :ref:`notmuch-saved-searches` can
+Saved searches configured through :ref:`saved-searches` can
 include a "shortcut key" that's accessible through notmuch-jump.
 Pressing ``j`` anywhere in notmuch followed by the configured shortcut
 key of a saved search will immediately jump to that saved search.  For
index dfa7c1f11dcad859a7358fe6e3b049d53d880eb3..040e64d435724b450008260e9351e52b3551fdfe 100644 (file)
@@ -21,7 +21,10 @@ emacs_sources := \
        $(dir)/notmuch-print.el \
        $(dir)/notmuch-version.el \
        $(dir)/notmuch-jump.el \
-       $(dir)/notmuch-company.el
+       $(dir)/notmuch-company.el \
+       $(dir)/notmuch-draft.el
+
+elpa_sources := ${emacs_sources} $(dir)/notmuch-pkg.el
 
 $(dir)/notmuch-version.el: $(dir)/Makefile.local version.stamp
 $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl
@@ -35,6 +38,9 @@ $(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl
 all: $(dir)/notmuch-pkg.el
 install-emacs: $(dir)/notmuch-pkg.el
 
+emacs_mua := $(dir)/notmuch-emacs-mua
+emacs_mua_desktop := $(dir)/notmuch-emacs-mua.desktop
+
 emacs_images := \
        $(srcdir)/$(dir)/notmuch-logo.png
 
@@ -72,6 +78,14 @@ ifeq ($(HAVE_EMACS),1)
        $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<
 endif
 
+elpa: $(ELPA_FILE)
+
+notmuch-emacs-%.tar: ${elpa_sources}
+       mkdir -p .elpa-build/notmuch-${ELPA_VERSION}
+       cp ${elpa_sources} .elpa-build/notmuch-${ELPA_VERSION}
+       tar -C .elpa-build -cf $@ notmuch-${ELPA_VERSION}
+       rm -r .elpa-build
+
 ifeq ($(WITH_EMACS),1)
 ifeq ($(HAVE_EMACS),1)
 all: $(emacs_bytecode)
@@ -90,5 +104,12 @@ ifeq ($(HAVE_EMACS),1)
 endif
        mkdir -p "$(DESTDIR)$(emacsetcdir)"
        install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
+       mkdir -p "$(DESTDIR)$(prefix)/bin/"
+       install $(emacs_mua) "$(DESTDIR)$(prefix)/bin"
+ifeq ($(WITH_DESKTOP),1)
+       mkdir -p "$(DESTDIR)$(desktop_dir)"
+       desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" $(emacs_mua_desktop)
+       -update-desktop-database "$(DESTDIR)$(desktop_dir)"
+endif
 
 CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el
index 34793dbec99e235ae863ae63dbc6d79881ce3efb..d504ff2d9fd4e0a952116761104a28fb1a1d2602 100644 (file)
 
 (defvar notmuch-address-full-harvest-finished nil
   "t indicates that full completion address harvesting has been
-finished")
+finished. Use notmuch-address--harvest-ready to access as that
+will load a saved hash if necessary (and available).")
+
+(defun notmuch-address--harvest-ready ()
+  "Return t if there is a full address hash available.
+
+If the hash is not present it attempts to load a saved hash."
+  (or notmuch-address-full-harvest-finished
+      (notmuch-address--load-address-hash)))
 
 (defcustom notmuch-address-command 'internal
   "Determines how address completion candidates are generated.
@@ -58,6 +66,7 @@ disabled."
          (const :tag "Disable address completion" nil)
          (string :tag "Use external completion command"))
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-internal-completion '(sent nil)
@@ -85,6 +94,19 @@ This should be a list of the form '(DIRECTION FILTER), where
         (setq notmuch-address-completions (clrhash notmuch-address-completions))
         (setq notmuch-address-full-harvest-finished nil))
   :group 'notmuch-send
+  :group 'notmuch-address
+  :group 'notmuch-external)
+
+(defcustom notmuch-address-save-filename nil
+  "Filename to save the cached completion addresses.
+
+All the addresses notmuch uses for address completion will be
+cached in this file. This has obvious privacy implications so you
+should make sure it is not somewhere publicly readable."
+  :type '(choice (const :tag "Off" nil)
+                (file :tag "Filename"))
+  :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-selection-function 'notmuch-address-selection-function
@@ -96,8 +118,20 @@ See documentation of function `notmuch-address-selection-function'
 to know how address selection is made by default."
   :type 'function
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
+(defcustom notmuch-address-post-completion-functions nil
+  "Functions called after completing address.
+
+The completed address is passed as an argument to each function.
+Note that this hook will be invoked for completion in headers
+matching `notmuch-address-completion-headers-regexp'.
+"
+  :type 'hook
+  :group 'notmuch-address
+  :group 'notmuch-hooks)
+
 (defun notmuch-address-selection-function (prompt collection initial-input)
   "Call (`completing-read'
       PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)"
@@ -115,7 +149,8 @@ to know how address selection is made by default."
 (defcustom notmuch-address-use-company t
   "If available, use company mode for address completion"
   :type 'boolean
-  :group 'notmuch-send)
+  :group 'notmuch-send
+  :group 'notmuch-address)
 
 (defun notmuch-address-setup ()
   (let* ((setup-company (and notmuch-address-use-company
@@ -159,7 +194,7 @@ elisp-based implementation or older implementation requiring
 external commands."
   (cond
    ((eq notmuch-address-command 'internal)
-    (when (not notmuch-address-full-harvest-finished)
+    (unless (notmuch-address--harvest-ready)
       ;; First, run quick synchronous harvest based on what the user
       ;; entered so far
       (notmuch-address-harvest original t))
@@ -194,12 +229,20 @@ external commands."
                    (t
                     (funcall notmuch-address-selection-function
                              (format "Address (%s matches): " num-options)
-                             (cdr options) (car options))))))
+                             ;; We put the first match as the initial
+                             ;; input; we put all the matches as
+                             ;; possible completions, moving the
+                             ;; first match to the end of the list
+                             ;; makes cursor up/down in the list work
+                             ;; better.
+                             (append (cdr options) (list (car options)))
+                             (car options))))))
       (if chosen
          (progn
            (push chosen notmuch-address-history)
            (delete-region beg end)
-           (insert chosen))
+           (insert chosen)
+           (run-hook-with-args 'notmuch-address-post-completion-functions chosen))
        (message "No matches.")
        (ding))))
    (t nil)))
@@ -304,6 +347,64 @@ execution, CALLBACK is called when harvesting finishes."
   ;; return value
   nil)
 
+(defvar notmuch-address--save-hash-version 1
+  "Version format of the save hash.")
+
+(defun notmuch-address--get-address-hash ()
+  "Returns the saved address hash as a plist.
+
+Returns nil if the save file does not exist, or it does not seem
+to be a saved address hash."
+  (when notmuch-address-save-filename
+    (condition-case nil
+       (with-temp-buffer
+         (insert-file-contents notmuch-address-save-filename)
+         (let ((name (read (current-buffer)))
+               (plist (read (current-buffer))))
+           ;; We do two simple sanity checks on the loaded file. We just
+           ;; check a version is specified, not that it is the current
+           ;; version, as we are allowed to over-write and a save-file with
+           ;; an older version.
+           (when (and (string= name "notmuch-address-hash")
+                      (plist-get plist :version))
+             plist)))
+      ;; The error case catches any of the reads failing.
+      (error nil))))
+
+(defun notmuch-address--load-address-hash ()
+  "Read the saved address hash and set the corresponding variables."
+  (let ((load-plist (notmuch-address--get-address-hash)))
+    (when (and load-plist
+              ;; If the user's setting have changed, or the version
+              ;; has changed, return nil to make sure the new settings
+              ;; take effect.
+              (equal (plist-get load-plist :completion-settings)
+                     notmuch-address-internal-completion)
+              (equal (plist-get load-plist :version)
+                     notmuch-address--save-hash-version))
+      (setq notmuch-address-last-harvest (plist-get load-plist :last-harvest)
+           notmuch-address-completions (plist-get load-plist :completions)
+           notmuch-address-full-harvest-finished t)
+      ;; Return t to say load was successful.
+      t)))
+
+(defun notmuch-address--save-address-hash ()
+  (when notmuch-address-save-filename
+    (if (or (not (file-exists-p notmuch-address-save-filename))
+             ;; The file exists, check it is a file we saved
+           (notmuch-address--get-address-hash))
+       (with-temp-file notmuch-address-save-filename
+         (let ((save-plist (list :version notmuch-address--save-hash-version
+                                 :completion-settings notmuch-address-internal-completion
+                                 :last-harvest notmuch-address-last-harvest
+                                 :completions notmuch-address-completions)))
+           (print "notmuch-address-hash" (current-buffer))
+           (print save-plist (current-buffer))))
+      (message "\
+Warning: notmuch-address-save-filename %s exists but doesn't
+appear to be an address savefile.  Not overwriting."
+              notmuch-address-save-filename))))
+
 (defun notmuch-address-harvest-trigger ()
   (let ((now (float-time)))
     (when (> (- now notmuch-address-last-harvest) 86400)
@@ -314,7 +415,9 @@ execution, CALLBACK is called when harvesting finishes."
                                 ;; again when the trigger is next
                                 ;; called
                                 (if (string= event "finished\n")
-                                    (setq notmuch-address-full-harvest-finished t)
+                                    (progn
+                                      (notmuch-address--save-address-hash)
+                                      (setq notmuch-address-full-harvest-finished t))
                                   (setq notmuch-address-last-harvest 0)))))))
 
 ;;
index 5d75c1455933e0548cb44fe47b26d718c4656a14..3e12e7a9f729984899dc32e5cbf2cb1b8e930710 100644 (file)
 (declare-function company-mode "company")
 (declare-function company-manual-begin "company")
 (defvar company-backends)
+(defvar company-idle-delay)
 
 (declare-function notmuch-address-harvest "notmuch-address")
 (declare-function notmuch-address-harvest-trigger "notmuch-address")
 (declare-function notmuch-address-matching "notmuch-address")
-(defvar notmuch-address-full-harvest-finished)
+(declare-function notmuch-address--harvest-ready "notmuch-address")
 (defvar notmuch-address-completion-headers-regexp)
+(defvar notmuch-address-command)
 
 ;;;###autoload
 (defun notmuch-company-setup ()
@@ -70,7 +72,7 @@
                                 (line-beginning-position))
                   (setq notmuch-company-last-prefix (company-grab "[:,][ \t]*\\(.*\\)" 1 (point-at-bol)))))
       (candidates (cond
-                  (notmuch-address-full-harvest-finished
+                  ((notmuch-address--harvest-ready)
                    ;; Update harvested addressed from time to time
                    (notmuch-address-harvest-trigger)
                    (notmuch-address-matching arg))
@@ -87,6 +89,7 @@
       (match (if (string-match notmuch-company-last-prefix arg)
                 (match-end 0)
               0))
+      (post-completion (run-hook-with-args 'notmuch-address-post-completion-functions arg))
       (no-cache t))))
 
 
index c3d827af59969f9f7fe5aac04b3c9d8835bf300f..2cedd39d5eb8e98604b4497ea70bf7106ab1a4c2 100644 (file)
@@ -1,8 +1,28 @@
-;; Compatibility functions for emacs 23 and 24 pre 24.4
+;; Compatibility functions for earlier versions of emacs
 
-;; The functions in this file are copied from eamcs 24.4 and are
-;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2014 Free Software
-;; Foundation, Inc.
+;; The functions in this file are copied from more modern versions of
+;; emacs and are Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2017
+;; Free Software Foundation, Inc.
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; emacs master has a bugfix for folding long headers when sending
+;; messages. Include the fix for earlier versions of emacs. To avoid
+;; interfering with gnus we only run the hook when called from
+;; notmuch-message-mode.
+
+(declare-function mail-header-fold-field "mail-parse" nil)
+
+(defun notmuch-message--fold-long-headers ()
+  (when (eq major-mode 'notmuch-message-mode)
+    (goto-char (point-min))
+    (while (not (eobp))
+      (when (and (looking-at "[^:]+:")
+                (> (- (line-end-position) (point)) 998))
+       (mail-header-fold-field))
+      (forward-line 1))))
+
+(unless (fboundp 'message--fold-long-headers)
+  (add-hook 'message-header-hook 'notmuch-message--fold-long-headers))
 
 (if (fboundp 'setq-local)
     (defalias 'notmuch-setq-local 'setq-local)
index e376aa8022d237caee6781eb29eb28e4475dd2bd..0af727ef4dc68258b039691e0e85d58e95f48a72 100644 (file)
@@ -21,6 +21,7 @@
 
 ;;; Code:
 
+(require 'epg)
 (require 'notmuch-lib)
 
 (defcustom notmuch-crypto-process-mime nil
@@ -42,7 +43,12 @@ mode."
   :group 'notmuch-crypto)
 
 (defface notmuch-crypto-part-header
-  '((t (:foreground "blue")))
+  '((((class color)
+      (background dark))
+     (:foreground "LightBlue1"))
+    (((class color)
+      (background light))
+     (:foreground "blue")))
   "Face used for crypto parts headers."
   :group 'notmuch-crypto
   :group 'notmuch-faces)
@@ -135,7 +141,7 @@ mode."
     (with-selected-window window
       (with-current-buffer buffer
        (goto-char (point-max))
-       (call-process "gpg" nil t t "--list-keys" fingerprint))
+       (call-process epg-gpg-program nil t t "--list-keys" fingerprint))
       (recenter -1))))
 
 (defun notmuch-crypto-sigstatus-error-callback (button)
@@ -146,9 +152,9 @@ mode."
     (with-selected-window window
       (with-current-buffer buffer
        (goto-char (point-max))
-       (call-process "gpg" nil t t "--recv-keys" keyid)
+       (call-process epg-gpg-program nil t t "--recv-keys" keyid)
        (insert "\n")
-       (call-process "gpg" nil t t "--list-keys" keyid))
+       (call-process epg-gpg-program nil t t "--list-keys" keyid))
       (recenter -1))
     (notmuch-show-refresh-view)))
 
diff --git a/emacs/notmuch-draft.el b/emacs/notmuch-draft.el
new file mode 100644 (file)
index 0000000..fb7f4f5
--- /dev/null
@@ -0,0 +1,267 @@
+;;; notmuch-draft.el --- functions for postponing and editing drafts
+;;
+;; Copyright Â© Mark Walters
+;; Copyright Â© David Bremner
+;;
+;; This file is part of Notmuch.
+;;
+;; Notmuch is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; Notmuch is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with Notmuch.  If not, see <https://www.gnu.org/licenses/>.
+;;
+;; Authors: Mark Walters <markwalters1009@gmail.com>
+;;         David Bremner <david@tethera.net>
+
+;;; Code:
+
+(require 'notmuch-maildir-fcc)
+(require 'notmuch-tag)
+
+(declare-function notmuch-show-get-message-id "notmuch-show" (&optional bare))
+(declare-function notmuch-message-mode "notmuch-mua")
+
+(defgroup notmuch-draft nil
+  "Saving and editing drafts in Notmuch."
+  :group 'notmuch)
+
+(defcustom notmuch-draft-tags '("+draft")
+  "List of tags changes to apply to a draft message when it is saved in the database.
+
+Tags starting with \"+\" (or not starting with either \"+\" or
+\"-\") in the list will be added, and tags starting with \"-\"
+will be removed from the message being stored.
+
+For example, if you wanted to give the message a \"draft\" tag
+but not the (normally added by default) \"inbox\" tag, you would
+set:
+    (\"+draft\" \"-inbox\")"
+  :type '(repeat string)
+  :group 'notmuch-draft)
+
+(defcustom notmuch-draft-folder "drafts"
+  "Folder to save draft messages in.
+
+This should be specified relative to the root of the notmuch
+database. It will be created if necessary."
+  :type 'string
+  :group 'notmuch-draft)
+
+(defcustom notmuch-draft-quoted-tags '()
+  "Mml tags to quote.
+
+This should be a list of mml tags to quote before saving. You do
+not need to include \"secure\" as that is handled separately.
+
+If you include \"part\" then attachments will not be saved with
+the draft -- if not then they will be saved with the draft. The
+former means the attachments may not still exist when you resume
+the message, the latter means that the attachments as they were
+when you postponed will be sent with the resumed message.
+
+Note you may get strange results if you change this between
+postponing and resuming a message."
+  :type '(repeat string)
+  :group 'notmuch-send)
+
+(defcustom notmuch-draft-save-plaintext 'ask
+  "Should notmuch save/postpone in plaintext messages that seem
+  like they are intended to be sent encrypted
+(i.e with an mml encryption tag in it)."
+  :type '(radio
+         (const :tag "Never" nil)
+         (const :tag "Ask every time" ask)
+         (const :tag "Always" t))
+  :group 'notmuch-draft
+  :group 'notmuch-crypto)
+
+(defvar notmuch-draft-encryption-tag-regex
+  "<#\\(part encrypt\\|secure.*mode=.*encrypt>\\)"
+  "Regular expression matching mml tags indicating encryption of part or message")
+
+(defvar notmuch-draft-id nil
+  "Message-id of the most recent saved draft of this message")
+(make-variable-buffer-local 'notmuch-draft-id)
+
+(defun notmuch-draft--mark-deleted ()
+  "Tag the last saved draft deleted.
+
+Used when a new version is saved, or the message is sent."
+  (when notmuch-draft-id
+    (notmuch-tag notmuch-draft-id '("+deleted"))))
+
+(defun notmuch-draft-quote-some-mml ()
+  "Quote the mml tags in `notmuch-draft-quoted-tags`."
+  (save-excursion
+    ;; First we deal with any secure tag separately.
+    (message-goto-body)
+    (when (looking-at "<#secure[^\n]*>\n")
+      (let ((secure-tag (match-string 0)))
+       (delete-region (match-beginning 0) (match-end 0))
+       (message-add-header (concat "X-Notmuch-Emacs-Secure: " secure-tag))))
+    ;; This is copied from mml-quote-region but only quotes the
+    ;; specified tags.
+    (when notmuch-draft-quoted-tags
+      (let ((re (concat "<#!*/?\\("
+                       (mapconcat 'regexp-quote notmuch-draft-quoted-tags "\\|")
+                       "\\)")))
+       (message-goto-body)
+       (while (re-search-forward re nil t)
+         ;; Insert ! after the #.
+         (goto-char (+ (match-beginning 0) 2))
+         (insert "!"))))))
+
+(defun notmuch-draft-unquote-some-mml ()
+  "Unquote the mml tags in `notmuch-draft-quoted-tags`."
+  (save-excursion
+    (when notmuch-draft-quoted-tags
+      (let ((re (concat "<#!+/?\\("
+                       (mapconcat 'regexp-quote notmuch-draft-quoted-tags "\\|")
+                       "\\)")))
+       (message-goto-body)
+       (while (re-search-forward re nil t)
+         ;; Remove one ! from after the #.
+         (goto-char (+ (match-beginning 0) 2))
+         (delete-char 1))))
+    (let (secure-tag)
+      (save-restriction
+       (message-narrow-to-headers)
+       (setq secure-tag (message-fetch-field "X-Notmuch-Emacs-Secure" 't))
+       (message-remove-header "X-Notmuch-Emacs-Secure"))
+      (message-goto-body)
+      (when secure-tag
+       (insert secure-tag "\n")))))
+
+(defun notmuch-draft--has-encryption-tag ()
+  "Returns t if there is an mml secure tag."
+  (save-excursion
+    (message-goto-body)
+    (re-search-forward notmuch-draft-encryption-tag-regex nil 't)))
+
+(defun notmuch-draft--query-encryption ()
+  "Checks if we should save a message that should be encrypted.
+
+`notmuch-draft-save-plaintext' controls the behaviour."
+  (case notmuch-draft-save-plaintext
+       ((ask)
+        (unless (yes-or-no-p "(Customize `notmuch-draft-save-plaintext' to avoid this warning)
+This message contains mml tags that suggest it is intended to be encrypted.
+Really save and index an unencrypted copy? ")
+          (error "Save aborted")))
+       ((nil)
+        (error "Refusing to save draft with encryption tags (see `notmuch-draft-save-plaintext')"))
+       ((t)
+        (ignore))))
+
+(defun notmuch-draft--make-message-id ()
+  ;; message-make-message-id gives the id inside a "<" ">" pair,
+  ;; but notmuch doesn't want that form, so remove them.
+  (concat "draft-" (substring (message-make-message-id) 1 -1)))
+
+(defun notmuch-draft-save ()
+  "Save the current draft message in the notmuch database.
+
+This saves the current message in the database with tags
+`notmuch-draft-tags` (in addition to any default tags
+applied to newly inserted messages)."
+  (interactive)
+  (when (notmuch-draft--has-encryption-tag)
+    (notmuch-draft--query-encryption))
+  (let ((id (notmuch-draft--make-message-id)))
+    (with-temporary-notmuch-message-buffer
+     ;; We insert a Date header and a Message-ID header, the former
+     ;; so that it is easier to search for the message, and the
+     ;; latter so we have a way of accessing the saved message (for
+     ;; example to delete it at a later time). We check that the
+     ;; user has these in `message-deletable-headers` (the default)
+     ;; as otherwise they are doing something strange and we
+     ;; shouldn't interfere. Note, since we are doing this in a new
+     ;; buffer we don't change the version in the compose buffer.
+     (cond
+      ((member 'Message-ID message-deletable-headers)
+       (message-remove-header "Message-ID")
+       (message-add-header (concat "Message-ID: <" id ">")))
+      (t
+       (message "You have customized emacs so Message-ID is not a deletable header, so not changing it")
+       (setq id nil)))
+     (cond
+      ((member 'Date message-deletable-headers)
+       (message-remove-header "Date")
+       (message-add-header (concat "Date: " (message-make-date))))
+      (t
+       (message "You have customized emacs so Date is not a deletable header, so not changing it")))
+     (message-add-header "X-Notmuch-Emacs-Draft: True")
+     (notmuch-draft-quote-some-mml)
+     (notmuch-maildir-setup-message-for-saving)
+     (notmuch-maildir-notmuch-insert-current-buffer
+      notmuch-draft-folder 't notmuch-draft-tags))
+    ;; We are now back in the original compose buffer. Note the
+    ;; function notmuch-call-notmuch-process (called by
+    ;; notmuch-maildir-notmuch-insert-current-buffer) signals an error
+    ;; on failure, so to get to this point it must have
+    ;; succeeded. Also, notmuch-draft-id is still the id of the
+    ;; previous draft, so it is safe to mark it deleted.
+    (notmuch-draft--mark-deleted)
+    (setq notmuch-draft-id (concat "id:" id))
+    (set-buffer-modified-p nil)))
+
+(defun notmuch-draft-postpone ()
+  "Save the draft message in the notmuch database and exit buffer."
+  (interactive)
+  (notmuch-draft-save)
+  (kill-buffer))
+
+(defun notmuch-draft-resume (id)
+  "Resume editing of message with id ID."
+  (let* ((tags (process-lines notmuch-command "search" "--output=tags"
+                             "--exclude=false" id))
+        (draft (equal tags (notmuch-update-tags tags notmuch-draft-tags))))
+    (when (or draft
+             (yes-or-no-p "Message does not appear to be a draft: really resume? "))
+      (switch-to-buffer (get-buffer-create (concat "*notmuch-draft-" id "*")))
+      (setq buffer-read-only nil)
+      (erase-buffer)
+      (let ((coding-system-for-read 'no-conversion))
+       (call-process notmuch-command nil t nil "show" "--format=raw" id))
+      (mime-to-mml)
+      (goto-char (point-min))
+      (when (re-search-forward "^$" nil t)
+       (replace-match mail-header-separator t t))
+      ;; Remove the Date and Message-ID headers (unless the user has
+      ;; explicitly customized emacs to tell us not to) as they will
+      ;; be replaced when the message is sent.
+      (save-restriction
+       (message-narrow-to-headers)
+       (when (member 'Message-ID message-deletable-headers)
+         (message-remove-header "Message-ID"))
+       (when (member 'Date message-deletable-headers)
+         (message-remove-header "Date"))
+       ;; The X-Notmuch-Emacs-Draft header is a more reliable
+       ;; indication of whether the message really is a draft.
+       (setq draft (> (message-remove-header "X-Notmuch-Emacs-Draft") 0)))
+      ;; If the message is not a draft we should not unquote any mml.
+      (when draft
+       (notmuch-draft-unquote-some-mml))
+      (notmuch-message-mode)
+      (message-goto-body)
+      (set-buffer-modified-p nil)
+      ;; If the resumed message was a draft then set the draft
+      ;; message-id so that we can delete the current saved draft if the
+      ;; message is resaved or sent.
+      (setq notmuch-draft-id (when draft id)))))
+
+
+(add-hook 'message-send-hook 'notmuch-draft--mark-deleted)
+
+
+(provide 'notmuch-draft)
+
+;;; notmuch-draft.el ends here
diff --git a/emacs/notmuch-emacs-mua b/emacs/notmuch-emacs-mua
new file mode 100755 (executable)
index 0000000..a521497
--- /dev/null
@@ -0,0 +1,179 @@
+#!/usr/bin/env bash
+#
+# notmuch-emacs-mua - start composing a mail on the command line
+#
+# Copyright Â© 2014 Jani Nikula
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
+#
+# Authors: Jani Nikula <jani@nikula.org>
+#
+
+set -eu
+
+# escape: "expand" '\' as '\\' and '"' as '\"'
+# calling convention: escape -v var "$arg" (like in bash printf).
+escape ()
+{
+    local __escape_arg__=${3//\\/\\\\}
+    printf -v $2 '%s' "${__escape_arg__//\"/\\\"}"
+}
+
+EMACS=${EMACS:-emacs}
+EMACSCLIENT=${EMACSCLIENT:-emacsclient}
+
+PRINT_ONLY=
+NO_WINDOW=
+USE_EMACSCLIENT=
+AUTO_DAEMON=
+CREATE_FRAME=
+ELISP=
+MAILTO=
+HELLO=
+
+# Short options compatible with mutt(1).
+while getopts :s:c:b:i:h opt; do
+    # Handle errors and long options.
+    case "${opt}" in
+       :)
+           echo "$0: short option -${OPTARG} requires an argument." >&2
+           exit 1
+           ;;
+       \?)
+           opt=$1
+           if [ "${OPTARG}" != "-" ]; then
+               echo "$0: unknown short option -${OPTARG}." >&2
+               exit 1
+           fi
+
+           case "${opt}" in
+               # Long options with arguments.
+               --subject=*|--to=*|--cc=*|--bcc=*|--body=*)
+                   OPTARG=${opt#--*=}
+                   opt=${opt%%=*}
+                   ;;
+               # Long options without arguments.
+               --help|--print|--no-window-system|--client|--auto-daemon|--create-frame|--hello)
+                   ;;
+               *)
+                   echo "$0: unknown long option ${opt}, or argument mismatch." >&2
+                   exit 1
+                   ;;
+           esac
+           # getopts does not do this for what it considers errors.
+           OPTIND=$((OPTIND + 1))
+           ;;
+    esac
+
+    escape -v OPTARG "${OPTARG-none}"
+
+    case "${opt}" in
+       --help|h)
+           exec man notmuch-emacs-mua
+           ;;
+       --subject|s)
+           ELISP="${ELISP} (message-goto-subject) (insert \"${OPTARG}\")"
+           ;;
+       --to)
+           ELISP="${ELISP} (message-goto-to) (insert \"${OPTARG}, \")"
+           ;;
+       --cc|c)
+           ELISP="${ELISP} (message-goto-cc) (insert \"${OPTARG}, \")"
+           ;;
+       --bcc|b)
+           ELISP="${ELISP} (message-goto-bcc) (insert \"${OPTARG}, \")"
+           ;;
+       --body|i)
+           ELISP="${ELISP} (message-goto-body) (insert-file \"${OPTARG}\")"
+           ;;
+       --print)
+           PRINT_ONLY=1
+           ;;
+       --no-window-system)
+           NO_WINDOW="-nw"
+           ;;
+       --client)
+           USE_EMACSCLIENT="yes"
+           ;;
+       --auto-daemon)
+           AUTO_DAEMON="--alternate-editor="
+           CREATE_FRAME="-c"
+           ;;
+       --create-frame)
+           CREATE_FRAME="-c"
+           ;;
+       --hello)
+           HELLO=1
+           ;;
+       *)
+           # We should never end up here.
+           echo "$0: internal error (option ${opt})." >&2
+           exit 1
+           ;;
+    esac
+
+    shift $((OPTIND - 1))
+    OPTIND=1
+done
+
+# Positional parameters.
+for arg; do
+    escape -v arg "${arg}"
+    case $arg in
+       mailto:*)
+           if [ -n "${MAILTO}" ]; then
+               echo "$0: more than one mailto: argument." >&2
+               exit 1
+           fi
+           MAILTO="${arg}"
+           ;;
+       *)
+           ELISP="${ELISP} (message-goto-to) (insert \"${arg}, \")"
+           ;;
+    esac
+done
+
+if [ -n "${MAILTO}" ]; then
+    if [ -n "${ELISP}" ]; then
+       echo "$0: mailto: is not compatible with other message parameters." >&2
+       exit 1
+    fi
+    ELISP="(browse-url-mail \"${MAILTO}\")"
+elif [ -z "${ELISP}" -a -n "${HELLO}" ]; then
+    ELISP="(notmuch)"
+else
+    ELISP="(notmuch-mua-new-mail) ${ELISP}"
+fi
+
+# Kill the terminal/frame if we're creating one.
+if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
+    ELISP="${ELISP} (message-add-action #'save-buffers-kill-terminal 'exit)"
+fi
+
+escape -v pwd "$PWD"
+
+# The crux of it all: construct an elisp progn and eval it.
+ELISP="(prog1 'done (require 'notmuch) (cd \"$pwd\") ${ELISP})"
+
+if [ -n "$PRINT_ONLY" ]; then
+    echo ${ELISP}
+    exit 0
+fi
+
+if [ -n "$USE_EMACSCLIENT" ]; then
+    # Evaluate the progn.
+    exec ${EMACSCLIENT} ${NO_WINDOW} ${CREATE_FRAME} ${AUTO_DAEMON} --eval "${ELISP}"
+else
+    exec ${EMACS} ${NO_WINDOW} --eval "${ELISP}"
+fi
diff --git a/emacs/notmuch-emacs-mua.desktop b/emacs/notmuch-emacs-mua.desktop
new file mode 100644 (file)
index 0000000..0d9af2a
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Notmuch (emacs interface)
+GenericName=Email Client
+Comment=Emacs based email client
+Exec=notmuch-emacs-mua --hello %u
+MimeType=x-scheme-handler/mailto;
+Icon=emblem-mail
+Terminal=false
+Type=Application
+Categories=Network;Email;
index d582bff7a4914588a7e6f62c89728139a4a93bba..c858a20b6cc751d73d457272b0586da3d20e49db 100644 (file)
@@ -604,10 +604,11 @@ with `notmuch-hello-query-counts'."
 
 (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))
 
-(defun notmuch-hello-update (&optional no-display)
-  "Update the current notmuch view."
+(defun notmuch-hello-update ()
+  "Update the notmuch-hello buffer."
   ;; Lazy - rebuild everything.
-  (notmuch-hello no-display))
+  (interactive)
+  (notmuch-hello t))
 
 (defun notmuch-hello-window-configuration-change ()
   "Hook function to update the hello buffer when it is switched to."
index 963253c972656e2fe67e44b424e2397e69048da8..3e20b8c7afc68e6b9d56a709ecc74283b173ae38 100644 (file)
@@ -104,7 +104,7 @@ not appear in the pop-up buffer.
           (copy-sequence minibuffer-prompt-properties)
           'face))
         ;; Build the keymap with our bindings
-        (minibuffer-map (notmuch-jump--make-keymap action-map))
+        (minibuffer-map (notmuch-jump--make-keymap action-map prompt))
         ;; The bindings save the the action in notmuch-jump--action
         (notmuch-jump--action nil))
     ;; Read the action
@@ -161,18 +161,47 @@ buffer."
     (set-keymap-parent map minibuffer-local-map)
     ;; Make this like a special-mode keymap, with no self-insert-command
     (suppress-keymap map)
+    (define-key map (kbd "DEL") 'exit-minibuffer)
     map)
   "Base keymap for notmuch-jump's minibuffer keymap.")
 
-(defun notmuch-jump--make-keymap (action-map)
+(defun notmuch-jump--make-keymap (action-map prompt)
   "Translate ACTION-MAP into a minibuffer keymap."
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map notmuch-jump-minibuffer-map)
     (dolist (action action-map)
-      (define-key map (first action)
-       `(lambda () (interactive)
-          (setq notmuch-jump--action ',(third action))
-          (exit-minibuffer))))
+      (if (= (length (first action)) 1)
+         (define-key map (first action)
+           `(lambda () (interactive)
+              (setq notmuch-jump--action ',(third action))
+              (exit-minibuffer)))))
+    ;; By doing this in two passes (and checking if we already have a
+    ;; binding) we avoid problems if the user specifies a binding which
+    ;; is a prefix of another binding.
+    (dolist (action action-map)
+      (if (> (length (first action)) 1)
+         (let* ((key (elt (first action) 0))
+                (keystr (string key))
+                (new-prompt (concat prompt (format-kbd-macro keystr) " "))
+                (action-submap nil))
+           (unless (lookup-key map keystr)
+             (dolist (act action-map)
+               (when (= key (elt (first act) 0))
+                 (push (list (substring (first act) 1)
+                             (second act)
+                             (third act))
+                       action-submap)))
+             ;; We deal with backspace specially
+             (push (list (kbd "DEL")
+                         "Backup"
+                         (apply-partially #'notmuch-jump action-map prompt))
+                   action-submap)
+             (setq action-submap (nreverse action-submap))
+             (define-key map keystr
+               `(lambda () (interactive)
+                  (setq notmuch-jump--action
+                        ',(apply-partially #'notmuch-jump action-submap new-prompt))
+                  (exit-minibuffer)))))))
     map))
 
 ;;
index 23bd81c1d0e7251d69506ea0564e5ab489b1c647..337b20ace74f36b91b5ce76614f7fc3552a54ac5 100644 (file)
 
 (custom-add-to-group 'notmuch-send 'message 'custom-group)
 
+(defgroup notmuch-tag nil
+  "Tags and tagging in Notmuch."
+  :group 'notmuch)
+
 (defgroup notmuch-crypto nil
   "Processing and display of cryptographic MIME parts."
   :group 'notmuch)
   "Running external commands from within Notmuch."
   :group 'notmuch)
 
+(defgroup notmuch-address nil
+  "Address completion."
+  :group 'notmuch)
+
 (defgroup notmuch-faces nil
   "Graphical attributes for displaying text"
   :group 'notmuch)
@@ -148,6 +156,7 @@ For example, if you wanted to remove an \"inbox\" tag and add an
     (define-key map "z" 'notmuch-tree)
     (define-key map "m" 'notmuch-mua-new-mail)
     (define-key map "=" 'notmuch-refresh-this-buffer)
+    (define-key map (kbd "M-=") 'notmuch-refresh-all-buffers)
     (define-key map "G" 'notmuch-poll-and-refresh-this-buffer)
     (define-key map "j" 'notmuch-jump-search)
     map)
@@ -414,10 +423,8 @@ of its command symbol."
   "Refresh the current buffer."
   (interactive)
   (when notmuch-buffer-refresh-function
-    (if (commandp notmuch-buffer-refresh-function)
-       ;; Pass prefix argument, etc.
-       (call-interactively notmuch-buffer-refresh-function)
-      (funcall notmuch-buffer-refresh-function))))
+    ;; Pass prefix argument, etc.
+    (call-interactively notmuch-buffer-refresh-function)))
 
 (defun notmuch-poll-and-refresh-this-buffer ()
   "Invoke `notmuch-poll' to import mail, then refresh the current buffer."
@@ -425,6 +432,21 @@ of its command symbol."
   (notmuch-poll)
   (notmuch-refresh-this-buffer))
 
+(defun notmuch-refresh-all-buffers ()
+  "Invoke `notmuch-refresh-this-buffer' on all notmuch major-mode buffers.
+
+The buffers are silently refreshed, i.e. they are not forced to
+be displayed."
+  (interactive)
+  (dolist (buffer (buffer-list))
+    (let ((buffer-mode (buffer-local-value 'major-mode buffer)))
+      (when (memq buffer-mode '(notmuch-show-mode
+                               notmuch-tree-mode
+                               notmuch-search-mode
+                               notmuch-hello-mode))
+       (with-current-buffer buffer
+         (notmuch-refresh-this-buffer))))))
+
 (defun notmuch-prettify-subject (subject)
   ;; This function is used by `notmuch-search-process-filter' which
   ;; requires that we not disrupt its' matching state.
index a754b60c7ea3d828202b89482cc52c5785cd6599..1551e8b649102ccdfecad9a2ef278949bfb3d702 100644 (file)
@@ -250,7 +250,7 @@ If CREATE is non-nil then create the folder if necessary."
       ;; how to deal with it.
       (error
        (let ((response (notmuch-read-char-choice
-                       "Insert failed: (r)etry, (c)reate folder, (i)gnore, or  (e)dit the header? "
+                       "Insert failed: (r)etry, (c)reate folder, (i)gnore, or (e)dit the header? "
                        '(?r ?c ?i ?e))))
         (case response
               (?r (notmuch-maildir-fcc-with-notmuch-insert fcc-header))
@@ -276,7 +276,7 @@ If CREATE is non-nil then create the folder if necessary."
 (defun notmuch-maildir-fcc-make-uniq-maildir-id ()
    (let* ((ftime (float-time))
          (microseconds (mod (* 1000000 ftime) 1000000))
-         (hostname (notmuch-maildir-fcc-host-fixer system-name)))
+         (hostname (notmuch-maildir-fcc-host-fixer (system-name))))
      (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))
      (format "%d.%d_%d_%d.%s"
             ftime
index 55bc267205756392fdbd6f243a420e0762b6c0a5..93747b1cb280c94ded422145b04a94094cf76dd9 100644 (file)
 
 (require 'notmuch-lib)
 (require 'notmuch-address)
+(require 'notmuch-draft)
 
 (eval-when-compile (require 'cl))
 
 (declare-function notmuch-show-insert-body "notmuch-show" (msg body depth))
 (declare-function notmuch-fcc-header-setup "notmuch-maildir-fcc" ())
 (declare-function notmuch-maildir-message-do-fcc "notmuch-maildir-fcc" ())
+(declare-function notmuch-draft-postpone "notmuch-draft" ())
+(declare-function notmuch-draft-save "notmuch-draft" ())
 
 ;;
 
@@ -251,6 +254,10 @@ mutiple parts get a header."
                       (notmuch-show-max-text-part-size 0)
                       ;; Insert headers for parts as appropriate for replying.
                       (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
+                      ;; Ensure that any encrypted parts are
+                      ;; decrypted during the generation of the reply
+                      ;; text.
+                      (notmuch-show-process-crypto process-crypto)
                       ;; Don't indent multipart sub-parts.
                       (notmuch-show-indent-multipart nil))
                    ;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
@@ -285,6 +292,8 @@ mutiple parts get a header."
 
 (define-key notmuch-message-mode-map (kbd "C-c C-c") #'notmuch-mua-send-and-exit)
 (define-key notmuch-message-mode-map (kbd "C-c C-s") #'notmuch-mua-send)
+(define-key notmuch-message-mode-map (kbd "C-c C-p") #'notmuch-draft-postpone)
+(define-key notmuch-message-mode-map (kbd "C-x C-s") #'notmuch-draft-save)
 
 (defun notmuch-mua-pop-to-buffer (name switch-function)
   "Pop to buffer NAME, and warn if it already exists and is
@@ -490,15 +499,64 @@ will be addressed to all recipients of the source message."
     (notmuch-mua-reply query-string sender reply-all)
     (deactivate-mark)))
 
+(defun notmuch-mua-check-no-misplaced-secure-tag ()
+  "Query user if there is a misplaced secure mml tag.
+
+Emacs message-send will (probably) ignore a secure mml tag unless
+it is at the start of the body. Returns t if there is no such
+tag, or the user confirms they mean it."
+  (save-excursion
+    (let ((body-start (progn (message-goto-body) (point))))
+      (goto-char (point-max))
+      (or
+       ;; We are always fine if there is no secure tag.
+       (not (search-backward "<#secure" nil 't))
+       ;; There is a secure tag, so it must be at the start of the
+       ;; body, with no secure tag earlier (i.e., in the headers).
+       (and (= (point) body-start)
+           (not (search-backward "<#secure" nil 't)))
+       ;; The user confirms they means it.
+       (yes-or-no-p "\
+There is a <#secure> tag not at the start of the body. It is
+likely that the message will be sent unsigned and unencrypted.
+Really send? ")))))
+
+(defun notmuch-mua-check-secure-tag-has-newline ()
+  "Query if the secure mml tag has a newline following it.
+
+Emacs message-send will (probably) ignore a correctly placed
+secure mml tag unless it is followed by a newline. Returns t if
+any secure tag is followed by a newline, or the user confirms
+they mean it."
+  (save-excursion
+    (message-goto-body)
+    (or
+     ;; There is no (correctly placed) secure tag.
+     (not (looking-at "<#secure"))
+     ;; The secure tag is followed by a newline.
+     (looking-at "<#secure[^\n>]*>\n")
+     ;; The user confirms they means it.
+     (yes-or-no-p "\
+The <#secure> tag at the start of the body is not followed by a
+newline. It is likely that the message will be sent unsigned and
+unencrypted.  Really send? "))))
+
+(defun notmuch-mua-send-common (arg &optional exit)
+  (interactive "P")
+  (when (and (notmuch-mua-check-no-misplaced-secure-tag)
+            (notmuch-mua-check-secure-tag-has-newline))
+    (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
+         (if exit
+             (message-send-and-exit arg)
+           (message-send arg)))))
+
 (defun notmuch-mua-send-and-exit (&optional arg)
   (interactive "P")
-  (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
-       (message-send-and-exit arg)))
+  (notmuch-mua-send-common arg 't))
 
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
-  (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
-       (message-send arg)))
+  (notmuch-mua-send-common arg))
 
 (defun notmuch-mua-kill-buffer ()
   (interactive)
index e7d16f81da5fd6fcab37cbb6b85d77fed62b9143..aafdd3d77282af3ade478c7c6d65f1951e483b0d 100644 (file)
@@ -38,6 +38,7 @@
 (require 'notmuch-mua)
 (require 'notmuch-crypto)
 (require 'notmuch-print)
+(require 'notmuch-draft)
 
 (declare-function notmuch-call-notmuch-process "notmuch" (&rest args))
 (declare-function notmuch-search-next-thread "notmuch" nil)
@@ -50,6 +51,7 @@
                  (&optional query query-context target buffer-name open-target))
 (declare-function notmuch-tree-get-message-properties "notmuch-tree" nil)
 (declare-function notmuch-read-query "notmuch" (prompt))
+(declare-function notmuch-draft-resume "notmuch-draft" (id))
 
 (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")
   "Headers that should be shown in a message, in this order.
@@ -245,6 +247,19 @@ every user interaction with notmuch."
   :type 'function
   :group 'notmuch-show)
 
+(defcustom notmuch-show-imenu-indent nil
+  "Should Imenu display messages indented.
+
+By default, Imenu (see Info node `(emacs) Imenu') in a
+notmuch-show buffer displays all messages straight.  This is
+because the default Emacs frontend for Imenu makes it difficult
+to select an Imenu entry with spaces in front.  Other imenu
+frontends such as counsel-imenu does not have this limitation.
+In these cases, Imenu entries can be indented to reflect the
+position of the message in the thread."
+  :type 'boolean
+  :group 'notmuch-show)
+
 (defmacro with-current-notmuch-show-message (&rest body)
   "Evaluate body with current buffer set to the text of current message"
   `(save-excursion
@@ -328,7 +343,7 @@ operation on the contents of the current buffer."
     (with-temp-buffer
       (insert all)
       (if indenting
-         (indent-rigidly (point-min) (point-max) (- depth)))
+         (indent-rigidly (point-min) (point-max) (- (* notmuch-show-indent-messages-width depth))))
       ;; Remove the original header.
       (goto-char (point-min))
       (re-search-forward "^$" (point-max) nil)
@@ -907,7 +922,7 @@ will return nil if the CID is unknown or cannot be retrieved."
        (narrow-to-region part-beg part-end)
        (delete-region part-beg part-end)
        (apply #'notmuch-show-insert-bodypart-internal part-args)
-       (indent-rigidly part-beg part-end depth))
+       (indent-rigidly part-beg part-end (* notmuch-show-indent-messages-width depth)))
       (goto-char part-end)
       (delete-char 1)
       (notmuch-show-record-part-information (second part-args)
@@ -1225,7 +1240,15 @@ matched."
   (interactive "sNotmuch show: \nP")
   (let ((buffer-name (generate-new-buffer-name
                      (or buffer-name
-                         (concat "*notmuch-" thread-id "*")))))
+                         (concat "*notmuch-" thread-id "*"))))
+       ;; We override mm-inline-override-types to stop application/*
+       ;; parts from being displayed unless the user has customized
+       ;; it themselves.
+       (mm-inline-override-types
+        (if (equal mm-inline-override-types
+                   (eval (car (get 'mm-inline-override-types 'standard-value))))
+            (cons "application/*" mm-inline-override-types)
+          mm-inline-override-types)))
     (switch-to-buffer (get-buffer-create buffer-name))
     ;; No need to track undo information for this buffer.
     (setq buffer-undo-list t)
@@ -1263,6 +1286,18 @@ matched."
        (message "No messages matched the query!")
        nil))))
 
+(defun notmuch-show--build-queries (thread context)
+  "Return a list of queries to try for this search.
+
+THREAD and CONTEXT are both strings, though CONTEXT may be nil.
+When CONTEXT is not nil, the first query is the conjunction of it
+and THREAD.  The next query is THREAD alone, and serves as a
+fallback if the prior matches no messages."
+  (let (queries)
+    (push (list thread) queries)
+    (if context (push (list thread "and (" context ")") queries))
+    queries))
+
 (defun notmuch-show--build-buffer (&optional state)
   "Display messages matching the current buffer context.
 
@@ -1270,25 +1305,20 @@ Apply the previously saved STATE if supplied, otherwise show the
 first relevant message.
 
 If no messages match the query return NIL."
-  (let* ((basic-args (list notmuch-show-thread-id))
-        (args (if notmuch-show-query-context
-                  (append (list "\'") basic-args
-                          (list "and (" notmuch-show-query-context ")\'"))
-                (append (list "\'") basic-args (list "\'"))))
-        (cli-args (cons "--exclude=false"
+  (let* ((cli-args (cons "--exclude=false"
                         (when notmuch-show-elide-non-matching-messages
                           (list "--entire-thread=false"))))
-
-        (forest (or (notmuch-query-get-threads (append cli-args args))
-                    ;; If a query context reduced the number of
-                    ;; results to zero, try again without it.
-                    (and notmuch-show-query-context
-                         (notmuch-query-get-threads (append cli-args basic-args)))))
-
+        (queries (notmuch-show--build-queries
+                  notmuch-show-thread-id notmuch-show-query-context))
+        (forest nil)
         ;; Must be reset every time we are going to start inserting
         ;; messages into the buffer.
         (notmuch-show-previous-subject ""))
-
+    ;; Use results from the first query that returns some.
+    (while (and (not forest) queries)
+      (setq forest (notmuch-query-get-threads
+                   (append cli-args (list "'") (car queries) (list "'"))))
+      (setq queries (cdr queries)))
     (when forest
       (notmuch-show-insert-forest forest)
 
@@ -1319,8 +1349,13 @@ If no messages match the query return NIL."
 
 This includes:
  - the list of open messages,
- - the current message."
-  (list (notmuch-show-get-message-id) (notmuch-show-get-message-ids-for-open-messages)))
+ - the combination of current message id with/for each visible window."
+  (let* ((win-list (get-buffer-window-list (current-buffer) nil t))
+        (win-id-combo (mapcar (lambda (win)
+                                (with-selected-window win
+                                  (list win (notmuch-show-get-message-id))))
+                              win-list)))
+    (list win-id-combo (notmuch-show-get-message-ids-for-open-messages))))
 
 (defun notmuch-show-get-query ()
   "Return the current query in this show buffer"
@@ -1347,8 +1382,8 @@ This includes:
 This includes:
  - opening the messages previously opened,
  - closing all other messages,
- - moving to the correct current message."
-  (let ((current (car state))
+ - moving to the correct current message in every displayed window."
+  (let ((win-msg-alist (car state))
        (open (cadr state)))
 
     ;; Open those that were open.
@@ -1357,8 +1392,10 @@ This includes:
                                           (member (notmuch-show-get-message-id) open))
          until (not (notmuch-show-goto-message-next)))
 
-    ;; Go to the previously open message.
-    (notmuch-show-goto-message current)))
+    (dolist (win-msg-pair win-msg-alist)
+      (with-selected-window (car win-msg-pair)
+       ;; Go to the previously open message in this window
+       (notmuch-show-goto-message (cadr win-msg-pair))))))
 
 (defun notmuch-show-refresh-view (&optional reset-state)
   "Refresh the current view.
@@ -1431,8 +1468,10 @@ reset based on the original query."
     (define-key map "|" 'notmuch-show-pipe-message)
     (define-key map "w" 'notmuch-show-save-attachments)
     (define-key map "V" 'notmuch-show-view-raw-message)
+    (define-key map "e" 'notmuch-show-resume-message)
     (define-key map "c" 'notmuch-show-stash-map)
     (define-key map "h" 'notmuch-show-toggle-visibility-headers)
+    (define-key map "k" 'notmuch-tag-jump)
     (define-key map "*" 'notmuch-show-tag-all)
     (define-key map "-" 'notmuch-show-remove-tag)
     (define-key map "+" 'notmuch-show-add-tag)
@@ -1490,7 +1529,11 @@ All currently available key bindings:
 \\{notmuch-show-mode-map}"
   (setq notmuch-buffer-refresh-function #'notmuch-show-refresh-view)
   (setq buffer-read-only t
-       truncate-lines t))
+       truncate-lines t)
+  (setq imenu-prev-index-position-function
+        #'notmuch-show-imenu-prev-index-position-function)
+  (setq imenu-extract-index-name-function
+        #'notmuch-show-imenu-extract-index-name-function))
 
 (defun notmuch-tree-from-show-current-query ()
   "Call notmuch tree with the current query"
@@ -1648,6 +1691,9 @@ current thread."
 (defun notmuch-show-get-date ()
   (notmuch-show-get-header :Date))
 
+(defun notmuch-show-get-timestamp ()
+  (notmuch-show-get-prop :timestamp))
+
 (defun notmuch-show-get-from ()
   (notmuch-show-get-header :From))
 
@@ -1967,6 +2013,11 @@ to show, nil otherwise."
     (setq buffer-read-only t)
     (view-buffer buf 'kill-buffer-if-not-modified)))
 
+(defun notmuch-show-resume-message ()
+  "Resume EDITING the current draft message."
+  (interactive)
+  (notmuch-draft-resume (notmuch-show-get-message-id)))
+
 (put 'notmuch-show-pipe-message 'notmuch-doc
      "Pipe the contents of the current message to a command.")
 (put 'notmuch-show-pipe-message 'notmuch-prefix-doc
@@ -2208,10 +2259,17 @@ thread from search."
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-cc)))
 
-(defun notmuch-show-stash-date ()
-  "Copy date of current message to kill-ring."
-  (interactive)
-  (notmuch-common-do-stash (notmuch-show-get-date)))
+(put 'notmuch-show-stash-date 'notmuch-prefix-doc
+     "Copy timestamp of current message to kill-ring.")
+(defun notmuch-show-stash-date (&optional stash-timestamp)
+  "Copy date of current message to kill-ring.
+
+If invoked with a prefix argument, copy timestamp of current
+message to kill-ring."
+  (interactive "P")
+  (if stash-timestamp
+      (notmuch-common-do-stash (format "%d" (notmuch-show-get-timestamp)))
+    (notmuch-common-do-stash (notmuch-show-get-date))))
 
 (defun notmuch-show-stash-filename ()
   "Copy filename of current message to kill-ring."
@@ -2424,6 +2482,26 @@ the new buffer."
                          (mailcap-mime-types) nil nil nil nil "text/plain")))
   (notmuch-show-apply-to-current-part-handle #'notmuch-show--mm-display-part mime-type))
 
+(defun notmuch-show-imenu-prev-index-position-function ()
+  "Move point to previous message in notmuch-show buffer.
+This function is used as a value for
+`imenu-prev-index-position-function'."
+  (if (bobp)
+      nil
+    (notmuch-show-previous-message)
+    t))
+
+(defun notmuch-show-imenu-extract-index-name-function ()
+  "Return imenu name for line at point.
+This function is used as a value for
+`imenu-extract-index-name-function'.  Point should be at the
+beginning of the line."
+  (back-to-indentation)
+  (buffer-substring-no-properties (if notmuch-show-imenu-indent
+                                     (line-beginning-position)
+                                   (point))
+                                 (line-end-position)))
+
 (provide 'notmuch-show)
 
 ;;; notmuch-show.el ends here
index 6c8b6a758a696b060d8d0733039118fa88be8ce8..09d182dfb818d6844efdab4ca3d626e9f2dd7d89 100644 (file)
 (require 'crm)
 (require 'notmuch-lib)
 
+(declare-function notmuch-search-tag "notmuch" tag-changes)
+(declare-function notmuch-show-tag "notmuch-show" tag-changes)
+(declare-function notmuch-tree-tag "notmuch-tree" tag-changes)
+
+(autoload 'notmuch-jump "notmuch-jump")
+
+(define-widget 'notmuch-tag-key-type 'list
+  "A single key tagging binding."
+  :format "%v"
+  :args '((list :inline t
+               :format "%v"
+               (key-sequence :tag "Key")
+               (radio :tag "Tag operations" (repeat :tag "Tag list" (string :format "%v" :tag "change"))
+                      (variable :tag "Tag variable"))
+               (string :tag "Name"))))
+
+(defcustom notmuch-tagging-keys
+  `((,(kbd "a") notmuch-archive-tags "Archive")
+    (,(kbd "u") notmuch-show-mark-read-tags "Mark read")
+    (,(kbd "f") ("+flagged") "Flag")
+    (,(kbd "s") ("+spam" "-inbox") "Mark as spam")
+    (,(kbd "d") ("+deleted" "-inbox") "Delete"))
+  "A list of keys and corresponding tagging operations.
+
+For each key (or key sequence) you can specify a sequence of
+tagging operations to apply, or a variable which contains a list
+of tagging operations such as `notmuch-archive-tags'. The final
+element is a name for this tagging operation. If the name is
+omitted or empty then the list of tag changes, or the variable
+name is used as the name.
+
+The key `notmuch-tag-jump-reverse-key' (k by default) should not
+be used (either as a key, or as the start of a key sequence) as
+it is already bound: it switches the menu to a menu of the
+reverse tagging operations. The reverse of a tagging operation is
+the same list of individual tag-ops but with `+tag` replaced by
+`-tag` and vice versa.
+
+If setting this variable outside of customize then it should be a
+list of triples (lists of three elements). Each triple should be
+of the form (key-binding tagging-operations name). KEY-BINDING
+can be a single character or a key sequence; TAGGING-OPERATIONS
+should either be a list of individual tag operations each of the
+form `+tag` or `-tag`, or the variable name of a variable that is
+a list of tagging operations; NAME should be a name for the
+tagging operation, if omitted or empty than then name is taken
+from TAGGING-OPERATIONS."
+  :tag "List of tagging bindings"
+  :type '(repeat notmuch-tag-key-type)
+  :group 'notmuch-tag)
+
 (define-widget 'notmuch-tag-format-type 'lazy
   "Customize widget for notmuch-tag-format and friends"
   :type '(alist :key-type (regexp :tag "Tag")
@@ -64,7 +115,12 @@ Used in the default value of `notmuch-tag-formats`."
   :group 'notmuch-faces)
 
 (defface notmuch-tag-flagged
-  '((t :foreground "blue"))
+  '((((class color)
+      (background dark))
+     (:foreground "LightBlue1"))
+    (((class color)
+      (background light))
+     (:foreground "blue")))
   "Face used for the flagged tag.
 
 Used in the default value of `notmuch-tag-formats`."
@@ -437,6 +493,55 @@ begin with a \"+\" or a \"-\". If REVERSE is non-nil, replace all
                s)))
          tags))
 
+(defvar notmuch-tag-jump-reverse-key "k"
+  "The key in tag-jump to switch to the reverse tag changes.")
+
+(defun notmuch-tag-jump (reverse)
+  "Create a jump menu for tagging operations.
+
+Creates and displays a jump menu for the tagging operations
+specified in `notmuch-tagging-keys'. If REVERSE is set then it
+offers a menu of the reverses of the operations specified in
+`notmuch-tagging-keys'; i.e. each `+tag` is replaced by `-tag`
+and vice versa."
+  ;; In principle this function is simple, but it has to deal with
+  ;; lots of cases: different modes (search/show/tree), whether a name
+  ;; is specified, whether the tagging operations is a list of
+  ;; tag-ops, or a symbol that evaluates to such a list, and whether
+  ;; REVERSE is specified.
+  (interactive "P")
+  (let (action-map)
+    (dolist (binding notmuch-tagging-keys)
+      (let* ((tag-function (case major-mode
+                            (notmuch-search-mode #'notmuch-search-tag)
+                            (notmuch-show-mode #'notmuch-show-tag)
+                            (notmuch-tree-mode #'notmuch-tree-tag)))
+            (key (first binding))
+            (forward-tag-change (if (symbolp (second binding))
+                                    (symbol-value (second binding))
+                                  (second binding)))
+            (tag-change (if reverse
+                            (notmuch-tag-change-list forward-tag-change 't)
+                          forward-tag-change))
+            (name (or (and (not (string= (third binding) ""))
+                           (third binding))
+                      (and (symbolp (second binding))
+                           (symbol-name (second binding)))))
+            (name-string (if name
+                             (if reverse (concat "Reverse " name)
+                               name)
+                           (mapconcat #'identity tag-change " "))))
+       (push (list key name-string
+                    `(lambda () (,tag-function ',tag-change)))
+             action-map)))
+    (push (list notmuch-tag-jump-reverse-key
+               (if reverse
+                   "Forward tag changes "
+                 "Reverse tag changes")
+               (apply-partially 'notmuch-tag-jump (not reverse)))
+         action-map)
+    (setq action-map (nreverse action-map))
+    (notmuch-jump action-map "Tag: ")))
 
 ;;
 
index 658c4f90870dfe4de726514b41908b53dde85661..d4d407616deec11d9f278ccbfa5b03f0cd11972c 100644 (file)
@@ -209,6 +209,13 @@ open (if the message pane is closed it does nothing)."
        (with-selected-window notmuch-tree-message-window
         (call-interactively #',func)))))
 
+(defun notmuch-tree-inherit-from-message-pane (sym)
+  "Return value of SYM in message-pane if open, or tree-pane if not"
+  (if (window-live-p notmuch-tree-message-window)
+      (with-selected-window notmuch-tree-message-window
+       (symbol-value sym))
+    (symbol-value sym)))
+
 (defun notmuch-tree-button-activate (&optional button)
   "Activate BUTTON or button at point
 
@@ -226,8 +233,10 @@ FUNC."
   `(lambda ()
       ,(concat "(Close message pane and) " (documentation func t))
      (interactive)
-     (notmuch-tree-close-message-window)
-     (call-interactively #',func)))
+     (let ((notmuch-show-process-crypto
+           (notmuch-tree-inherit-from-message-pane 'notmuch-show-process-crypto)))
+       (notmuch-tree-close-message-window)
+       (call-interactively #',func))))
 
 (defvar notmuch-tree-mode-map
   (let ((map (make-sparse-keymap)))
@@ -257,7 +266,7 @@ FUNC."
     (define-key map (kbd "M-TAB") (notmuch-tree-to-message-pane #'notmuch-show-previous-button))
     (define-key map (kbd "<backtab>")  (notmuch-tree-to-message-pane #'notmuch-show-previous-button))
     (define-key map (kbd "TAB") (notmuch-tree-to-message-pane #'notmuch-show-next-button))
-    (define-key map "e" (notmuch-tree-to-message-pane #'notmuch-tree-button-activate))
+    (define-key map "$" (notmuch-tree-to-message-pane #'notmuch-show-toggle-process-crypto))
 
     ;; bindings from show (or elsewhere) but we close the message pane first.
     (define-key map "f" (notmuch-tree-close-message-pane-and #'notmuch-show-forward-message))
@@ -271,7 +280,6 @@ FUNC."
     (define-key map "x" 'notmuch-tree-quit)
     (define-key map "A" 'notmuch-tree-archive-thread)
     (define-key map "a" 'notmuch-tree-archive-message-then-next)
-    (define-key map "=" 'notmuch-tree-refresh-view)
     (define-key map "z" 'notmuch-tree-to-tree)
     (define-key map "n" 'notmuch-tree-next-matching-message)
     (define-key map "p" 'notmuch-tree-prev-matching-message)
@@ -279,11 +287,13 @@ FUNC."
     (define-key map "P" 'notmuch-tree-prev-message)
     (define-key map (kbd "M-p") 'notmuch-tree-prev-thread)
     (define-key map (kbd "M-n") 'notmuch-tree-next-thread)
+    (define-key map "k" 'notmuch-tag-jump)
     (define-key map "-" 'notmuch-tree-remove-tag)
     (define-key map "+" 'notmuch-tree-add-tag)
     (define-key map "*" 'notmuch-tree-tag-thread)
     (define-key map " " 'notmuch-tree-scroll-or-next)
     (define-key map (kbd "DEL") 'notmuch-tree-scroll-message-window-back)
+    (define-key map "e" 'notmuch-tree-resume-message)
     map))
 (fset 'notmuch-tree-mode-map notmuch-tree-mode-map)
 
@@ -364,12 +374,18 @@ updated."
 (defun notmuch-tree-tag-update-display (&optional tag-changes)
   "Update display for TAG-CHANGES to current message.
 
-Does NOT change the database."
+Updates the message in the message pane if appropriate, but does
+NOT change the database."
   (let* ((current-tags (notmuch-tree-get-tags))
-        (new-tags (notmuch-update-tags current-tags tag-changes)))
+        (new-tags (notmuch-update-tags current-tags tag-changes))
+        (tree-msg-id (notmuch-tree-get-message-id)))
     (unless (equal current-tags new-tags)
       (notmuch-tree-set-tags new-tags)
-      (notmuch-tree-refresh-result))))
+      (notmuch-tree-refresh-result)
+      (when (window-live-p notmuch-tree-message-window)
+       (with-selected-window notmuch-tree-message-window
+         (when (string= tree-msg-id (notmuch-show-get-message-id))
+           (notmuch-show-update-tags new-tags)))))))
 
 (defun notmuch-tree-tag (tag-changes)
   "Change tags for the current message"
@@ -390,6 +406,15 @@ Does NOT change the database."
    (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-")))
   (notmuch-tree-tag tag-changes))
 
+(defun notmuch-tree-resume-message ()
+  "Resume EDITING the current draft message."
+  (interactive)
+  (notmuch-tree-close-message-window)
+  (let ((id (notmuch-tree-get-message-id)))
+    (if id
+       (notmuch-draft-resume id)
+      (message "No message to resume!"))))
+
 ;; The next two functions close the message window before calling
 ;; notmuch-search or notmuch-tree but they do so after the user has
 ;; entered the query (in case the user was basing the query on
@@ -892,7 +917,7 @@ the same as for the function notmuch-tree."
     (notmuch-tag-clear-cache)
     (let ((proc (notmuch-start-notmuch
                 "notmuch-tree" (current-buffer) #'notmuch-tree-process-sentinel
-                "show" "--body=false" "--format=sexp"
+                "show" "--body=false" "--format=sexp" "--format-version=2"
                 message-arg search-args))
          ;; Use a scratch buffer to accumulate partial output.
          ;; This buffer will be killed by the sentinel, which
index 46f14fea1dd0ff112a57e64154cc5e5eeb19ab37..90af68e399b966da5a97f1718b42e9ba1a0a849e 100644 (file)
@@ -169,6 +169,7 @@ there will be called at other points of notmuch execution."
     (define-key map "t" 'notmuch-search-filter-by-tag)
     (define-key map "l" 'notmuch-search-filter)
     (define-key map [mouse-1] 'notmuch-search-show-thread)
+    (define-key map "k" 'notmuch-tag-jump)
     (define-key map "*" 'notmuch-search-tag-all)
     (define-key map "a" 'notmuch-search-archive-thread)
     (define-key map "-" 'notmuch-search-remove-tag)
@@ -312,7 +313,11 @@ there will be called at other points of notmuch execution."
   :group 'notmuch-faces)
 
 (defface notmuch-search-flagged-face
-  '((t
+  '((((class color)
+      (background dark))
+     (:foreground "LightBlue1"))
+    (((class color)
+      (background light))
      (:foreground "blue")))
   "Face used in search mode face for flagged threads.
 
@@ -369,7 +374,11 @@ Complete list of currently available key bindings:
   (set (make-local-variable 'scroll-preserve-screen-position) t)
   (add-to-invisibility-spec (cons 'ellipsis t))
   (setq truncate-lines t)
-  (setq buffer-read-only t))
+  (setq buffer-read-only t)
+  (setq imenu-prev-index-position-function
+        #'notmuch-search-imenu-prev-index-position-function)
+  (setq imenu-extract-index-name-function
+        #'notmuch-search-imenu-extract-index-name-function))
 
 (defun notmuch-search-get-result (&optional pos)
   "Return the result object for the thread at POS (or point).
@@ -397,17 +406,17 @@ returns nil"
     (next-single-property-change (or pos (point)) 'notmuch-search-result
                                 nil (point-max))))
 
-(defun notmuch-search-foreach-result (beg end function)
-  "Invoke FUNCTION for each result between BEG and END.
+(defun notmuch-search-foreach-result (beg end fn)
+  "Invoke FN for each result between BEG and END.
 
-FUNCTION should take one argument.  It will be applied to the
+FN should take one argument.  It will be applied to the
 character position of the beginning of each result that overlaps
 the region between points BEG and END.  As a special case, if (=
-BEG END), FUNCTION will be applied to the result containing point
+BEG END), FN will be applied to the result containing point
 BEG."
 
   (lexical-let ((pos (notmuch-search-result-beginning beg))
-               ;; End must be a marker in case function changes the
+               ;; End must be a marker in case fn changes the
                ;; text.
                (end (copy-marker end))
                ;; Make sure we examine at least one result, even if
@@ -418,7 +427,7 @@ BEG."
     ;; pos.
     (while (and pos (or (< pos end) first))
       (when (notmuch-search-get-result pos)
-       (funcall function pos))
+       (funcall fn pos))
       (setq pos (notmuch-search-result-end pos)
            first nil))))
 ;; Unindent the function argument of notmuch-search-foreach-result so
@@ -561,12 +570,15 @@ Returns (TAG-CHANGES REGION-BEGIN REGION-END)."
 See `notmuch-tag' for information on the format of TAG-CHANGES.
 When called interactively, this uses the region if the region is
 active.  When called directly, BEG and END provide the region.
-If these are nil or not provided, this applies to the thread at
-point.
+If these are nil or not provided, then, if the region is active
+this applied to all threads meeting the region, and if the region
+is inactive this applies to the thread at point.
 
 If ONLY-MATCHED is non-nil, only tag matched messages."
   (interactive (notmuch-search-interactive-tag-changes))
-  (unless (and beg end) (setq beg (point) end (point)))
+  (unless (and beg end)
+    (setq beg (car (notmuch-search-interactive-region))
+         end (cadr (notmuch-search-interactive-region))))
   (let ((search-string (notmuch-search-find-stable-query-region
                        beg end only-matched)))
     (notmuch-tag search-string tag-changes)
@@ -900,9 +912,10 @@ PROMPT is the string to prompt with."
                 (process-lines notmuch-command "search" "--output=tags" "*")))
        (completions
         (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:"
-                      "subject:" "attachment:" "mimetype:")
+                      "subject:" "attachment:")
                 (mapcar (lambda (tag) (concat "tag:" tag)) all-tags)
-                (mapcar (lambda (tag) (concat "is:" tag)) all-tags))))
+                (mapcar (lambda (tag) (concat "is:" tag)) all-tags)
+                (mapcar (lambda (mimetype) (concat "mimetype:" mimetype)) (mailcap-mime-types)))))
     (let ((keymap (copy-keymap minibuffer-local-map))
          (current-query (case major-mode
                           (notmuch-search-mode (notmuch-search-get-query))
@@ -933,7 +946,7 @@ PROMPT is the string to prompt with."
 
 (put 'notmuch-search 'notmuch-doc "Search for messages.")
 ;;;###autoload
-(defun notmuch-search (&optional query oldest-first target-thread target-line)
+(defun notmuch-search (&optional query oldest-first target-thread target-line no-display)
   "Display threads matching QUERY in a notmuch-search buffer.
 
 If QUERY is nil, it is read interactively from the minibuffer.
@@ -944,6 +957,9 @@ Other optional parameters are used as follows:
                  current if it appears in the search results.
   TARGET-LINE: The line number to move to if the target thread does not
                appear in the search results.
+  NO-DISPLAY: Do not try to foreground the search results buffer. If it is
+              already foregrounded i.e. displayed in a window, this has no
+              effect, meaning the buffer will remain visible.
 
 When called interactively, this will prompt for a query and use
 the configured default sort order."
@@ -957,7 +973,9 @@ the configured default sort order."
 
   (let* ((query (or query (notmuch-read-query "Notmuch search: ")))
         (buffer (get-buffer-create (notmuch-search-buffer-title query))))
-    (switch-to-buffer buffer)
+    (if no-display
+       (set-buffer buffer)
+      (switch-to-buffer buffer))
     (notmuch-search-mode)
     ;; Don't track undo information for this buffer
     (set 'buffer-undo-list t)
@@ -993,17 +1011,18 @@ the configured default sort order."
 (defun notmuch-search-refresh-view ()
   "Refresh the current view.
 
-Kills the current buffer and runs a new search with the same
+Erases the current buffer and runs a new search with the same
 query string as the current search. If the current thread is in
 the new search results, then point will be placed on the same
 thread. Otherwise, point will be moved to attempt to be in the
 same relative position within the new buffer."
+  (interactive)
   (let ((target-line (line-number-at-pos))
        (oldest-first notmuch-search-oldest-first)
        (target-thread (notmuch-search-find-thread-id 'bare))
        (query notmuch-search-query-string))
-    (notmuch-bury-or-kill-this-buffer)
-    (notmuch-search query oldest-first target-thread target-line)
+    ;; notmuch-search erases the current buffer.
+    (notmuch-search query oldest-first target-thread target-line t)
     (goto-char (point-min))))
 
 (defun notmuch-search-toggle-order ()
@@ -1079,8 +1098,8 @@ notmuch buffers exist, run `notmuch'."
 
     ;; Find the first notmuch buffer.
     (setq first (loop for buffer in (buffer-list)
-                    if (notmuch-interesting-buffer buffer)
-                    return buffer))
+                     if (notmuch-interesting-buffer buffer)
+                     return buffer))
 
     (if first
        ;; If the first one we found is any other than the starting
@@ -1089,6 +1108,23 @@ notmuch buffers exist, run `notmuch'."
          (switch-to-buffer first))
       (notmuch))))
 
+;;;; Imenu Support
+
+(defun notmuch-search-imenu-prev-index-position-function ()
+  "Move point to previous message in notmuch-search buffer.
+This function is used as a value for
+`imenu-prev-index-position-function'."
+  (notmuch-search-previous-thread))
+
+(defun notmuch-search-imenu-extract-index-name-function ()
+  "Return imenu name for line at point.
+This function is used as a value for
+`imenu-extract-index-name-function'.  Point should be at the
+beginning of the line."
+  (let ((subject (notmuch-search-find-subject))
+       (author (notmuch-search-find-authors)))
+    (format "%s (%s)" subject author)))
+
 (setq mail-user-agent 'notmuch-user-agent)
 
 (provide 'notmuch)
index 3d1030a567404bc88ad1f887f5c452240dcecfba..bf6e06494748d965a67dc33643b38a81f817e1a1 100644 (file)
@@ -1,5 +1,12 @@
 # -*- makefile -*-
 
+dir := lib
+
+# The (often-reused) $dir works fine within targets/prerequisites,
+# but cannot be used reliably within commands, so copy its value to a
+# variable that is not reused.
+lib := $(dir)
+
 ifeq ($(PLATFORM),MACOSX)
 LIBRARY_SUFFIX = dylib
 # On OS X, library version numbers go before suffix.
@@ -12,7 +19,7 @@ LIBRARY_SUFFIX = so
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
-LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)
+LIBRARY_LINK_FLAG = -shared -Wl,--version-script=$(lib)/notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)
 ifeq ($(PLATFORM),OPENBSD)
 LIBRARY_LINK_FLAG += -lc
 endif
@@ -23,19 +30,13 @@ endif
 endif
 endif
 
-dir := lib
-extra_cflags += -I$(srcdir)/$(dir) -fPIC
-
-# The (often-reused) $dir works fine within targets/prerequisites,
-# but cannot be used reliably within commands, so copy its value to a
-# variable that is not reused.
-lib := $(dir)
+extra_cflags += -I$(srcdir)/$(dir) -fPIC -fvisibility=hidden
+extra_cxxflags += -fvisibility-inlines-hidden
 
 libnotmuch_c_srcs =            \
        $(notmuch_compat_srcs)  \
        $(dir)/filenames.c      \
        $(dir)/string-list.c    \
-       $(dir)/libsha1.c        \
        $(dir)/message-file.c   \
        $(dir)/messages.c       \
        $(dir)/sha1.c           \
@@ -53,6 +54,7 @@ libnotmuch_cxx_srcs =         \
        $(dir)/query.cc         \
        $(dir)/query-fp.cc      \
        $(dir)/config.cc        \
+       $(dir)/regexp-fields.cc \
        $(dir)/thread.cc
 
 libnotmuch_modules := $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
@@ -60,11 +62,8 @@ libnotmuch_modules := $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
 $(dir)/libnotmuch.a: $(libnotmuch_modules)
        $(call quiet,AR) rcs $@ $^
 
-$(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym util/libutil.a parse-time-string/libparse-time-string.a
-       $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libutil.a parse-time-string/libparse-time-string.a
-
-notmuch.sym: $(srcdir)/$(dir)/notmuch.h $(libnotmuch_modules)
-       sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@
+$(dir)/$(LIBNAME): $(libnotmuch_modules) util/libnotmuch_util.a parse-time-string/libparse-time-string.a
+       $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
 
 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
        ln -sf $(LIBNAME) $@
@@ -85,5 +84,5 @@ install-$(dir): $(dir)/$(LIBNAME)
 
 SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
 CLEAN += $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME)
-CLEAN += $(dir)/$(LIBNAME) $(dir)/libnotmuch.a notmuch.sym
+CLEAN += $(dir)/$(LIBNAME) $(dir)/libnotmuch.a
 CLEAN += $(dir)/notmuch.h.gch
index ca71a92f6c26893d92cc1435d0713d4cc69e5d96..727b1d616f248f6aa3c5662985e0f69048a3c700 100644 (file)
 
 #include "notmuch-private.h"
 
-#include <xapian.h>
+#ifdef SILENCE_XAPIAN_DEPRECATION_WARNINGS
+#define XAPIAN_DEPRECATED(D) D
+#endif
 
-#pragma GCC visibility push(hidden)
+#include <xapian.h>
 
 /* Bit masks for _notmuch_database::features.  Features are named,
  * independent aspects of the database schema.
@@ -144,6 +146,31 @@ operator&=(_notmuch_features &a, _notmuch_features b)
     return a;
 }
 
+/*
+ * Configuration options for xapian database fields */
+typedef enum notmuch_field_flags {
+    NOTMUCH_FIELD_NO_FLAGS = 0,
+    NOTMUCH_FIELD_EXTERNAL = 1 << 0,
+    NOTMUCH_FIELD_PROBABILISTIC = 1 << 1,
+    NOTMUCH_FIELD_PROCESSOR = 1 << 2,
+} notmuch_field_flag_t;
+
+/*
+ * define bitwise operators to hide casts */
+inline notmuch_field_flag_t
+operator|(notmuch_field_flag_t a, notmuch_field_flag_t b)
+{
+    return static_cast<notmuch_field_flag_t>(
+       static_cast<unsigned>(a) | static_cast<unsigned>(b));
+}
+
+inline notmuch_field_flag_t
+operator&(notmuch_field_flag_t a, notmuch_field_flag_t b)
+{
+    return static_cast<notmuch_field_flag_t>(
+       static_cast<unsigned>(a) & static_cast<unsigned>(b));
+}
+
 #define NOTMUCH_QUERY_PARSER_FLAGS (Xapian::QueryParser::FLAG_BOOLEAN | \
                                    Xapian::QueryParser::FLAG_PHRASE | \
                                    Xapian::QueryParser::FLAG_LOVEHATE | \
@@ -179,14 +206,14 @@ struct _notmuch_database {
     unsigned long revision;
     const char *uuid;
 
+    /* Keep track of the number of times the database has been re-opened
+     * (or other global invalidations of notmuch's caching)
+     */
+    unsigned long view;
     Xapian::QueryParser *query_parser;
     Xapian::TermGenerator *term_gen;
     Xapian::ValueRangeProcessor *value_range_processor;
     Xapian::ValueRangeProcessor *date_range_processor;
-#if HAVE_XAPIAN_FIELD_PROCESSOR
-    Xapian::FieldProcessor *date_field_processor;
-    Xapian::FieldProcessor *query_field_processor;
-#endif
     Xapian::ValueRangeProcessor *last_mod_range_processor;
 };
 
@@ -219,6 +246,4 @@ _notmuch_database_get_terms_with_prefix (void *ctx, Xapian::TermIterator &i,
                                         Xapian::TermIterator &end,
                                         const char *prefix);
 
-#pragma GCC visibility pop
-
 #endif
index eddb780c69ebc76ab8870fb93dfb23d01e1a6176..5b13f5417118ce5282b5b148941e65cd22637cde 100644 (file)
@@ -21,6 +21,7 @@
 #include "database-private.h"
 #include "parse-time-vrp.h"
 #include "query-fp.h"
+#include "regexp-fields.h"
 #include "string-util.h"
 
 #include <iostream>
@@ -42,6 +43,7 @@ using namespace std;
 typedef struct {
     const char *name;
     const char *prefix;
+    notmuch_field_flag_t flags;
 } prefix_t;
 
 #define NOTMUCH_DATABASE_VERSION 3
@@ -247,57 +249,100 @@ typedef struct {
  * nearly universal to all mail messages).
  */
 
-static prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
-    { "type",                  "T" },
-    { "reference",             "XREFERENCE" },
-    { "replyto",               "XREPLYTO" },
-    { "directory",             "XDIRECTORY" },
-    { "file-direntry",         "XFDIRENTRY" },
-    { "directory-direntry",    "XDDIRENTRY" },
-};
-
-static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
-    { "thread",                        "G" },
-    { "tag",                   "K" },
-    { "is",                    "K" },
-    { "id",                    "Q" },
-    { "path",                  "P" },
-    { "property",              "XPROPERTY" },
+static const
+prefix_t prefix_table[] = {
+    /* name                    term prefix     flags */
+    { "type",                  "T",            NOTMUCH_FIELD_NO_FLAGS },
+    { "reference",             "XREFERENCE",   NOTMUCH_FIELD_NO_FLAGS },
+    { "replyto",               "XREPLYTO",     NOTMUCH_FIELD_NO_FLAGS },
+    { "directory",             "XDIRECTORY",   NOTMUCH_FIELD_NO_FLAGS },
+    { "file-direntry",         "XFDIRENTRY",   NOTMUCH_FIELD_NO_FLAGS },
+    { "directory-direntry",    "XDDIRENTRY",   NOTMUCH_FIELD_NO_FLAGS },
+    { "thread",                        "G",            NOTMUCH_FIELD_EXTERNAL },
+    { "tag",                   "K",            NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "is",                    "K",            NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "id",                    "Q",            NOTMUCH_FIELD_EXTERNAL },
+    { "mid",                   "Q",            NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "path",                  "P",            NOTMUCH_FIELD_EXTERNAL|
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "property",              "XPROPERTY",    NOTMUCH_FIELD_EXTERNAL },
     /*
      * Unconditionally add ':' to reduce potential ambiguity with
      * overlapping prefixes and/or terms that start with capital
      * letters. See Xapian document termprefixes.html for related
      * discussion.
      */
-    { "folder",                        "XFOLDER:" },
+    { "folder",                        "XFOLDER:",     NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+    { "date",                  NULL,           NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "query",                 NULL,           NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
+#endif
+    { "from",                  "XFROM",        NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROBABILISTIC |
+                                               NOTMUCH_FIELD_PROCESSOR },
+    { "to",                    "XTO",          NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROBABILISTIC },
+    { "attachment",            "XATTACHMENT",  NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROBABILISTIC },
+    { "mimetype",              "XMIMETYPE",    NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROBABILISTIC },
+    { "subject",               "XSUBJECT",     NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROBABILISTIC |
+                                               NOTMUCH_FIELD_PROCESSOR},
 };
 
-static prefix_t PROBABILISTIC_PREFIX[]= {
-    { "from",                  "XFROM" },
-    { "to",                    "XTO" },
-    { "attachment",            "XATTACHMENT" },
-    { "mimetype",              "XMIMETYPE"},
-    { "subject",               "XSUBJECT"},
-};
+static void
+_setup_query_field_default (const prefix_t *prefix, notmuch_database_t *notmuch)
+{
+    if (prefix->flags & NOTMUCH_FIELD_PROBABILISTIC)
+       notmuch->query_parser->add_prefix (prefix->name, prefix->prefix);
+    else
+       notmuch->query_parser->add_boolean_prefix (prefix->name, prefix->prefix);
+}
 
-const char *
-_find_prefix (const char *name)
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+static void
+_setup_query_field (const prefix_t *prefix, notmuch_database_t *notmuch)
 {
-    unsigned int i;
+    if (prefix->flags & NOTMUCH_FIELD_PROCESSOR) {
+       Xapian::FieldProcessor *fp;
 
-    for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) {
-       if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0)
-           return BOOLEAN_PREFIX_INTERNAL[i].prefix;
-    }
+       if (STRNCMP_LITERAL (prefix->name, "date") == 0)
+           fp = (new DateFieldProcessor())->release ();
+       else if (STRNCMP_LITERAL(prefix->name, "query") == 0)
+           fp = (new QueryFieldProcessor (*notmuch->query_parser, notmuch))->release ();
+       else
+           fp = (new RegexpFieldProcessor (prefix->name, prefix->flags,
+                                           *notmuch->query_parser, notmuch))->release ();
 
-    for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) {
-       if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0)
-           return BOOLEAN_PREFIX_EXTERNAL[i].prefix;
+       /* we treat all field-processor fields as boolean in order to get the raw input */
+       notmuch->query_parser->add_boolean_prefix (prefix->name, fp);
+    } else {
+       _setup_query_field_default (prefix, notmuch);
     }
+}
+#else
+static inline void
+_setup_query_field (const prefix_t *prefix, notmuch_database_t *notmuch)
+{
+    _setup_query_field_default (prefix, notmuch);
+}
+#endif
+
+const char *
+_find_prefix (const char *name)
+{
+    unsigned int i;
 
-    for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) {
-       if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0)
-           return PROBABILISTIC_PREFIX[i].prefix;
+    for (i = 0; i < ARRAY_SIZE (prefix_table); i++) {
+       if (strcmp (name, prefix_table[i].name) == 0)
+           return prefix_table[i].prefix;
     }
 
     INTERNAL_ERROR ("No prefix exists for '%s'\n", name);
@@ -959,6 +1004,7 @@ notmuch_database_open_verbose (const char *path,
 
     notmuch->mode = mode;
     notmuch->atomic_nesting = 0;
+    notmuch->view = 1;
     try {
        string last_thread_id;
        string last_mod;
@@ -1035,14 +1081,6 @@ notmuch_database_open_verbose (const char *path,
        notmuch->term_gen->set_stemmer (Xapian::Stem ("english"));
        notmuch->value_range_processor = new Xapian::NumberValueRangeProcessor (NOTMUCH_VALUE_TIMESTAMP);
        notmuch->date_range_processor = new ParseTimeValueRangeProcessor (NOTMUCH_VALUE_TIMESTAMP);
-#if HAVE_XAPIAN_FIELD_PROCESSOR
-       /* This currently relies on the query parser to pass anything
-        * with a .. to the range processor */
-       notmuch->date_field_processor = new DateFieldProcessor();
-       notmuch->query_parser->add_boolean_prefix("date", notmuch->date_field_processor);
-       notmuch->query_field_processor = new QueryFieldProcessor (*notmuch->query_parser, notmuch);
-       notmuch->query_parser->add_boolean_prefix("query", notmuch->query_field_processor);
-#endif
        notmuch->last_mod_range_processor = new Xapian::NumberValueRangeProcessor (NOTMUCH_VALUE_LAST_MOD, "lastmod:");
 
        notmuch->query_parser->set_default_op (Xapian::Query::OP_AND);
@@ -1053,15 +1091,11 @@ notmuch_database_open_verbose (const char *path,
        notmuch->query_parser->add_valuerangeprocessor (notmuch->date_range_processor);
        notmuch->query_parser->add_valuerangeprocessor (notmuch->last_mod_range_processor);
 
-       for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) {
-           prefix_t *prefix = &BOOLEAN_PREFIX_EXTERNAL[i];
-           notmuch->query_parser->add_boolean_prefix (prefix->name,
-                                                      prefix->prefix);
-       }
-
-       for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) {
-           prefix_t *prefix = &PROBABILISTIC_PREFIX[i];
-           notmuch->query_parser->add_prefix (prefix->name, prefix->prefix);
+       for (i = 0; i < ARRAY_SIZE (prefix_table); i++) {
+           const prefix_t *prefix = &prefix_table[i];
+           if (prefix->flags & NOTMUCH_FIELD_EXTERNAL) {
+               _setup_query_field (prefix, notmuch);
+           }
        }
     } catch (const Xapian::Error &error) {
        IGNORE_RESULT (asprintf (&message, "A Xapian exception occurred opening database: %s\n",
@@ -1133,16 +1167,31 @@ notmuch_database_close (notmuch_database_t *notmuch)
     delete notmuch->last_mod_range_processor;
     notmuch->last_mod_range_processor = NULL;
 
-#if HAVE_XAPIAN_FIELD_PROCESSOR
-    delete notmuch->date_field_processor;
-    notmuch->date_field_processor = NULL;
-    delete notmuch->query_field_processor;
-    notmuch->query_field_processor = NULL;
-#endif
-
     return status;
 }
 
+notmuch_status_t
+_notmuch_database_reopen (notmuch_database_t *notmuch)
+{
+    if (notmuch->mode != NOTMUCH_DATABASE_MODE_READ_ONLY)
+       return NOTMUCH_STATUS_UNSUPPORTED_OPERATION;
+
+    try {
+       notmuch->xapian_db->reopen ();
+    } catch (const Xapian::Error &error) {
+       if (! notmuch->exception_reported) {
+           _notmuch_database_log (notmuch, "Error: A Xapian exception reopening database: %s\n",
+                                  error.get_msg ().c_str ());
+           notmuch->exception_reported = TRUE;
+       }
+       return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+    }
+
+    notmuch->view++;
+
+    return NOTMUCH_STATUS_SUCCESS;
+}
+
 static int
 unlink_cb (const char *path,
           unused (const struct stat *sb),
@@ -1450,7 +1499,7 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,
        query = notmuch_query_create (notmuch, "");
        unsigned msg_count;
 
-       status = notmuch_query_count_messages_st (query, &msg_count);
+       status = notmuch_query_count_messages (query, &msg_count);
        if (status)
            goto DONE;
 
@@ -1488,7 +1537,7 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,
 
        query = notmuch_query_create (notmuch, "");
 
-       status = notmuch_query_search_messages_st (query, &messages);
+       status = notmuch_query_search_messages (query, &messages);
        if (status)
            goto DONE;
        for (;
@@ -1711,7 +1760,7 @@ notmuch_database_end_atomic (notmuch_database_t *notmuch)
         * However, we rely on flushing to test atomicity. */
        const char *thresh = getenv ("XAPIAN_FLUSH_THRESHOLD");
        if (thresh && atoi (thresh) == 1)
-           db->flush ();
+           db->commit ();
     } catch (const Xapian::Error &error) {
        _notmuch_database_log (notmuch, "A Xapian exception occurred committing transaction: %s.\n",
                 error.get_msg().c_str());
@@ -2450,53 +2499,53 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
     if (ret)
        goto DONE;
 
-    try {
-       /* Before we do any real work, (especially before doing a
-        * potential SHA-1 computation on the entire file's contents),
-        * let's make sure that what we're looking at looks like an
-        * actual email message.
-        */
-       from = _notmuch_message_file_get_header (message_file, "from");
-       subject = _notmuch_message_file_get_header (message_file, "subject");
-       to = _notmuch_message_file_get_header (message_file, "to");
+    /* Before we do any real work, (especially before doing a
+     * potential SHA-1 computation on the entire file's contents),
+     * let's make sure that what we're looking at looks like an
+     * actual email message.
+     */
+    from = _notmuch_message_file_get_header (message_file, "from");
+    subject = _notmuch_message_file_get_header (message_file, "subject");
+    to = _notmuch_message_file_get_header (message_file, "to");
+
+    if ((from == NULL || *from == '\0') &&
+       (subject == NULL || *subject == '\0') &&
+       (to == NULL || *to == '\0')) {
+       ret = NOTMUCH_STATUS_FILE_NOT_EMAIL;
+       goto DONE;
+    }
 
-       if ((from == NULL || *from == '\0') &&
-           (subject == NULL || *subject == '\0') &&
-           (to == NULL || *to == '\0'))
-       {
-           ret = NOTMUCH_STATUS_FILE_NOT_EMAIL;
-           goto DONE;
-       }
+    /* Now that we're sure it's mail, the first order of business
+     * is to find a message ID (or else create one ourselves).
+     */
+    header = _notmuch_message_file_get_header (message_file, "message-id");
+    if (header && *header != '\0') {
+       message_id = _parse_message_id (message_file, header, NULL);
 
-       /* Now that we're sure it's mail, the first order of business
-        * is to find a message ID (or else create one ourselves). */
+       /* So the header value isn't RFC-compliant, but it's
+        * better than no message-id at all.
+        */
+       if (message_id == NULL)
+           message_id = talloc_strdup (message_file, header);
+    }
 
-       header = _notmuch_message_file_get_header (message_file, "message-id");
-       if (header && *header != '\0') {
-           message_id = _parse_message_id (message_file, header, NULL);
+    if (message_id == NULL ) {
+       /* No message-id at all, let's generate one by taking a
+        * hash over the file's contents.
+        */
+       char *sha1 = _notmuch_sha1_of_file (filename);
 
-           /* So the header value isn't RFC-compliant, but it's
-            * better than no message-id at all. */
-           if (message_id == NULL)
-               message_id = talloc_strdup (message_file, header);
+       /* If that failed too, something is really wrong. Give up. */
+       if (sha1 == NULL) {
+           ret = NOTMUCH_STATUS_FILE_ERROR;
+           goto DONE;
        }
 
-       if (message_id == NULL ) {
-           /* No message-id at all, let's generate one by taking a
-            * hash over the file's contents. */
-           char *sha1 = _notmuch_sha1_of_file (filename);
-
-           /* If that failed too, something is really wrong. Give up. */
-           if (sha1 == NULL) {
-               ret = NOTMUCH_STATUS_FILE_ERROR;
-               goto DONE;
-           }
-
-           message_id = talloc_asprintf (message_file,
-                                         "notmuch-sha1-%s", sha1);
-           free (sha1);
-       }
+       message_id = talloc_asprintf (message_file, "notmuch-sha1-%s", sha1);
+       free (sha1);
+    }
 
+    try {
        /* Now that we have a message ID, we get a message object,
         * (which may or may not reference an existing document in the
         * database). */
diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh
deleted file mode 100644 (file)
index 5621f2a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-set -eu
-
-# we go through a bit of work to get the unmangled names of the
-# typeinfo symbols because of
-# https://sourceware.org/bugzilla/show_bug.cgi?id=10326
-
-if [ $# -lt 2 ]; then
-    echo Usage: $0 header obj1 obj2 obj3
-    exit 1;
-fi
-
-HEADER=$1
-shift
-
-printf '{\nglobal:\n'
-nm  $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \
-while read sym; do
-    demangled=$(c++filt $sym)
-    case $demangled in
-       typeinfo*)
-           printf "\t$sym;\n"
-           ;;
-       *)
-           ;;
-    esac
-done
-nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^(getline|getdelim|canonicalize_file_name)$" {print $3 ";"}'
-sed  -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER
-printf "local: *;\n};\n"
index 8c145540cbce0e285216470b59d47ef1a48efcde..0c4e232924ce1e139066c02c9f03bb5336f4167d 100644 (file)
 
 #include <xapian.h>
 
+
+typedef struct {
+    int state;
+    int a;
+    int b;
+    int next_if_match;
+    int next_if_not_match;
+} scanner_state_t;
+
+/* Simple, linear state-transition diagram for the uuencode filter.
+ *
+ * If the character being processed is within the range of [a, b]
+ * for the current state then we transition next_if_match
+ * state. If not, we transition to the next_if_not_match state.
+ *
+ * The final two states are special in that they are the states in
+ * which we discard data. */
+static const int first_uuencode_skipping_state = 11;
+static const scanner_state_t uuencode_states[] = {
+    {0,  'b',  'b',  1,  0},
+    {1,  'e',  'e',  2,  0},
+    {2,  'g',  'g',  3,  0},
+    {3,  'i',  'i',  4,  0},
+    {4,  'n',  'n',  5,  0},
+    {5,  ' ',  ' ',  6,  0},
+    {6,  '0',  '7',  7,  0},
+    {7,  '0',  '7',  8,  0},
+    {8,  '0',  '7',  9,  0},
+    {9,  ' ',  ' ',  10, 0},
+    {10, '\n', '\n', 11, 10},
+    {11, 'M',  'M',  12, 0},
+    {12, ' ',  '`',  12, 11}
+};
+
+/* The following table is intended to implement this DFA (in 'dot'
+   format). Note that 2 and 3 are "hidden" states used to step through
+   the possible out edges of state 1.
+
+digraph html_filter {
+       0 -> 1  [label="<"];
+       0 -> 0;
+       1 -> 4 [label="'"];
+       1 -> 5 [label="\""];
+       1 -> 0 [label=">"];
+       1 -> 1;
+       4 -> 1 [label="'"];
+       4 -> 4;
+       5 -> 1 [label="\""];
+       5 -> 5;
+}
+*/
+static const int first_html_skipping_state = 1;
+static const scanner_state_t html_states[] = {
+    {0,  '<',  '<',  1,  0},
+    {1,  '\'', '\'', 4,  2},  /* scanning for quote or > */
+    {1,  '"',  '"',  5,  3},
+    {1,  '>',  '>',  0,  1},
+    {4,  '\'', '\'', 1,  4},  /* inside single quotes */
+    {5,  '"', '"',   1,  5},  /* inside double quotes */
+};
+
 /* Oh, how I wish that gobject didn't require so much noisy boilerplate!
  * (Though I have at least eliminated some of the stock set...) */
-typedef struct _NotmuchFilterDiscardUuencode NotmuchFilterDiscardUuencode;
-typedef struct _NotmuchFilterDiscardUuencodeClass NotmuchFilterDiscardUuencodeClass;
+typedef struct _NotmuchFilterDiscardNonTerm NotmuchFilterDiscardNonTerm;
+typedef struct _NotmuchFilterDiscardNonTermClass NotmuchFilterDiscardNonTermClass;
 
 /**
- * NotmuchFilterDiscardUuencode:
+ * NotmuchFilterDiscardNonTerm:
  *
  * @parent_object: parent #GMimeFilter
  * @encode: encoding vs decoding
@@ -54,18 +115,21 @@ typedef struct _NotmuchFilterDiscardUuencodeClass NotmuchFilterDiscardUuencodeCl
  * final line of encoded data (the line not starting with M) will be
  * indexed.
  **/
-struct _NotmuchFilterDiscardUuencode {
+struct _NotmuchFilterDiscardNonTerm {
     GMimeFilter parent_object;
+    GMimeContentType *content_type;
     int state;
+    int first_skipping_state;
+    const scanner_state_t *states;
 };
 
-struct _NotmuchFilterDiscardUuencodeClass {
+struct _NotmuchFilterDiscardNonTermClass {
     GMimeFilterClass parent_class;
 };
 
-static GMimeFilter *notmuch_filter_discard_uuencode_new (void);
+static GMimeFilter *notmuch_filter_discard_non_term_new (GMimeContentType *content);
 
-static void notmuch_filter_discard_uuencode_finalize (GObject *object);
+static void notmuch_filter_discard_non_term_finalize (GObject *object);
 
 static GMimeFilter *filter_copy (GMimeFilter *filter);
 static void filter_filter (GMimeFilter *filter, char *in, size_t len, size_t prespace,
@@ -78,14 +142,14 @@ static void filter_reset (GMimeFilter *filter);
 static GMimeFilterClass *parent_class = NULL;
 
 static void
-notmuch_filter_discard_uuencode_class_init (NotmuchFilterDiscardUuencodeClass *klass)
+notmuch_filter_discard_non_term_class_init (NotmuchFilterDiscardNonTermClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
     GMimeFilterClass *filter_class = GMIME_FILTER_CLASS (klass);
 
     parent_class = (GMimeFilterClass *) g_type_class_ref (GMIME_TYPE_FILTER);
 
-    object_class->finalize = notmuch_filter_discard_uuencode_finalize;
+    object_class->finalize = notmuch_filter_discard_non_term_finalize;
 
     filter_class->copy = filter_copy;
     filter_class->filter = filter_filter;
@@ -94,7 +158,7 @@ notmuch_filter_discard_uuencode_class_init (NotmuchFilterDiscardUuencodeClass *k
 }
 
 static void
-notmuch_filter_discard_uuencode_finalize (GObject *object)
+notmuch_filter_discard_non_term_finalize (GObject *object)
 {
     G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -102,67 +166,46 @@ notmuch_filter_discard_uuencode_finalize (GObject *object)
 static GMimeFilter *
 filter_copy (GMimeFilter *gmime_filter)
 {
-    (void) gmime_filter;
-    return notmuch_filter_discard_uuencode_new ();
+    NotmuchFilterDiscardNonTerm *filter = (NotmuchFilterDiscardNonTerm *) gmime_filter;
+    return notmuch_filter_discard_non_term_new (filter->content_type);
 }
 
 static void
 filter_filter (GMimeFilter *gmime_filter, char *inbuf, size_t inlen, size_t prespace,
               char **outbuf, size_t *outlen, size_t *outprespace)
 {
-    NotmuchFilterDiscardUuencode *filter = (NotmuchFilterDiscardUuencode *) gmime_filter;
+    NotmuchFilterDiscardNonTerm *filter = (NotmuchFilterDiscardNonTerm *) gmime_filter;
+    const scanner_state_t *states = filter->states;
     register const char *inptr = inbuf;
     const char *inend = inbuf + inlen;
     char *outptr;
 
     (void) prespace;
 
-    /* Simple, linear state-transition diagram for our filter.
-     *
-     * If the character being processed is within the range of [a, b]
-     * for the current state then we transition next_if_match
-     * state. If not, we transition to the next_if_not_match state.
-     *
-     * The final two states are special in that they are the states in
-     * which we discard data. */
-    static const struct {
-       int state;
-       int a;
-       int b;
-       int next_if_match;
-       int next_if_not_match;
-    } states[] = {
-       {0,  'b',  'b',  1,  0},
-       {1,  'e',  'e',  2,  0},
-       {2,  'g',  'g',  3,  0},
-       {3,  'i',  'i',  4,  0},
-       {4,  'n',  'n',  5,  0},
-       {5,  ' ',  ' ',  6,  0},
-       {6,  '0',  '7',  7,  0},
-       {7,  '0',  '7',  8,  0},
-       {8,  '0',  '7',  9,  0},
-       {9,  ' ',  ' ',  10, 0},
-       {10, '\n', '\n', 11, 10},
-       {11, 'M',  'M',  12, 0},
-       {12, ' ',  '`',  12, 11}
-    };
     int next;
 
     g_mime_filter_set_size (gmime_filter, inlen, FALSE);
     outptr = gmime_filter->outbuf;
 
+    next = filter->state;
     while (inptr < inend) {
-       if (*inptr >= states[filter->state].a &&
-           *inptr <= states[filter->state].b)
-       {
-           next = states[filter->state].next_if_match;
-       }
-       else
-       {
-           next = states[filter->state].next_if_not_match;
-       }
+        /* Each state is defined by a contiguous set of rows of the
+        * state table marked by a common value for '.state'. The
+        * state numbers must be equal to the index of the first row
+        * in a given state; thus the loop condition here looks for a
+        * jump to a first row of a state, which is a real transition
+        * in the underlying DFA.
+        */
+       do {
+           if (*inptr >= states[next].a && *inptr <= states[next].b)  {
+               next = states[next].next_if_match;
+           } else  {
+               next = states[next].next_if_not_match;
+           }
 
-       if (filter->state < 11)
+       } while (next != states[next].state);
+
+       if (filter->state < filter->first_skipping_state)
            *outptr++ = *inptr;
 
        filter->state = next;
@@ -185,41 +228,49 @@ filter_complete (GMimeFilter *filter, char *inbuf, size_t inlen, size_t prespace
 static void
 filter_reset (GMimeFilter *gmime_filter)
 {
-    NotmuchFilterDiscardUuencode *filter = (NotmuchFilterDiscardUuencode *) gmime_filter;
+    NotmuchFilterDiscardNonTerm *filter = (NotmuchFilterDiscardNonTerm *) gmime_filter;
 
     filter->state = 0;
 }
 
 /**
- * notmuch_filter_discard_uuencode_new:
+ * notmuch_filter_discard_non_term_new:
  *
- * Returns: a new #NotmuchFilterDiscardUuencode filter.
+ * Returns: a new #NotmuchFilterDiscardNonTerm filter.
  **/
 static GMimeFilter *
-notmuch_filter_discard_uuencode_new (void)
+notmuch_filter_discard_non_term_new (GMimeContentType *content_type)
 {
     static GType type = 0;
-    NotmuchFilterDiscardUuencode *filter;
+    NotmuchFilterDiscardNonTerm *filter;
 
     if (!type) {
        static const GTypeInfo info = {
-           sizeof (NotmuchFilterDiscardUuencodeClass),
+           sizeof (NotmuchFilterDiscardNonTermClass),
            NULL, /* base_class_init */
            NULL, /* base_class_finalize */
-           (GClassInitFunc) notmuch_filter_discard_uuencode_class_init,
+           (GClassInitFunc) notmuch_filter_discard_non_term_class_init,
            NULL, /* class_finalize */
            NULL, /* class_data */
-           sizeof (NotmuchFilterDiscardUuencode),
+           sizeof (NotmuchFilterDiscardNonTerm),
            0,    /* n_preallocs */
            NULL, /* instance_init */
            NULL  /* value_table */
        };
 
-       type = g_type_register_static (GMIME_TYPE_FILTER, "NotmuchFilterDiscardUuencode", &info, (GTypeFlags) 0);
+       type = g_type_register_static (GMIME_TYPE_FILTER, "NotmuchFilterDiscardNonTerm", &info, (GTypeFlags) 0);
     }
 
-    filter = (NotmuchFilterDiscardUuencode *) g_object_newv (type, 0, NULL);
+    filter = (NotmuchFilterDiscardNonTerm *) g_object_newv (type, 0, NULL);
+    filter->content_type = content_type;
     filter->state = 0;
+    if (g_mime_content_type_is_type (content_type, "text", "html")) {
+      filter->states = html_states;
+      filter->first_skipping_state = first_html_skipping_state;
+    } else {
+      filter->states = uuencode_states;
+      filter->first_skipping_state = first_uuencode_skipping_state;
+    }
 
     return (GMimeFilter *) filter;
 }
@@ -306,7 +357,7 @@ _index_mime_part (notmuch_message_t *message,
                  GMimeObject *part)
 {
     GMimeStream *stream, *filter;
-    GMimeFilter *discard_uuencode_filter;
+    GMimeFilter *discard_non_term_filter;
     GMimeDataWrapper *wrapper;
     GByteArray *byte_array;
     GMimeContentDisposition *disposition;
@@ -396,10 +447,10 @@ _index_mime_part (notmuch_message_t *message,
     g_mime_stream_mem_set_owner (GMIME_STREAM_MEM (stream), FALSE);
 
     filter = g_mime_stream_filter_new (stream);
-    discard_uuencode_filter = notmuch_filter_discard_uuencode_new ();
+    discard_non_term_filter = notmuch_filter_discard_non_term_new (content_type);
 
     g_mime_stream_filter_add (GMIME_STREAM_FILTER (filter),
-                             discard_uuencode_filter);
+                             discard_non_term_filter);
 
     charset = g_mime_object_get_content_type_parameter (part, "charset");
     if (charset) {
@@ -421,7 +472,7 @@ _index_mime_part (notmuch_message_t *message,
 
     g_object_unref (stream);
     g_object_unref (filter);
-    g_object_unref (discard_uuencode_filter);
+    g_object_unref (discard_non_term_filter);
 
     g_byte_array_append (byte_array, (guint8 *) "\0", 1);
     body = (char *) g_byte_array_free (byte_array, FALSE);
diff --git a/lib/libsha1.c b/lib/libsha1.c
deleted file mode 100644 (file)
index aaaa4eb..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- ---------------------------------------------------------------------------
- Copyright (c) 2002, Dr Brian Gladman, Worcester, UK.   All rights reserved.
-
- LICENSE TERMS
-
- The free distribution and use of this software in both source and binary
- form is allowed (with or without changes) provided that:
-
-   1. distributions of this source code include the above copyright
-      notice, this list of conditions and the following disclaimer;
-
-   2. distributions in binary form include the above copyright
-      notice, this list of conditions and the following disclaimer
-      in the documentation and/or other associated materials;
-
-   3. the copyright holder's name is not used to endorse products
-      built using this software without specific written permission.
-
- ALTERNATIVELY, provided that this notice is retained in full, this product
- may be distributed under the terms of the GNU General Public License (GPL),
- in which case the provisions of the GPL apply INSTEAD OF those given above.
-
- DISCLAIMER
-
- This software is provided 'as is' with no explicit or implied warranties
- in respect of its properties, including, but not limited to, correctness
- and/or fitness for purpose.
- ---------------------------------------------------------------------------
- Issue Date: 01/08/2005
-
- This is a byte oriented version of SHA1 that operates on arrays of bytes
- stored in memory.
-*/
-
-#include <string.h>     /* for memcpy() etc.        */
-#include "endian-util.h"
-#include "libsha1.h"
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-#define SHA1_BLOCK_SIZE  64
-
-#define rotl32(x,n)   (((x) << n) | ((x) >> (32 - n)))
-#define rotr32(x,n)   (((x) >> n) | ((x) << (32 - n)))
-
-#define bswap_32(x) ((rotr32((x), 24) & 0x00ff00ff) | (rotr32((x), 8) & 0xff00ff00))
-
-#if (UTIL_BYTE_ORDER == UTIL_ORDER_LITTLE_ENDIAN)
-#  define bsw_32(p,n) \
-     { int _i = (n); while(_i--) ((uint32_t*)p)[_i] = bswap_32(((uint32_t*)p)[_i]); }
-#elif (UTIL_BYTE_ORDER == UTIL_ORDER_BIG_ENDIAN)
-#  define bsw_32(p,n)
-#else
-#  error "Unsupported byte order"
-#endif
-
-#define SHA1_MASK   (SHA1_BLOCK_SIZE - 1)
-
-#if 0
-
-#define ch(x,y,z)       (((x) & (y)) ^ (~(x) & (z)))
-#define parity(x,y,z)   ((x) ^ (y) ^ (z))
-#define maj(x,y,z)      (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
-
-#else   /* Discovered by Rich Schroeppel and Colin Plumb   */
-
-#define ch(x,y,z)       ((z) ^ ((x) & ((y) ^ (z))))
-#define parity(x,y,z)   ((x) ^ (y) ^ (z))
-#define maj(x,y,z)      (((x) & (y)) | ((z) & ((x) ^ (y))))
-
-#endif
-
-/* Compile 64 bytes of hash data into SHA1 context. Note    */
-/* that this routine assumes that the byte order in the     */
-/* ctx->wbuf[] at this point is in such an order that low   */
-/* address bytes in the ORIGINAL byte stream will go in     */
-/* this buffer to the high end of 32-bit words on BOTH big  */
-/* and little endian systems                                */
-
-#ifdef ARRAY
-#define q(v,n)  v[n]
-#else
-#define q(v,n)  v##n
-#endif
-
-#define one_cycle(v,a,b,c,d,e,f,k,h)            \
-    q(v,e) += rotr32(q(v,a),27) +               \
-              f(q(v,b),q(v,c),q(v,d)) + k + h;  \
-    q(v,b)  = rotr32(q(v,b), 2)
-
-#define five_cycle(v,f,k,i)                 \
-    one_cycle(v, 0,1,2,3,4, f,k,hf(i  ));   \
-    one_cycle(v, 4,0,1,2,3, f,k,hf(i+1));   \
-    one_cycle(v, 3,4,0,1,2, f,k,hf(i+2));   \
-    one_cycle(v, 2,3,4,0,1, f,k,hf(i+3));   \
-    one_cycle(v, 1,2,3,4,0, f,k,hf(i+4))
-
-static void sha1_compile(sha1_ctx ctx[1])
-{   uint32_t    *w = ctx->wbuf;
-
-#ifdef ARRAY
-    uint32_t    v[5];
-    memcpy(v, ctx->hash, 5 * sizeof(uint32_t));
-#else
-    uint32_t    v0, v1, v2, v3, v4;
-    v0 = ctx->hash[0]; v1 = ctx->hash[1];
-    v2 = ctx->hash[2]; v3 = ctx->hash[3];
-    v4 = ctx->hash[4];
-#endif
-
-#define hf(i)   w[i]
-
-    five_cycle(v, ch, 0x5a827999,  0);
-    five_cycle(v, ch, 0x5a827999,  5);
-    five_cycle(v, ch, 0x5a827999, 10);
-    one_cycle(v,0,1,2,3,4, ch, 0x5a827999, hf(15)); \
-
-#undef  hf
-#define hf(i) (w[(i) & 15] = rotl32(                    \
-                 w[((i) + 13) & 15] ^ w[((i) + 8) & 15] \
-               ^ w[((i) +  2) & 15] ^ w[(i) & 15], 1))
-
-    one_cycle(v,4,0,1,2,3, ch, 0x5a827999, hf(16));
-    one_cycle(v,3,4,0,1,2, ch, 0x5a827999, hf(17));
-    one_cycle(v,2,3,4,0,1, ch, 0x5a827999, hf(18));
-    one_cycle(v,1,2,3,4,0, ch, 0x5a827999, hf(19));
-
-    five_cycle(v, parity, 0x6ed9eba1,  20);
-    five_cycle(v, parity, 0x6ed9eba1,  25);
-    five_cycle(v, parity, 0x6ed9eba1,  30);
-    five_cycle(v, parity, 0x6ed9eba1,  35);
-
-    five_cycle(v, maj, 0x8f1bbcdc,  40);
-    five_cycle(v, maj, 0x8f1bbcdc,  45);
-    five_cycle(v, maj, 0x8f1bbcdc,  50);
-    five_cycle(v, maj, 0x8f1bbcdc,  55);
-
-    five_cycle(v, parity, 0xca62c1d6,  60);
-    five_cycle(v, parity, 0xca62c1d6,  65);
-    five_cycle(v, parity, 0xca62c1d6,  70);
-    five_cycle(v, parity, 0xca62c1d6,  75);
-
-#ifdef ARRAY
-    ctx->hash[0] += v[0]; ctx->hash[1] += v[1];
-    ctx->hash[2] += v[2]; ctx->hash[3] += v[3];
-    ctx->hash[4] += v[4];
-#else
-    ctx->hash[0] += v0; ctx->hash[1] += v1;
-    ctx->hash[2] += v2; ctx->hash[3] += v3;
-    ctx->hash[4] += v4;
-#endif
-}
-
-void sha1_begin(sha1_ctx ctx[1])
-{
-    ctx->count[0] = ctx->count[1] = 0;
-    ctx->hash[0] = 0x67452301;
-    ctx->hash[1] = 0xefcdab89;
-    ctx->hash[2] = 0x98badcfe;
-    ctx->hash[3] = 0x10325476;
-    ctx->hash[4] = 0xc3d2e1f0;
-}
-
-/* SHA1 hash data in an array of bytes into hash buffer and */
-/* call the hash_compile function as required.              */
-
-void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1])
-{   uint32_t pos = (uint32_t)(ctx->count[0] & SHA1_MASK),
-            space = SHA1_BLOCK_SIZE - pos;
-    const unsigned char *sp = data;
-
-    if((ctx->count[0] += len) < len)
-        ++(ctx->count[1]);
-
-    while(len >= space)     /* transfer whole blocks if possible  */
-    {
-        memcpy(((unsigned char*)ctx->wbuf) + pos, sp, space);
-        sp += space; len -= space; space = SHA1_BLOCK_SIZE; pos = 0;
-        bsw_32(ctx->wbuf, SHA1_BLOCK_SIZE >> 2);
-        sha1_compile(ctx);
-    }
-
-    memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len);
-}
-
-/* SHA1 final padding and digest calculation  */
-
-void sha1_end(unsigned char hval[], sha1_ctx ctx[1])
-{   uint32_t    i = (uint32_t)(ctx->count[0] & SHA1_MASK);
-
-    /* put bytes in the buffer in an order in which references to   */
-    /* 32-bit words will put bytes with lower addresses into the    */
-    /* top of 32 bit words on BOTH big and little endian machines   */
-    bsw_32(ctx->wbuf, (i + 3) >> 2);
-
-    /* we now need to mask valid bytes and add the padding which is */
-    /* a single 1 bit and as many zero bits as necessary. Note that */
-    /* we can always add the first padding byte here because the    */
-    /* buffer always has at least one empty slot                    */
-    ctx->wbuf[i >> 2] &= 0xffffff80 << 8 * (~i & 3);
-    ctx->wbuf[i >> 2] |= 0x00000080 << 8 * (~i & 3);
-
-    /* we need 9 or more empty positions, one for the padding byte  */
-    /* (above) and eight for the length count. If there is not      */
-    /* enough space, pad and empty the buffer                       */
-    if(i > SHA1_BLOCK_SIZE - 9)
-    {
-        if(i < 60) ctx->wbuf[15] = 0;
-        sha1_compile(ctx);
-        i = 0;
-    }
-    else    /* compute a word index for the empty buffer positions  */
-        i = (i >> 2) + 1;
-
-    while(i < 14) /* and zero pad all but last two positions        */
-        ctx->wbuf[i++] = 0;
-
-    /* the following 32-bit length fields are assembled in the      */
-    /* wrong byte order on little endian machines but this is       */
-    /* corrected later since they are only ever used as 32-bit      */
-    /* word values.                                                 */
-    ctx->wbuf[14] = (ctx->count[1] << 3) | (ctx->count[0] >> 29);
-    ctx->wbuf[15] = ctx->count[0] << 3;
-    sha1_compile(ctx);
-
-    /* extract the hash value as bytes in case the hash buffer is   */
-    /* misaligned for 32-bit words                                  */
-    for(i = 0; i < SHA1_DIGEST_SIZE; ++i)
-        hval[i] = (unsigned char)(ctx->hash[i >> 2] >> (8 * (~i & 3)));
-}
-
-void sha1(unsigned char hval[], const unsigned char data[], unsigned long len)
-{   sha1_ctx    cx[1];
-
-    sha1_begin(cx); sha1_hash(data, len, cx); sha1_end(hval, cx);
-}
-
-#if defined(__cplusplus)
-}
-#endif
diff --git a/lib/libsha1.h b/lib/libsha1.h
deleted file mode 100644 (file)
index 56f445a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- ---------------------------------------------------------------------------
- Copyright (c) 2002, Dr Brian Gladman, Worcester, UK.   All rights reserved.
-
- LICENSE TERMS
-
- The free distribution and use of this software in both source and binary
- form is allowed (with or without changes) provided that:
-
-   1. distributions of this source code include the above copyright
-      notice, this list of conditions and the following disclaimer;
-
-   2. distributions in binary form include the above copyright
-      notice, this list of conditions and the following disclaimer
-      in the documentation and/or other associated materials;
-
-   3. the copyright holder's name is not used to endorse products
-      built using this software without specific written permission.
-
- ALTERNATIVELY, provided that this notice is retained in full, this product
- may be distributed under the terms of the GNU General Public License (GPL),
- in which case the provisions of the GPL apply INSTEAD OF those given above.
-
- DISCLAIMER
-
- This software is provided 'as is' with no explicit or implied warranties
- in respect of its properties, including, but not limited to, correctness
- and/or fitness for purpose.
- ---------------------------------------------------------------------------
- Issue Date: 01/08/2005
-*/
-
-#ifndef _SHA1_H
-#define _SHA1_H
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-#if 0
-} /* Appeasing Emacs */
-#endif
-
-#include <stdint.h>
-
-#pragma GCC visibility push(hidden)
-
-/* Size of SHA1 digest */
-
-#define SHA1_DIGEST_SIZE 20
-
-/* type to hold the SHA1 context  */
-
-typedef struct
-{   uint32_t count[2];
-    uint32_t hash[5];
-    uint32_t wbuf[16];
-} sha1_ctx;
-
-void sha1_begin(sha1_ctx ctx[1]);
-void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]);
-void sha1_end(unsigned char hval[], sha1_ctx ctx[1]);
-void sha1(unsigned char hval[], const unsigned char data[], unsigned long len);
-
-#pragma GCC visibility pop
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
index 0b13cac314f9aad61067986257273af3a7921b3b..f32d555062d2bce0decf7cd5f9b33894655e7924 100644 (file)
@@ -51,7 +51,7 @@ _notmuch_message_modify_property (notmuch_message_t *message, const char *key, c
     if (key == NULL || value == NULL)
        return NOTMUCH_STATUS_NULL_POINTER;
 
-    if (index (key, '='))
+    if (strchr (key, '='))
        return NOTMUCH_STATUS_ILLEGAL_ARGUMENT;
 
     term = talloc_asprintf (message, "%s=%s", key, value);
index a91e69e0283f7fcbf02fe19c3f7108e19d35ad2a..b330dcce5ecf374b7f6009ffbbd327fa1d95eaec 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <gmime/gmime.h>
 
-struct visible _notmuch_message {
+struct _notmuch_message {
     notmuch_database_t *notmuch;
     Xapian::docid doc_id;
     int frozen;
@@ -49,6 +49,9 @@ struct visible _notmuch_message {
     /* Message document modified since last sync */
     notmuch_bool_t modified;
 
+    /* last view of database the struct is synced with */
+    unsigned long last_view;
+
     Xapian::Document doc;
     Xapian::termcount termpos;
 };
@@ -110,6 +113,9 @@ _notmuch_message_create_for_document (const void *talloc_owner,
     message->flags = 0;
     message->lazy_flags = 0;
 
+    /* the message is initially not synchronized with Xapian */
+    message->last_view = 0;
+
     /* Each of these will be lazily created as needed. */
     message->message_id = NULL;
     message->thread_id = NULL;
@@ -310,10 +316,14 @@ _notmuch_message_get_term (notmuch_message_t *message,
     return value;
 }
 
-void
-_notmuch_message_ensure_metadata (notmuch_message_t *message)
+static void
+_notmuch_message_ensure_metadata (notmuch_message_t *message, void *field)
 {
     Xapian::TermIterator i, end;
+
+    if (field && (message->last_view >= message->notmuch->view))
+       return;
+
     const char *thread_prefix = _find_prefix ("thread"),
        *tag_prefix = _find_prefix ("tag"),
        *id_prefix = _find_prefix ("id"),
@@ -327,73 +337,88 @@ _notmuch_message_ensure_metadata (notmuch_message_t *message)
      * slightly more costly than looking up individual fields if only
      * one field of the message object is actually used, it's a huge
      * win as more fields are used. */
+    for (int count=0; count < 3; count++) {
+       try {
+           i = message->doc.termlist_begin ();
+           end = message->doc.termlist_end ();
+
+           /* Get thread */
+           if (!message->thread_id)
+               message->thread_id =
+                   _notmuch_message_get_term (message, i, end, thread_prefix);
+
+           /* Get tags */
+           assert (strcmp (thread_prefix, tag_prefix) < 0);
+           if (!message->tag_list) {
+               message->tag_list =
+                   _notmuch_database_get_terms_with_prefix (message, i, end,
+                                                            tag_prefix);
+               _notmuch_string_list_sort (message->tag_list);
+           }
 
-    i = message->doc.termlist_begin ();
-    end = message->doc.termlist_end ();
+           /* Get id */
+           assert (strcmp (tag_prefix, id_prefix) < 0);
+           if (!message->message_id)
+               message->message_id =
+                   _notmuch_message_get_term (message, i, end, id_prefix);
+
+           /* Get document type */
+           assert (strcmp (id_prefix, type_prefix) < 0);
+           if (! NOTMUCH_TEST_BIT (message->lazy_flags, NOTMUCH_MESSAGE_FLAG_GHOST)) {
+               i.skip_to (type_prefix);
+               /* "T" is the prefix "type" fields.  See
+                * BOOLEAN_PREFIX_INTERNAL. */
+               if (*i == "Tmail")
+                   NOTMUCH_CLEAR_BIT (&message->flags, NOTMUCH_MESSAGE_FLAG_GHOST);
+               else if (*i == "Tghost")
+                   NOTMUCH_SET_BIT (&message->flags, NOTMUCH_MESSAGE_FLAG_GHOST);
+               else
+                   INTERNAL_ERROR ("Message without type term");
+               NOTMUCH_SET_BIT (&message->lazy_flags, NOTMUCH_MESSAGE_FLAG_GHOST);
+           }
 
-    /* Get thread */
-    if (!message->thread_id)
-       message->thread_id =
-           _notmuch_message_get_term (message, i, end, thread_prefix);
-
-    /* Get tags */
-    assert (strcmp (thread_prefix, tag_prefix) < 0);
-    if (!message->tag_list) {
-       message->tag_list =
-           _notmuch_database_get_terms_with_prefix (message, i, end,
-                                                    tag_prefix);
-       _notmuch_string_list_sort (message->tag_list);
-    }
+           /* Get filename list.  Here we get only the terms.  We lazily
+            * expand them to full file names when needed in
+            * _notmuch_message_ensure_filename_list. */
+           assert (strcmp (type_prefix, filename_prefix) < 0);
+           if (!message->filename_term_list && !message->filename_list)
+               message->filename_term_list =
+                   _notmuch_database_get_terms_with_prefix (message, i, end,
+                                                            filename_prefix);
+
+
+           /* Get property terms. Mimic the setup with filenames above */
+           assert (strcmp (filename_prefix, property_prefix) < 0);
+           if (!message->property_map && !message->property_term_list)
+               message->property_term_list =
+                   _notmuch_database_get_terms_with_prefix (message, i, end,
+                                                        property_prefix);
+
+           /* Get reply to */
+           assert (strcmp (property_prefix, replyto_prefix) < 0);
+           if (!message->in_reply_to)
+               message->in_reply_to =
+                   _notmuch_message_get_term (message, i, end, replyto_prefix);
 
-    /* Get id */
-    assert (strcmp (tag_prefix, id_prefix) < 0);
-    if (!message->message_id)
-       message->message_id =
-           _notmuch_message_get_term (message, i, end, id_prefix);
-
-    /* Get document type */
-    assert (strcmp (id_prefix, type_prefix) < 0);
-    if (! NOTMUCH_TEST_BIT (message->lazy_flags, NOTMUCH_MESSAGE_FLAG_GHOST)) {
-       i.skip_to (type_prefix);
-       /* "T" is the prefix "type" fields.  See
-        * BOOLEAN_PREFIX_INTERNAL. */
-       if (*i == "Tmail")
-           NOTMUCH_CLEAR_BIT (&message->flags, NOTMUCH_MESSAGE_FLAG_GHOST);
-       else if (*i == "Tghost")
-           NOTMUCH_SET_BIT (&message->flags, NOTMUCH_MESSAGE_FLAG_GHOST);
-       else
-           INTERNAL_ERROR ("Message without type term");
-       NOTMUCH_SET_BIT (&message->lazy_flags, NOTMUCH_MESSAGE_FLAG_GHOST);
-    }
 
-    /* Get filename list.  Here we get only the terms.  We lazily
-     * expand them to full file names when needed in
-     * _notmuch_message_ensure_filename_list. */
-    assert (strcmp (type_prefix, filename_prefix) < 0);
-    if (!message->filename_term_list && !message->filename_list)
-       message->filename_term_list =
-           _notmuch_database_get_terms_with_prefix (message, i, end,
-                                                    filename_prefix);
-
-
-    /* Get property terms. Mimic the setup with filenames above */
-    assert (strcmp (filename_prefix, property_prefix) < 0);
-    if (!message->property_map && !message->property_term_list)
-       message->property_term_list =
-           _notmuch_database_get_terms_with_prefix (message, i, end,
-                                                    property_prefix);
-
-    /* Get reply to */
-    assert (strcmp (property_prefix, replyto_prefix) < 0);
-    if (!message->in_reply_to)
-       message->in_reply_to =
-           _notmuch_message_get_term (message, i, end, replyto_prefix);
-
-
-    /* It's perfectly valid for a message to have no In-Reply-To
-     * header. For these cases, we return an empty string. */
-    if (!message->in_reply_to)
-       message->in_reply_to = talloc_strdup (message, "");
+           /* It's perfectly valid for a message to have no In-Reply-To
+            * header. For these cases, we return an empty string. */
+           if (!message->in_reply_to)
+               message->in_reply_to = talloc_strdup (message, "");
+
+           /* all the way without an exception */
+           break;
+       } catch (const Xapian::DatabaseModifiedError &error) {
+           notmuch_status_t status = _notmuch_database_reopen (message->notmuch);
+           if (status != NOTMUCH_STATUS_SUCCESS)
+               INTERNAL_ERROR ("unhandled error from notmuch_database_reopen: %s\n",
+                               notmuch_status_to_string (status));
+       } catch (const Xapian::Error &error) {
+           INTERNAL_ERROR ("A Xapian exception occurred fetching message metadata: %s\n",
+                           error.get_msg().c_str());
+       }
+    }
+    message->last_view = message->notmuch->view;
 }
 
 void
@@ -448,8 +473,7 @@ _notmuch_message_get_doc_id (notmuch_message_t *message)
 const char *
 notmuch_message_get_message_id (notmuch_message_t *message)
 {
-    if (!message->message_id)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->message_id);
     if (!message->message_id)
        INTERNAL_ERROR ("Message with document ID of %u has no message ID.\n",
                        message->doc_id);
@@ -524,16 +548,14 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header)
 const char *
 _notmuch_message_get_in_reply_to (notmuch_message_t *message)
 {
-    if (!message->in_reply_to)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->in_reply_to);
     return message->in_reply_to;
 }
 
 const char *
 notmuch_message_get_thread_id (notmuch_message_t *message)
 {
-    if (!message->thread_id)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->thread_id);
     if (!message->thread_id)
        INTERNAL_ERROR ("Message with document ID of %u has no thread ID.\n",
                        message->doc_id);
@@ -836,8 +858,7 @@ _notmuch_message_ensure_filename_list (notmuch_message_t *message)
     if (message->filename_list)
        return;
 
-    if (!message->filename_term_list)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->filename_term_list);
 
     message->filename_list = _notmuch_string_list_create (message);
     node = message->filename_term_list->head;
@@ -931,7 +952,7 @@ notmuch_message_get_flag (notmuch_message_t *message,
 {
     if (flag == NOTMUCH_MESSAGE_FLAG_GHOST &&
        ! NOTMUCH_TEST_BIT (message->lazy_flags, flag))
-       _notmuch_message_ensure_metadata (message);
+       _notmuch_message_ensure_metadata (message, NULL);
 
     return NOTMUCH_TEST_BIT (message->flags, flag);
 }
@@ -972,8 +993,7 @@ notmuch_message_get_tags (notmuch_message_t *message)
 {
     notmuch_tags_t *tags;
 
-    if (!message->tag_list)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->tag_list);
 
     tags = _notmuch_tags_create (message, message->tag_list);
     /* _notmuch_tags_create steals the reference to the tag_list, but
@@ -1014,10 +1034,16 @@ _notmuch_message_set_header_values (notmuch_message_t *message,
 
     /* GMime really doesn't want to see a NULL date, so protect its
      * sensibilities. */
-    if (date == NULL || *date == '\0')
+    if (date == NULL || *date == '\0') {
        time_value = 0;
-    else
+    } else {
        time_value = g_mime_utils_header_decode_date (date, NULL);
+       /*
+        * Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=779923
+        */
+       if (time_value < 0)
+           time_value = 0;
+    }
 
     message->doc.add_value (NOTMUCH_VALUE_TIMESTAMP,
                            Xapian::sortable_serialise (time_value));
@@ -1103,7 +1129,7 @@ _notmuch_message_delete (notmuch_message_t *message)
     query = notmuch_query_create (notmuch, query_string);
     if (query == NULL)
        return NOTMUCH_STATUS_OUT_OF_MEMORY;
-    status = notmuch_query_count_messages_st (query, &count);
+    status = notmuch_query_count_messages (query, &count);
     if (status) {
        notmuch_query_destroy (query);
        return status;
@@ -1801,7 +1827,7 @@ _notmuch_message_database (notmuch_message_t *message)
     return message->notmuch;
 }
 
-void
+static void
 _notmuch_message_ensure_property_map (notmuch_message_t *message)
 {
     notmuch_string_node_t *node;
@@ -1809,8 +1835,7 @@ _notmuch_message_ensure_property_map (notmuch_message_t *message)
     if (message->property_map)
        return;
 
-    if (!message->property_term_list)
-       _notmuch_message_ensure_metadata (message);
+    _notmuch_message_ensure_metadata (message, message->property_term_list);
 
     message->property_map = _notmuch_string_map_create (message);
 
@@ -1818,7 +1843,7 @@ _notmuch_message_ensure_property_map (notmuch_message_t *message)
        const char *key;
        char *value;
 
-       value = index(node->string, '=');
+       value = strchr(node->string, '=');
        if (!value)
            INTERNAL_ERROR ("malformed property term");
 
index 7b35fc5b0ca8bc4656841a14c6212814f05d2fbc..ac315e4c99b77ae316571d3b0d686612100f05c3 100644 (file)
@@ -52,8 +52,6 @@ NOTMUCH_BEGIN_DECLS
 #include "error_util.h"
 #include "string-util.h"
 
-#pragma GCC visibility push(hidden)
-
 #ifdef DEBUG
 # define DEBUG_DATABASE_SANITY 1
 # define DEBUG_QUERY 1
@@ -76,12 +74,6 @@ NOTMUCH_BEGIN_DECLS
 
 #define unused(x) x __attribute__ ((unused))
 
-#ifdef __cplusplus
-# define visible __attribute__((visibility("default")))
-#else
-# define visible
-#endif
-
 /* Thanks to Andrew Tridgell's (SAMBA's) talloc for this definition of
  * unlikely. The talloc source code comes to us via the GNU LGPL v. 3.
  */
@@ -192,6 +184,9 @@ _notmuch_message_id_compressed (void *ctx, const char *message_id);
 notmuch_status_t
 _notmuch_database_ensure_writable (notmuch_database_t *notmuch);
 
+notmuch_status_t
+_notmuch_database_reopen (notmuch_database_t *notmuch);
+
 void
 _notmuch_database_log (notmuch_database_t *notmuch,
                       const char *format, ...);
@@ -452,7 +447,7 @@ typedef struct _notmuch_message_list {
  * somewhere with some nasty C++ objects in it. We'll try to maintain
  * ignorance of that here. (See notmuch_mset_messages_t in query.cc)
  */
-struct visible _notmuch_messages {
+struct _notmuch_messages {
     notmuch_bool_t is_of_list_type;
     notmuch_doc_id_set_t *excluded_doc_ids;
     notmuch_message_node_t *iterator;
@@ -521,7 +516,7 @@ typedef struct _notmuch_string_node {
     struct _notmuch_string_node *next;
 } notmuch_string_node_t;
 
-typedef struct visible _notmuch_string_list {
+typedef struct _notmuch_string_list {
     int length;
     notmuch_string_node_t *head;
     notmuch_string_node_t **tail;
@@ -618,6 +613,4 @@ _notmuch_talloc_steal (const void *new_ctx, const T *ptr)
 #endif
 #endif
 
-#pragma GCC visibility pop
-
 #endif
index 18678c0a766c535f6ea2b1bafb94f7e72e9ab4fb..e17454442333c80b459c0e3073b766c3fec6888e 100644 (file)
@@ -43,6 +43,8 @@ NOTMUCH_BEGIN_DECLS
 
 #include <time.h>
 
+#pragma GCC visibility push(default)
+
 #ifndef FALSE
 #define FALSE 0
 #endif
@@ -55,8 +57,8 @@ NOTMUCH_BEGIN_DECLS
  * The library version number.  This must agree with the soname
  * version in Makefile.local.
  */
-#define LIBNOTMUCH_MAJOR_VERSION       4
-#define LIBNOTMUCH_MINOR_VERSION       4
+#define LIBNOTMUCH_MAJOR_VERSION       5
+#define LIBNOTMUCH_MINOR_VERSION       0
 #define LIBNOTMUCH_MICRO_VERSION       0
 
 
@@ -126,15 +128,15 @@ typedef enum _notmuch_status {
     NOTMUCH_STATUS_READ_ONLY_DATABASE,
     /**
      * A Xapian exception occurred.
+     *
+     * @todo We don't really want to expose this lame XAPIAN_EXCEPTION
+     * value. Instead we should map to things like DATABASE_LOCKED or
+     * whatever.
      */
     NOTMUCH_STATUS_XAPIAN_EXCEPTION,
     /**
      * An error occurred trying to read or write to a file (this could
      * be file not found, permission denied, etc.)
-     *
-     * @todo We don't really want to expose this lame XAPIAN_EXCEPTION
-     * value. Instead we should map to things like DATABASE_LOCKED or
-     * whatever.
      */
     NOTMUCH_STATUS_FILE_ERROR,
     /**
@@ -179,6 +181,11 @@ typedef enum _notmuch_status {
      * passed to a function expecting an absolute path.
      */
     NOTMUCH_STATUS_PATH_ERROR,
+    /**
+     * The requested operation was ignored. Depending on the function,
+     * this may not be an actual error.
+     */
+    NOTMUCH_STATUS_IGNORED,
     /**
      * One of the arguments violates the preconditions for the
      * function, in a way not covered by a more specific argument.
@@ -812,10 +819,20 @@ notmuch_query_get_sort (const notmuch_query_t *query);
 
 /**
  * Add a tag that will be excluded from the query results by default.
- * This exclusion will be overridden if this tag appears explicitly in
+ * This exclusion will be ignored if this tag appears explicitly in
  * the query.
+ *
+ * @returns
+ *
+ * NOTMUCH_STATUS_SUCCESS: excluded was added successfully.
+ *
+ * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured.
+ *      Most likely a problem lazily parsing the query string.
+ *
+ * NOTMUCH_STATUS_IGNORED: tag is explicitely present in the query, so
+ *             not excluded.
  */
-void
+notmuch_status_t
 notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
 
 /**
@@ -855,24 +872,22 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
  * notmuch_threads_destroy function, but there's no good reason
  * to call it if the query is about to be destroyed).
  *
- * @since libnotmuch 4.2 (notmuch 0.20)
+ * @since libnotmuch 5.0 (notmuch 0.25)
  */
 notmuch_status_t
-notmuch_query_search_threads_st (notmuch_query_t *query,
-                                notmuch_threads_t **out);
+notmuch_query_search_threads (notmuch_query_t *query,
+                             notmuch_threads_t **out);
 
 /**
- * Like notmuch_query_search_threads_st, but without a status return.
- *
- * If a Xapian exception occurs this function will return NULL.
+ * Deprecated alias for notmuch_query_search_threads.
  *
- * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please
- * use notmuch_query_search_threads_st instead.
+ * @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please
+ * use notmuch_query_search_threads instead.
  *
  */
-NOTMUCH_DEPRECATED(4,3)
-notmuch_threads_t *
-notmuch_query_search_threads (notmuch_query_t *query);
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out);
 
 /**
  * Execute a query for messages, returning a notmuch_messages_t object
@@ -913,23 +928,23 @@ notmuch_query_search_threads (notmuch_query_t *query);
  *
  * If a Xapian exception occurs this function will return NULL.
  *
- * @since libnotmuch 4.2 (notmuch 0.20)
+ * @since libnotmuch 5 (notmuch 0.25)
  */
 notmuch_status_t
-notmuch_query_search_messages_st (notmuch_query_t *query,
-                                 notmuch_messages_t **out);
+notmuch_query_search_messages (notmuch_query_t *query,
+                              notmuch_messages_t **out);
 /**
- * Like notmuch_query_search_messages, but without a status return.
- *
- * If a Xapian exception occurs this function will return NULL.
+ * Deprecated alias for notmuch_query_search_messages
  *
- * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please use
- * notmuch_query_search_messages_st instead.
+ * @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please use
+ * notmuch_query_search_messages instead.
  *
  */
-NOTMUCH_DEPRECATED(4,3)
-notmuch_messages_t *
-notmuch_query_search_messages (notmuch_query_t *query);
+
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_search_messages_st (notmuch_query_t *query,
+                                 notmuch_messages_t **out);
 
 /**
  * Destroy a notmuch_query_t along with any associated resources.
@@ -1010,22 +1025,21 @@ notmuch_threads_destroy (notmuch_threads_t *threads);
  * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The
  *      value of *count is not defined.
  *
- * @since libnotmuch 4.3 (notmuch 0.21)
+ * @since libnotmuch 5 (notmuch 0.25)
  */
 notmuch_status_t
-notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count);
+notmuch_query_count_messages (notmuch_query_t *query, unsigned int *count);
 
 /**
- * like notmuch_query_count_messages_st, but without a status return.
+ * Deprecated alias for notmuch_query_count_messages
  *
- * May return 0 in the case of errors.
  *
- * @deprecated Deprecated since libnotmuch 4.3 (notmuch 0.21). Please
- * use notmuch_query_count_messages_st instead.
+ * @deprecated Deprecated since libnotmuch 5.0 (notmuch 0.25). Please
+ * use notmuch_query_count_messages instead.
  */
-NOTMUCH_DEPRECATED(4,3)
-unsigned int
-notmuch_query_count_messages (notmuch_query_t *query);
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count);
 
 /**
  * Return the number of threads matching a search.
@@ -1047,22 +1061,20 @@ notmuch_query_count_messages (notmuch_query_t *query);
  * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The
  *      value of *count is not defined.
  *
- * @since libnotmuch 4.3 (notmuch 0.21)
+ * @since libnotmuch 5 (notmuch 0.25)
  */
 notmuch_status_t
-notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count);
+notmuch_query_count_threads (notmuch_query_t *query, unsigned *count);
 
 /**
- * like notmuch_query_count_threads, but without a status return.
- *
- * May return 0 in case of errors.
+ * Deprecated alias for notmuch_query_count_threads
  *
- * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please
+ * @deprecated Deprecated as of libnotmuch 5.0 (notmuch 0.25). Please
  * use notmuch_query_count_threads_st instead.
  */
-NOTMUCH_DEPRECATED(4,3)
-unsigned int
-notmuch_query_count_threads (notmuch_query_t *query);
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count);
 
 /**
  * Get the thread ID of 'thread'.
@@ -1811,7 +1823,7 @@ const char *
 notmuch_message_properties_key (notmuch_message_properties_t *properties);
 
 /**
- * Return the key from the current (key,value) pair.
+ * Return the value from the current (key,value) pair.
  *
  * This could be useful if iterating for a prefix.
  *
@@ -2110,6 +2122,8 @@ notmuch_bool_t
 notmuch_built_with (const char *name);
 /* @} */
 
+#pragma GCC visibility pop
+
 NOTMUCH_END_DECLS
 
 #endif
diff --git a/lib/notmuch.sym b/lib/notmuch.sym
new file mode 100644 (file)
index 0000000..7d0c0af
--- /dev/null
@@ -0,0 +1,7 @@
+{
+global:
+       _ZTI*;
+       _ZTS*;
+       notmuch_*;
+local: *;
+};
index 53efd4e18fc1698d88c0b8ac476fd33094f2e2fc..9c6ecc8db5ce0d4e6ecb1d4d5adfc1d65b715bc1 100644 (file)
@@ -29,6 +29,9 @@ struct _notmuch_query {
     notmuch_sort_t sort;
     notmuch_string_list_t *exclude_terms;
     notmuch_exclude_t omit_excluded;
+    notmuch_bool_t parsed;
+    Xapian::Query xapian_query;
+    std::set<std::string> terms;
 };
 
 typedef struct _notmuch_mset_messages {
@@ -46,7 +49,7 @@ struct _notmuch_doc_id_set {
 #define DOCIDSET_WORD(bit) ((bit) / CHAR_BIT)
 #define DOCIDSET_BIT(bit) ((bit) % CHAR_BIT)
 
-struct visible _notmuch_threads {
+struct _notmuch_threads {
     notmuch_query_t *query;
 
     /* The ordered list of doc ids matched by the query. */
@@ -71,6 +74,14 @@ _debug_query (void)
     return (env && strcmp (env, "") != 0);
 }
 
+/* Explicit destructor call for placement new */
+static int
+_notmuch_query_destructor (notmuch_query_t *query) {
+    query->xapian_query.~Query();
+    query->terms.~set<std::string>();
+    return 0;
+}
+
 notmuch_query_t *
 notmuch_query_create (notmuch_database_t *notmuch,
                      const char *query_string)
@@ -84,6 +95,12 @@ notmuch_query_create (notmuch_database_t *notmuch,
     if (unlikely (query == NULL))
        return NULL;
 
+    new (&query->xapian_query) Xapian::Query ();
+    new (&query->terms) std::set<std::string> ();
+    query->parsed = FALSE;
+
+    talloc_set_destructor (query, _notmuch_query_destructor);
+
     query->notmuch = notmuch;
 
     query->query_string = talloc_strdup (query, query_string);
@@ -97,6 +114,44 @@ notmuch_query_create (notmuch_database_t *notmuch,
     return query;
 }
 
+static notmuch_status_t
+_notmuch_query_ensure_parsed (notmuch_query_t *query)
+{
+    if (query->parsed)
+       return NOTMUCH_STATUS_SUCCESS;
+
+    try {
+       query->xapian_query =
+           query->notmuch->query_parser->
+               parse_query (query->query_string, NOTMUCH_QUERY_PARSER_FLAGS);
+
+       /* Xapian doesn't support skip_to on terms from a query since
+       *  they are unordered, so cache a copy of all terms in
+       *  something searchable.
+       */
+
+       for (Xapian::TermIterator t = query->xapian_query.get_terms_begin ();
+            t != query->xapian_query.get_terms_end (); ++t)
+           query->terms.insert (*t);
+
+       query->parsed = TRUE;
+
+    } catch (const Xapian::Error &error) {
+       if (!query->notmuch->exception_reported) {
+           _notmuch_database_log (query->notmuch,
+                                  "A Xapian exception occurred parsing query: %s\n",
+                                  error.get_msg ().c_str ());
+           _notmuch_database_log_append (query->notmuch,
+                                         "Query string was: %s\n",
+                                         query->query_string);
+           query->notmuch->exception_reported = TRUE;
+       }
+
+       return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+    }
+    return NOTMUCH_STATUS_SUCCESS;
+}
+
 const char *
 notmuch_query_get_query_string (const notmuch_query_t *query)
 {
@@ -122,11 +177,22 @@ notmuch_query_get_sort (const notmuch_query_t *query)
     return query->sort;
 }
 
-void
+notmuch_status_t
 notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag)
 {
-    char *term = talloc_asprintf (query, "%s%s", _find_prefix ("tag"), tag);
+    notmuch_status_t status;
+    char *term;
+
+    status = _notmuch_query_ensure_parsed (query);
+    if (status)
+       return status;
+
+    term = talloc_asprintf (query, "%s%s", _find_prefix ("tag"), tag);
+    if (query->terms.count(term) != 0)
+       return NOTMUCH_STATUS_IGNORED;
+
     _notmuch_string_list_append (query->exclude_terms, term);
+    return NOTMUCH_STATUS_SUCCESS;
 }
 
 /* We end up having to call the destructors explicitly because we had
@@ -145,46 +211,31 @@ _notmuch_messages_destructor (notmuch_mset_messages_t *messages)
 }
 
 /* Return a query that matches messages with the excluded tags
- * registered with query.  Any tags that explicitly appear in xquery
- * will not be excluded, and will be removed from the list of exclude
- * tags.  The caller of this function has to combine the returned
+ * registered with query. The caller of this function has to combine the returned
  * query appropriately.*/
 static Xapian::Query
-_notmuch_exclude_tags (notmuch_query_t *query, Xapian::Query xquery)
+_notmuch_exclude_tags (notmuch_query_t *query)
 {
     Xapian::Query exclude_query = Xapian::Query::MatchNothing;
 
     for (notmuch_string_node_t *term = query->exclude_terms->head; term;
         term = term->next) {
-       Xapian::TermIterator it = xquery.get_terms_begin ();
-       Xapian::TermIterator end = xquery.get_terms_end ();
-       for (; it != end; it++) {
-           if ((*it).compare (term->string) == 0)
-               break;
-       }
-       if (it == end)
-           exclude_query = Xapian::Query (Xapian::Query::OP_OR,
-                                   exclude_query, Xapian::Query (term->string));
-       else
-           term->string = talloc_strdup (query, "");
+       exclude_query = Xapian::Query (Xapian::Query::OP_OR,
+                                      exclude_query, Xapian::Query (term->string));
     }
     return exclude_query;
 }
 
-notmuch_messages_t *
-notmuch_query_search_messages (notmuch_query_t *query)
+
+notmuch_status_t
+notmuch_query_search_messages_st (notmuch_query_t *query,
+                                 notmuch_messages_t **out)
 {
-    notmuch_status_t status;
-    notmuch_messages_t *messages;
-    status = notmuch_query_search_messages_st (query, &messages);
-    if (status)
-       return NULL;
-    else
-       return messages;
+    return notmuch_query_search_messages (query, out);
 }
 
 notmuch_status_t
-notmuch_query_search_messages_st (notmuch_query_t *query,
+notmuch_query_search_messages (notmuch_query_t *query,
                                  notmuch_messages_t **out)
 {
     return _notmuch_query_search_documents (query, "mail", out);
@@ -198,6 +249,11 @@ _notmuch_query_search_documents (notmuch_query_t *query,
     notmuch_database_t *notmuch = query->notmuch;
     const char *query_string = query->query_string;
     notmuch_mset_messages_t *messages;
+    notmuch_status_t status;
+
+    status = _notmuch_query_ensure_parsed (query);
+    if (status)
+       return status;
 
     messages = talloc (query, notmuch_mset_messages_t);
     if (unlikely (messages == NULL))
@@ -217,7 +273,7 @@ _notmuch_query_search_documents (notmuch_query_t *query,
        Xapian::Query mail_query (talloc_asprintf (query, "%s%s",
                                                   _find_prefix ("type"),
                                                   type));
-       Xapian::Query string_query, final_query, exclude_query;
+       Xapian::Query final_query, exclude_query;
        Xapian::MSet mset;
        Xapian::MSetIterator iterator;
 
@@ -226,15 +282,13 @@ _notmuch_query_search_documents (notmuch_query_t *query,
        {
            final_query = mail_query;
        } else {
-           string_query = notmuch->query_parser->
-               parse_query (query_string, NOTMUCH_QUERY_PARSER_FLAGS);
            final_query = Xapian::Query (Xapian::Query::OP_AND,
-                                        mail_query, string_query);
+                                        mail_query, query->xapian_query);
        }
        messages->base.excluded_doc_ids = NULL;
 
        if ((query->omit_excluded != NOTMUCH_EXCLUDE_FALSE) && (query->exclude_terms)) {
-           exclude_query = _notmuch_exclude_tags (query, final_query);
+           exclude_query = _notmuch_exclude_tags (query);
 
            if (query->omit_excluded == NOTMUCH_EXCLUDE_TRUE ||
                query->omit_excluded == NOTMUCH_EXCLUDE_ALL)
@@ -432,22 +486,15 @@ _notmuch_threads_destructor (notmuch_threads_t *threads)
     return 0;
 }
 
-
-notmuch_threads_t *
-notmuch_query_search_threads (notmuch_query_t *query)
+notmuch_status_t
+notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out)
 {
-    notmuch_status_t status;
-    notmuch_threads_t *threads;
-    status = notmuch_query_search_threads_st (query, &threads);
-    if (status)
-       return NULL;
-    else
-       return threads;
+    return notmuch_query_search_threads(query, out);
 }
 
 notmuch_status_t
-notmuch_query_search_threads_st (notmuch_query_t *query,
-                                notmuch_threads_t **out)
+notmuch_query_search_threads (notmuch_query_t *query,
+                             notmuch_threads_t **out)
 {
     notmuch_threads_t *threads;
     notmuch_messages_t *messages;
@@ -461,7 +508,7 @@ notmuch_query_search_threads_st (notmuch_query_t *query,
 
     threads->query = query;
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (status) {
        talloc_free (threads);
        return status;
@@ -544,18 +591,14 @@ notmuch_threads_destroy (notmuch_threads_t *threads)
     talloc_free (threads);
 }
 
-unsigned int
-notmuch_query_count_messages (notmuch_query_t *query)
+notmuch_status_t
+notmuch_query_count_messages_st (notmuch_query_t *query, unsigned *count_out)
 {
-    notmuch_status_t status;
-    unsigned int count;
-
-    status = notmuch_query_count_messages_st (query, &count);
-    return status ? 0 : count;
+    return notmuch_query_count_messages (query, count_out);
 }
 
 notmuch_status_t
-notmuch_query_count_messages_st (notmuch_query_t *query, unsigned *count_out)
+notmuch_query_count_messages (notmuch_query_t *query, unsigned *count_out)
 {
     return _notmuch_query_count_documents (query, "mail", count_out);
 }
@@ -566,13 +609,18 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
     notmuch_database_t *notmuch = query->notmuch;
     const char *query_string = query->query_string;
     Xapian::doccount count = 0;
+    notmuch_status_t status;
+
+    status = _notmuch_query_ensure_parsed (query);
+    if (status)
+       return status;
 
     try {
        Xapian::Enquire enquire (*notmuch->xapian_db);
        Xapian::Query mail_query (talloc_asprintf (query, "%s%s",
                                                   _find_prefix ("type"),
                                                   type));
-       Xapian::Query string_query, final_query, exclude_query;
+       Xapian::Query final_query, exclude_query;
        Xapian::MSet mset;
 
        if (strcmp (query_string, "") == 0 ||
@@ -580,13 +628,11 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
        {
            final_query = mail_query;
        } else {
-           string_query = notmuch->query_parser->
-               parse_query (query_string, NOTMUCH_QUERY_PARSER_FLAGS);
            final_query = Xapian::Query (Xapian::Query::OP_AND,
-                                        mail_query, string_query);
+                                        mail_query, query->xapian_query);
        }
 
-       exclude_query = _notmuch_exclude_tags (query, final_query);
+       exclude_query = _notmuch_exclude_tags (query);
 
        final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
                                         final_query, exclude_query);
@@ -606,8 +652,9 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
        /*
         * Set the checkatleast parameter to the number of documents
         * in the database to make get_matches_estimated() exact.
+        * Set the max parameter to 0 to avoid fetching documents we will discard.
         */
-       mset = enquire.get_mset (0, notmuch->xapian_db->get_doccount (),
+       mset = enquire.get_mset (0, 0,
                                 notmuch->xapian_db->get_doccount ());
 
        count = mset.get_matches_estimated();
@@ -626,18 +673,14 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
     return NOTMUCH_STATUS_SUCCESS;
 }
 
-unsigned
-notmuch_query_count_threads (notmuch_query_t *query)
+notmuch_status_t
+notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count)
 {
-    notmuch_status_t status;
-    unsigned int count;
-
-    status = notmuch_query_count_threads_st (query, &count);
-    return status ? 0 : count;
+    return notmuch_query_count_threads (query, count);
 }
 
 notmuch_status_t
-notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count)
+notmuch_query_count_threads (notmuch_query_t *query, unsigned *count)
 {
     notmuch_messages_t *messages;
     GHashTable *hash;
@@ -646,7 +689,7 @@ notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count)
 
     sort = query->sort;
     query->sort = NOTMUCH_SORT_UNSORTED;
-    ret = notmuch_query_search_messages_st (query, &messages);
+    ret = notmuch_query_search_messages (query, &messages);
     if (ret)
        return ret;
     query->sort = sort;
diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc
new file mode 100644 (file)
index 0000000..084bc8c
--- /dev/null
@@ -0,0 +1,210 @@
+/* regexp-fields.cc - field processor glue for regex supporting fields
+ *
+ * This file is part of notmuch.
+ *
+ * Copyright Â© 2015 Austin Clements
+ * Copyright Â© 2016 David Bremner
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
+ *
+ * Author: Austin Clements <aclements@csail.mit.edu>
+ *                David Bremner <david@tethera.net>
+ */
+
+#include "regexp-fields.h"
+#include "notmuch-private.h"
+#include "database-private.h"
+
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+static void
+compile_regex (regex_t &regexp, const char *str)
+{
+    int err = regcomp (&regexp, str, REG_EXTENDED | REG_NOSUB);
+
+    if (err != 0) {
+       size_t len = regerror (err, &regexp, NULL, 0);
+       char *buffer = new char[len];
+       std::string msg;
+       (void) regerror (err, &regexp, buffer, len);
+       msg.assign (buffer, len);
+       delete[] buffer;
+
+       throw Xapian::QueryParserError (msg);
+    }
+}
+
+RegexpPostingSource::RegexpPostingSource (Xapian::valueno slot, const std::string &regexp)
+    : slot_ (slot)
+{
+    compile_regex (regexp_, regexp.c_str ());
+}
+
+RegexpPostingSource::~RegexpPostingSource ()
+{
+    regfree (&regexp_);
+}
+
+void
+RegexpPostingSource::init (const Xapian::Database &db)
+{
+    db_ = db;
+    it_ = db_.valuestream_begin (slot_);
+    end_ = db.valuestream_end (slot_);
+    started_ = false;
+}
+
+Xapian::doccount
+RegexpPostingSource::get_termfreq_min () const
+{
+    return 0;
+}
+
+Xapian::doccount
+RegexpPostingSource::get_termfreq_est () const
+{
+    return get_termfreq_max () / 2;
+}
+
+Xapian::doccount
+RegexpPostingSource::get_termfreq_max () const
+{
+    return db_.get_value_freq (slot_);
+}
+
+Xapian::docid
+RegexpPostingSource::get_docid () const
+{
+    return it_.get_docid ();
+}
+
+bool
+RegexpPostingSource::at_end () const
+{
+    return it_ == end_;
+}
+
+void
+RegexpPostingSource::next (unused (double min_wt))
+{
+    if (started_ && ! at_end ())
+       ++it_;
+    started_ = true;
+
+    for (; ! at_end (); ++it_) {
+       std::string value = *it_;
+       if (regexec (&regexp_, value.c_str (), 0, NULL, 0) == 0)
+           break;
+    }
+}
+
+void
+RegexpPostingSource::skip_to (Xapian::docid did, unused (double min_wt))
+{
+    started_ = true;
+    it_.skip_to (did);
+    for (; ! at_end (); ++it_) {
+       std::string value = *it_;
+       if (regexec (&regexp_, value.c_str (), 0, NULL, 0) == 0)
+           break;
+    }
+}
+
+bool
+RegexpPostingSource::check (Xapian::docid did, unused (double min_wt))
+{
+    started_ = true;
+    if (!it_.check (did) || at_end ())
+       return false;
+    return (regexec (&regexp_, (*it_).c_str (), 0, NULL, 0) == 0);
+}
+
+static inline Xapian::valueno _find_slot (std::string prefix)
+{
+    if (prefix == "from")
+       return NOTMUCH_VALUE_FROM;
+    else if (prefix == "subject")
+       return NOTMUCH_VALUE_SUBJECT;
+    else if (prefix == "mid")
+       return NOTMUCH_VALUE_MESSAGE_ID;
+    else
+       return Xapian::BAD_VALUENO;
+}
+
+RegexpFieldProcessor::RegexpFieldProcessor (std::string prefix,
+                                           notmuch_field_flag_t options_,
+                                           Xapian::QueryParser &parser_,
+                                           notmuch_database_t *notmuch_)
+       : slot (_find_slot (prefix)),
+         term_prefix (_find_prefix (prefix.c_str ())),
+         options (options_),
+         parser (parser_),
+         notmuch (notmuch_)
+{
+};
+
+Xapian::Query
+RegexpFieldProcessor::operator() (const std::string & str)
+{
+    if (str.empty ()) {
+       if (options & NOTMUCH_FIELD_PROBABILISTIC) {
+           return Xapian::Query(Xapian::Query::OP_AND_NOT,
+                            Xapian::Query::MatchAll,
+                            Xapian::Query (Xapian::Query::OP_WILDCARD, term_prefix));
+       } else {
+           return Xapian::Query (term_prefix);
+       }
+    }
+
+    if (str.at (0) == '/') {
+       if (str.length() > 1 && str.at (str.size () - 1) == '/'){
+           std::string regexp_str = str.substr(1,str.size () - 2);
+           if (slot != Xapian::BAD_VALUENO) {
+               RegexpPostingSource *postings = new RegexpPostingSource (slot, regexp_str);
+               return Xapian::Query (postings->release ());
+           } else {
+               std::vector<std::string> terms;
+               regex_t regexp;
+
+               compile_regex(regexp, regexp_str.c_str ());
+               for (Xapian::TermIterator it = notmuch->xapian_db->allterms_begin (term_prefix);
+                    it != notmuch->xapian_db->allterms_end (); ++it) {
+                   if (regexec (&regexp, (*it).c_str () + term_prefix.size(),
+                                0, NULL, 0) == 0)
+                       terms.push_back(*it);
+               }
+               return Xapian::Query (Xapian::Query::OP_OR, terms.begin(), terms.end());
+           }
+       } else {
+           throw Xapian::QueryParserError ("unmatched regex delimiter in '" + str + "'");
+       }
+    } else {
+       if (options & NOTMUCH_FIELD_PROBABILISTIC) {
+           /* TODO replace this with a nicer API level triggering of
+            * phrase parsing, when possible */
+           std::string query_str;
+
+           if (str.find (' ') != std::string::npos)
+               query_str = '"' + str + '"';
+           else
+               query_str = str;
+
+           return parser.parse_query (query_str, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix);
+       } else {
+           /* Boolean prefix */
+           std::string term = term_prefix + str;
+           return Xapian::Query (term);
+       }
+    }
+}
+#endif
diff --git a/lib/regexp-fields.h b/lib/regexp-fields.h
new file mode 100644 (file)
index 0000000..d5f9344
--- /dev/null
@@ -0,0 +1,81 @@
+/* regex-fields.h - xapian glue for semi-bruteforce regexp search
+ *
+ * This file is part of notmuch.
+ *
+ * Copyright Â© 2015 Austin Clements
+ * Copyright Â© 2016 David Bremner
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
+ *
+ * Author: Austin Clements <aclements@csail.mit.edu>
+ *                David Bremner <david@tethera.net>
+ */
+
+#ifndef NOTMUCH_REGEXP_FIELDS_H
+#define NOTMUCH_REGEXP_FIELDS_H
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+#include <sys/types.h>
+#include <regex.h>
+#include "database-private.h"
+#include "notmuch-private.h"
+
+/* A posting source that returns documents where a value matches a
+ * regexp.
+ */
+class RegexpPostingSource : public Xapian::PostingSource
+{
+ protected:
+    const Xapian::valueno slot_;
+    regex_t regexp_;
+    Xapian::Database db_;
+    bool started_;
+    Xapian::ValueIterator it_, end_;
+
+/* No copying */
+    RegexpPostingSource (const RegexpPostingSource &);
+    RegexpPostingSource &operator= (const RegexpPostingSource &);
+
+ public:
+    RegexpPostingSource (Xapian::valueno slot, const std::string &regexp);
+    ~RegexpPostingSource ();
+    void init (const Xapian::Database &db);
+    Xapian::doccount get_termfreq_min () const;
+    Xapian::doccount get_termfreq_est () const;
+    Xapian::doccount get_termfreq_max () const;
+    Xapian::docid get_docid () const;
+    bool at_end () const;
+    void next (unused (double min_wt));
+    void skip_to (Xapian::docid did, unused (double min_wt));
+    bool check (Xapian::docid did, unused (double min_wt));
+};
+
+
+class RegexpFieldProcessor : public Xapian::FieldProcessor {
+ protected:
+    Xapian::valueno slot;
+    std::string term_prefix;
+    notmuch_field_flag_t options;
+    Xapian::QueryParser &parser;
+    notmuch_database_t *notmuch;
+
+ public:
+    RegexpFieldProcessor (std::string prefix, notmuch_field_flag_t options,
+                         Xapian::QueryParser &parser_, notmuch_database_t *notmuch_);
+
+    ~RegexpFieldProcessor () { };
+
+    Xapian::Query operator()(const std::string & str);
+};
+#endif
+#endif /* NOTMUCH_REGEXP_FIELDS_H */
index b7dea1c2a577f4277455eaa0cfe9d2096aaab7c9..cb55b49a4f11a324744ccccc3e7876c945d297ca 100644 (file)
 
 #include "notmuch-private.h"
 
-#include "libsha1.h"
-
-/* Just some simple interfaces on top of libsha1 so that we can leave
- * libsha1 as untouched as possible. */
-
-static char *
-_hex_of_sha1_digest (const unsigned char digest[SHA1_DIGEST_SIZE])
-{
-    char *result, *r;
-    int i;
-
-    result = xcalloc (SHA1_DIGEST_SIZE * 2 + 1, 1);
-
-    for (r = result, i = 0;
-        i < SHA1_DIGEST_SIZE;
-        r += 2, i++)
-    {
-       sprintf (r, "%02x", digest[i]);
-    }
-
-    return result;
-}
+#include <glib.h>
 
 /* Create a hexadecimal string version of the SHA-1 digest of 'str'
  * (including its null terminating character).
@@ -52,16 +31,15 @@ _hex_of_sha1_digest (const unsigned char digest[SHA1_DIGEST_SIZE])
 char *
 _notmuch_sha1_of_string (const char *str)
 {
-    sha1_ctx sha1;
-    unsigned char digest[SHA1_DIGEST_SIZE];
-
-    sha1_begin (&sha1);
+    GChecksum *sha1;
+    char *digest;
 
-    sha1_hash ((unsigned char *) str, strlen (str) + 1, &sha1);
+    sha1 = g_checksum_new (G_CHECKSUM_SHA1);
+    g_checksum_update (sha1, (const guchar *) str, strlen (str) + 1);
+    digest = xstrdup (g_checksum_get_string (sha1));
+    g_checksum_free (sha1);
 
-    sha1_end (digest, &sha1);
-
-    return _hex_of_sha1_digest (digest);
+    return digest;
 }
 
 /* Create a hexadecimal string version of the SHA-1 digest of the
@@ -80,35 +58,36 @@ _notmuch_sha1_of_file (const char *filename)
 #define BLOCK_SIZE 4096
     unsigned char block[BLOCK_SIZE];
     size_t bytes_read;
-    sha1_ctx sha1;
-    unsigned char digest[SHA1_DIGEST_SIZE];
-    char *result;
+    GChecksum *sha1;
+    char *digest = NULL;
 
     file = fopen (filename, "r");
     if (file == NULL)
        return NULL;
 
-    sha1_begin (&sha1);
+    sha1 = g_checksum_new (G_CHECKSUM_SHA1);
+    if (sha1 == NULL)
+       goto DONE;
 
     while (1) {
        bytes_read = fread (block, 1, 4096, file);
        if (bytes_read == 0) {
-           if (feof (file)) {
+           if (feof (file))
                break;
-           } else if (ferror (file)) {
-               fclose (file);
-               return NULL;
-           }
+           else if (ferror (file))
+               goto DONE;
        } else {
-           sha1_hash (block, bytes_read, &sha1);
+           g_checksum_update (sha1, block, bytes_read);
        }
     }
 
-    sha1_end (digest, &sha1);
-
-    result = _hex_of_sha1_digest (digest);
+    digest = xstrdup (g_checksum_get_string (sha1));
 
-    fclose (file);
+  DONE:
+    if (sha1)
+       g_checksum_free (sha1);
+    if (file)
+       fclose (file);
 
-    return result;
+    return digest;
 }
index 84ee52980df6130948b7c2fd8c64bbb4c03d242f..1a1ecfa5507ee8cf35e243eb4b44ddfdcd0526eb 100644 (file)
@@ -26,7 +26,7 @@
 
 #define EMPTY_STRING(s) ((s)[0] == '\0')
 
-struct visible _notmuch_thread {
+struct _notmuch_thread {
     notmuch_database_t *notmuch;
     char *thread_id;
     char *subject;
@@ -505,7 +505,7 @@ _notmuch_thread_create (void *ctx,
      * oldest or newest subject is desired. */
     notmuch_query_set_sort (thread_id_query, NOTMUCH_SORT_OLDEST_FIRST);
 
-    status = notmuch_query_search_messages_st (thread_id_query, &messages);
+    status = notmuch_query_search_messages (thread_id_query, &messages);
     if (status)
        goto DONE;
 
index c9b82330f6e08908e85fcae2891bb003c5dfec98..f719422ec678bbe340cd670861bb5cf0b0ca347e 100644 (file)
@@ -322,20 +322,21 @@ mime_node_child (mime_node_t *parent, int child)
 static mime_node_t *
 _mime_node_seek_dfs_walk (mime_node_t *node, int *n)
 {
-    mime_node_t *ret = NULL;
     int i;
 
     if (*n == 0)
        return node;
 
     *n -= 1;
-    for (i = 0; i < node->nchildren && !ret; i++) {
+    for (i = 0; i < node->nchildren; i++) {
        mime_node_t *child = mime_node_child (node, i);
-       ret = _mime_node_seek_dfs_walk (child, n);
-       if (!ret)
-           talloc_free (child);
+       mime_node_t *ret = _mime_node_seek_dfs_walk (child, n);
+       if (ret)
+           return ret;
+
+       talloc_free (child);
     }
-    return ret;
+    return NULL;
 }
 
 mime_node_t *
index dc640326d4ec933d7cd21daff2541086b5d00af4..62d4bcec0b75e16a266dea4e40ce9ecd1f0cbaa9 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "compat.h"
 
-#include <gmime/gmime.h>
+#include "gmime-extra.h"
 
 typedef GMimeCryptoContext notmuch_crypto_context_t;
 /* This is automatically included only since gmime 2.6.10 */
@@ -83,10 +83,10 @@ typedef struct notmuch_show_params {
     notmuch_bool_t entire_thread;
     notmuch_bool_t omit_excluded;
     notmuch_bool_t output_body;
-    notmuch_bool_t raw;
     int part;
     notmuch_crypto_t crypto;
     notmuch_bool_t include_html;
+    GMimeStream *out_stream;
 } notmuch_show_params_t;
 
 /* There's no point in continuing when we've detected that we've done
@@ -145,7 +145,7 @@ chomp_newline (char *str)
  * this.  New (required) map fields can be added without increasing
  * this.
  */
-#define NOTMUCH_FORMAT_CUR 2
+#define NOTMUCH_FORMAT_CUR 3
 /* The minimum supported structured output format version.  Requests
  * for format versions below this will return an error. */
 #define NOTMUCH_FORMAT_MIN 1
@@ -263,10 +263,15 @@ json_quote_str (const void *ctx, const char *str);
 
 /* notmuch-config.c */
 
+typedef enum {
+    NOTMUCH_CONFIG_OPEN        = 1 << 0,
+    NOTMUCH_CONFIG_CREATE = 1 << 1,
+} notmuch_config_mode_t;
+
 notmuch_config_t *
 notmuch_config_open (void *ctx,
                     const char *filename,
-                    notmuch_bool_t create_new);
+                    notmuch_config_mode_t config_mode);
 
 void
 notmuch_config_close (notmuch_config_t *config);
index e5d42a0cbfd505ed9f1ba5b6984251a7324a3061..e4aaef610173661b83491cfec95547f82703ad3d 100644 (file)
@@ -202,6 +202,84 @@ get_username_from_passwd_file (void *ctx)
     return name;
 }
 
+static notmuch_bool_t
+get_config_from_file (notmuch_config_t *config, notmuch_bool_t create_new)
+{
+    #define BUF_SIZE 4096
+    char *config_str = NULL;
+    int config_len = 0;
+    int config_bufsize = BUF_SIZE;
+    size_t len;
+    GError *error = NULL;
+    notmuch_bool_t ret = FALSE;
+
+    FILE *fp = fopen(config->filename, "r");
+    if (fp == NULL) {
+       if (errno == ENOENT) {
+           /* If create_new is true, then the caller is prepared for a
+            * default configuration file in the case of FILE NOT FOUND.
+            */
+           if (create_new) {
+               config->is_new = TRUE;
+               ret = TRUE;
+           } else {
+               fprintf (stderr, "Configuration file %s not found.\n"
+                        "Try running 'notmuch setup' to create a configuration.\n",
+                        config->filename);
+           }
+       } else {
+           fprintf (stderr, "Error opening config file '%s': %s\n",
+                    config->filename, strerror(errno));
+       }
+       goto out;
+    }
+
+    config_str = talloc_zero_array (config, char, config_bufsize);
+    if (config_str == NULL) {
+       fprintf (stderr, "Error reading '%s': Out of memory\n", config->filename);
+       goto out;
+    }
+
+    while ((len = fread (config_str + config_len, 1,
+                        config_bufsize - config_len, fp)) > 0) {
+       config_len += len;
+       if (config_len == config_bufsize) {
+           config_bufsize += BUF_SIZE;
+           config_str = talloc_realloc (config, config_str, char, config_bufsize);
+           if (config_str == NULL) {
+               fprintf (stderr, "Error reading '%s': Failed to reallocate memory\n",
+                        config->filename);
+               goto out;
+           }
+       }
+    }
+
+    if (ferror (fp)) {
+       fprintf (stderr, "Error reading '%s': I/O error\n", config->filename);
+       goto out;
+    }
+
+    if (g_key_file_load_from_data (config->key_file, config_str, config_len,
+                                  G_KEY_FILE_KEEP_COMMENTS, &error)) {
+       ret = TRUE;
+       goto out;
+    }
+
+    fprintf (stderr, "Error parsing config file '%s': %s\n",
+            config->filename, error->message);
+
+    g_error_free (error);
+
+out:
+    if (fp)
+       fclose(fp);
+
+    if (config_str)
+       talloc_free(config_str);
+
+    return ret;
+}
+
 /* Open the named notmuch configuration file. If the filename is NULL,
  * the value of the environment variable $NOTMUCH_CONFIG will be used.
  * If $NOTMUCH_CONFIG is unset, the default configuration file
@@ -243,7 +321,7 @@ get_username_from_passwd_file (void *ctx)
 notmuch_config_t *
 notmuch_config_open (void *ctx,
                     const char *filename,
-                    notmuch_bool_t create_new)
+                    notmuch_config_mode_t config_mode)
 {
     GError *error = NULL;
     size_t tmp;
@@ -255,7 +333,7 @@ notmuch_config_open (void *ctx,
     int file_had_search_group;
     int file_had_crypto_group;
 
-    notmuch_config_t *config = talloc (ctx, notmuch_config_t);
+    notmuch_config_t *config = talloc_zero (ctx, notmuch_config_t);
     if (config == NULL) {
        fprintf (stderr, "Out of memory.\n");
        return NULL;
@@ -263,6 +341,9 @@ notmuch_config_open (void *ctx,
     
     talloc_set_destructor (config, notmuch_config_destructor);
 
+    /* non-zero defaults */
+    config->maildir_synchronize_flags = TRUE;
+
     if (filename) {
        config->filename = talloc_strdup (config, filename);
     } else if ((notmuch_config_env = getenv ("NOTMUCH_CONFIG"))) {
@@ -274,49 +355,11 @@ notmuch_config_open (void *ctx,
 
     config->key_file = g_key_file_new ();
 
-    config->is_new = FALSE;
-    config->database_path = NULL;
-    config->user_name = NULL;
-    config->user_primary_email = NULL;
-    config->user_other_email = NULL;
-    config->user_other_email_length = 0;
-    config->new_tags = NULL;
-    config->new_tags_length = 0;
-    config->new_ignore = NULL;
-    config->new_ignore_length = 0;
-    config->maildir_synchronize_flags = TRUE;
-    config->search_exclude_tags = NULL;
-    config->search_exclude_tags_length = 0;
-    config->crypto_gpg_path = NULL;
-
-    if (! g_key_file_load_from_file (config->key_file,
-                                    config->filename,
-                                    G_KEY_FILE_KEEP_COMMENTS,
-                                    &error))
-    {
-       if (error->domain == G_FILE_ERROR && error->code == G_FILE_ERROR_NOENT) {
-           /* If create_new is true, then the caller is prepared for a
-            * default configuration file in the case of FILE NOT
-            * FOUND.
-            */
-           if (create_new) {
-               g_error_free (error);
-               config->is_new = TRUE;
-           } else {
-               fprintf (stderr, "Configuration file %s not found.\n"
-                        "Try running 'notmuch setup' to create a configuration.\n",
-                        config->filename);
-               talloc_free (config);
-               g_error_free (error);
-               return NULL;
-           }
-       }
-       else
-       {
-           fprintf (stderr, "Error reading configuration file %s: %s\n",
-                    config->filename, error->message);
+    if (config_mode & NOTMUCH_CONFIG_OPEN) {
+       notmuch_bool_t create_new = (config_mode & NOTMUCH_CONFIG_CREATE) != 0;
+
+       if (! get_config_from_file (config, create_new)) {
            talloc_free (config);
-           g_error_free (error);
            return NULL;
        }
     }
@@ -591,11 +634,11 @@ _config_get_list (notmuch_config_t *config,
 
 static void
 _config_set_list (notmuch_config_t *config,
-                 const char *group, const char *name,
+                 const char *group, const char *key,
                  const char *list[],
                  size_t length, const char ***config_var )
 {
-    g_key_file_set_string_list (config->key_file, group, name, list, length);
+    g_key_file_set_string_list (config->key_file, group, key, list, length);
 
     /* drop the cached value */
     talloc_free (*config_var);
index 35a2aa707b4d88e62a357b6e123a0e19e2decaa0..50b0c193f04625c794b9ab9287ab6bdd9c4f29da 100644 (file)
@@ -43,7 +43,7 @@ count_files (notmuch_query_t *query)
     notmuch_status_t status;
     int count = 0;
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (print_status_query ("notmuch count", query, status))
        return -1;
 
@@ -87,18 +87,23 @@ print_count (notmuch_database_t *notmuch, const char *query_str,
        return -1;
     }
 
-    for (i = 0; i < exclude_tags_length; i++)
-       notmuch_query_add_tag_exclude (query, exclude_tags[i]);
+    for (i = 0; i < exclude_tags_length; i++) {
+       status = notmuch_query_add_tag_exclude (query, exclude_tags[i]);
+       if (status && status != NOTMUCH_STATUS_IGNORED) {
+           print_status_query ("notmuch count", query, status);
+           return -1;
+       }
+    }
 
     switch (output) {
     case OUTPUT_MESSAGES:
-       status = notmuch_query_count_messages_st (query, &ucount);
+       status = notmuch_query_count_messages (query, &ucount);
        if (print_status_query ("notmuch count", query, status))
            return -1;
        printf ("%u", ucount);
        break;
     case OUTPUT_THREADS:
-       status = notmuch_query_count_threads_st (query, &ucount);
+       status = notmuch_query_count_threads (query, &ucount);
        if (print_status_query ("notmuch count", query, status))
            return -1;
        printf ("%u", ucount);
@@ -106,7 +111,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str,
     case OUTPUT_FILES:
        count = count_files (query);
        if (count >= 0) {
-           printf ("%u", count);
+           printf ("%d", count);
        } else {
            ret = -1;
            goto DONE;
index 0bb946f8f3378babd16d261d2e1106e068150db5..5cc3b2f62b46530e5dbb3f63b5d127043fc9c610 100644 (file)
@@ -240,7 +240,7 @@ database_dump_file (notmuch_database_t *notmuch, gzFile output,
      */
     notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (print_status_query ("notmuch dump", query, status))
        return EXIT_FAILURE;
 
@@ -250,7 +250,8 @@ database_dump_file (notmuch_database_t *notmuch, gzFile output,
 
        message = notmuch_messages_get (messages);
 
-       if (dump_tags_message (notmuch, message, output_format, output,
+       if ((include & DUMP_INCLUDE_TAGS) &&
+           dump_tags_message (notmuch, message, output_format, output,
                               &buffer, &buffer_size))
            return EXIT_FAILURE;
 
diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua
deleted file mode 100755 (executable)
index f9d8371..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/env bash
-#
-# notmuch-emacs-mua - start composing a mail on the command line
-#
-# Copyright Â© 2014 Jani Nikula
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see https://www.gnu.org/licenses/ .
-#
-# Authors: Jani Nikula <jani@nikula.org>
-#
-
-set -eu
-
-# escape: "expand" '\' as '\\' and '"' as '\"'
-# calling convention: escape -v var "$arg" (like in bash printf).
-escape ()
-{
-    local __escape_arg__=${3//\\/\\\\}
-    printf -v $2 '%s' "${__escape_arg__//\"/\\\"}"
-}
-
-EMACS=${EMACS:-emacs}
-EMACSCLIENT=${EMACSCLIENT:-emacsclient}
-
-PRINT_ONLY=
-NO_WINDOW=
-USE_EMACSCLIENT=
-AUTO_DAEMON=
-CREATE_FRAME=
-
-escape -v pwd "$PWD"
-
-# The crux of it all: construct an elisp progn and eval it.
-ELISP="(prog1 'done (require 'notmuch) (cd \"$pwd\") (notmuch-mua-new-mail)"
-
-# Short options compatible with mutt(1).
-while getopts :s:c:b:i:h opt; do
-    # Handle errors and long options.
-    case "${opt}" in
-       :)
-           echo "$0: short option -${OPTARG} requires an argument." >&2
-           exit 1
-           ;;
-       \?)
-           opt=$1
-           if [ "${OPTARG}" != "-" ]; then
-               echo "$0: unknown short option -${OPTARG}." >&2
-               exit 1
-           fi
-
-           case "${opt}" in
-               # Long options with arguments.
-               --subject=*|--to=*|--cc=*|--bcc=*|--body=*)
-                   OPTARG=${opt#--*=}
-                   opt=${opt%%=*}
-                   ;;
-               # Long options without arguments.
-               --help|--print|--no-window-system|--client|--auto-daemon|--create-frame)
-                   ;;
-               *)
-                   echo "$0: unknown long option ${opt}, or argument mismatch." >&2
-                   exit 1
-                   ;;
-           esac
-           # getopts does not do this for what it considers errors.
-           OPTIND=$((OPTIND + 1))
-           ;;
-    esac
-
-    escape -v OPTARG "${OPTARG-none}"
-
-    case "${opt}" in
-       --help|h)
-           exec man notmuch-emacs-mua
-           ;;
-       --subject|s)
-           ELISP="${ELISP} (message-goto-subject) (insert \"${OPTARG}\")"
-           ;;
-       --to)
-           ELISP="${ELISP} (message-goto-to) (insert \"${OPTARG}, \")"
-           ;;
-       --cc|c)
-           ELISP="${ELISP} (message-goto-cc) (insert \"${OPTARG}, \")"
-           ;;
-       --bcc|b)
-           ELISP="${ELISP} (message-goto-bcc) (insert \"${OPTARG}, \")"
-           ;;
-       --body|i)
-           ELISP="${ELISP} (message-goto-body) (insert-file \"${OPTARG}\")"
-           ;;
-       --print)
-           PRINT_ONLY=1
-           ;;
-       --no-window-system)
-           NO_WINDOW="-nw"
-           ;;
-       --client)
-           USE_EMACSCLIENT="yes"
-           ;;
-       --auto-daemon)
-           AUTO_DAEMON="--alternate-editor="
-           CREATE_FRAME="-c"
-           ;;
-       --create-frame)
-           CREATE_FRAME="-c"
-           ;;
-       *)
-           # We should never end up here.
-           echo "$0: internal error (option ${opt})." >&2
-           exit 1
-           ;;
-    esac
-
-    shift $((OPTIND - 1))
-    OPTIND=1
-done
-
-# Positional parameters.
-for arg; do
-    escape -v arg "${arg}"
-    ELISP="${ELISP} (message-goto-to) (insert \"${arg}, \")"
-done
-
-# Kill the terminal/frame if we're creating one.
-if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
-    ELISP="${ELISP} (message-add-action #'save-buffers-kill-terminal 'exit)"
-fi
-
-# End progn.
-ELISP="${ELISP})"
-
-if [ -n "$PRINT_ONLY" ]; then
-    echo ${ELISP}
-    exit 0
-fi
-
-if [ -n "$USE_EMACSCLIENT" ]; then
-    # Evaluate the progn.
-    exec ${EMACSCLIENT} ${NO_WINDOW} ${CREATE_FRAME} ${AUTO_DAEMON} --eval "${ELISP}"
-else
-    exec ${EMACS} ${NO_WINDOW} --eval "${ELISP}"
-fi
index cc680b412a45e023e1b1b6cec0b92d37cf8c774c..3a60f7cae47fee568d8002f5db178b6ea7587d7a 100644 (file)
@@ -131,10 +131,10 @@ generic_print_progress (const char *action, const char *object,
     elapsed_overall = notmuch_time_elapsed (tv_start, tv_now);
     rate_overall = processed / elapsed_overall;
 
-    printf ("%s %d ", action, processed);
+    printf ("%s %u ", action, processed);
 
     if (total) {
-       printf ("of %d %s", total, object);
+       printf ("of %u %s", total, object);
        if (processed > 0 && elapsed_overall > 0.5) {
            double time_remaining = ((total - processed) / rate_overall);
            printf (" (");
@@ -738,18 +738,20 @@ count_files (const char *path, int *count, add_files_state_t *state)
         entry = fs_entries[i];
 
        /* Ignore special directories to avoid infinite recursion.
-        * Also ignore the .notmuch directory and files/directories
-        * the user has configured to be ignored.
+        * Also ignore the .notmuch directory.
         */
        if (strcmp (entry->d_name, ".") == 0 ||
            strcmp (entry->d_name, "..") == 0 ||
-           strcmp (entry->d_name, ".notmuch") == 0 ||
-           _entry_in_ignore_list (entry->d_name, state))
-       {
-           if (state->debug && _entry_in_ignore_list (entry->d_name, state))
+           strcmp (entry->d_name, ".notmuch") == 0)
+           continue;
+
+       /* Ignore any files/directories the user has configured to be
+        * ignored
+        */
+       if (_entry_in_ignore_list (entry->d_name, state)) {
+           if (state->debug)
                printf ("(D) count_files: explicitly ignoring %s/%s\n",
-                       path,
-                       entry->d_name);
+                       path, entry->d_name);
            continue;
        }
 
@@ -848,7 +850,7 @@ _remove_directory (void *ctx,
                   const char *path,
                   add_files_state_t *add_files_state)
 {
-    notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
+    notmuch_status_t status;
     notmuch_directory_t *directory;
     notmuch_filenames_t *files, *subdirs;
     char *absolute;
@@ -903,10 +905,9 @@ print_results (const add_files_state_t *state)
                state->processed_files == 1 ? "file" : "total files");
        notmuch_time_print_formatted_seconds (elapsed);
        if (elapsed > 1)
-           printf (" (%d files/sec.).\033[K\n",
+           printf (" (%d files/sec.)",
                    (int) (state->processed_files / elapsed));
-       else
-           printf (".\033[K\n");
+       printf (".%s\n", (state->output_is_a_tty) ? "\033[K" : "");
     }
 
     if (state->added_messages)
index 8c894974485d4f4ae32997388425904640d941da..e6c166414f1a72c376911b4e4dae63e26250e519 100644 (file)
 #include "sprinter.h"
 
 static void
-show_reply_headers (GMimeMessage *message)
+show_reply_headers (GMimeStream *stream, GMimeMessage *message)
 {
-    GMimeStream *stream_stdout = NULL;
-
-    stream_stdout = g_mime_stream_file_new (stdout);
-    if (stream_stdout) {
-       g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
-       /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */
-       g_mime_object_write_to_stream (GMIME_OBJECT(message), stream_stdout);
-       g_object_unref(stream_stdout);
+    /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */
+    if (g_mime_object_write_to_stream (GMIME_OBJECT(message), stream) < 0) {
+       INTERNAL_ERROR("failed to write headers to stdout\n");
     }
 }
 
 static void
-format_part_reply (mime_node_t *node)
+format_part_reply (GMimeStream *stream, mime_node_t *node)
 {
     int i;
 
     if (node->envelope_file) {
-       printf ("On %s, %s wrote:\n",
-               notmuch_message_get_header (node->envelope_file, "date"),
-               notmuch_message_get_header (node->envelope_file, "from"));
+       g_mime_stream_printf (stream, "On %s, %s wrote:\n",
+                             notmuch_message_get_header (node->envelope_file, "date"),
+                             notmuch_message_get_header (node->envelope_file, "from"));
     } else if (GMIME_IS_MESSAGE (node->part)) {
        GMimeMessage *message = GMIME_MESSAGE (node->part);
        InternetAddressList *recipients;
-       const char *recipients_string;
+       char *recipients_string;
 
-       printf ("> From: %s\n", g_mime_message_get_sender (message));
+       g_mime_stream_printf (stream, "> From: %s\n", g_mime_message_get_sender (message));
        recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
        recipients_string = internet_address_list_to_string (recipients, 0);
        if (recipients_string)
-           printf ("> To: %s\n",
-                   recipients_string);
+           g_mime_stream_printf (stream, "> To: %s\n",
+                                 recipients_string);
+       g_free (recipients_string);
        recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_CC);
        recipients_string = internet_address_list_to_string (recipients, 0);
        if (recipients_string)
-           printf ("> Cc: %s\n",
-                   recipients_string);
-       printf ("> Subject: %s\n", g_mime_message_get_subject (message));
-       printf ("> Date: %s\n", g_mime_message_get_date_as_string (message));
-       printf (">\n");
+           g_mime_stream_printf (stream, "> Cc: %s\n",
+                                 recipients_string);
+       g_free (recipients_string);
+       g_mime_stream_printf (stream, "> Subject: %s\n", g_mime_message_get_subject (message));
+       g_mime_stream_printf (stream, "> Date: %s\n", g_mime_message_get_date_as_string (message));
+       g_mime_stream_printf (stream, ">\n");
     } else if (GMIME_IS_PART (node->part)) {
        GMimeContentType *content_type = g_mime_object_get_content_type (node->part);
        GMimeContentDisposition *disposition = g_mime_object_get_content_disposition (node->part);
@@ -75,24 +72,21 @@ format_part_reply (mime_node_t *node)
            /* Ignore PGP/MIME cruft parts */
        } else if (g_mime_content_type_is_type (content_type, "text", "*") &&
                   !g_mime_content_type_is_type (content_type, "text", "html")) {
-           GMimeStream *stream_stdout = g_mime_stream_file_new (stdout);
-           g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
-           show_text_part_content (node->part, stream_stdout, NOTMUCH_SHOW_TEXT_PART_REPLY);
-           g_object_unref(stream_stdout);
+           show_text_part_content (node->part, stream, NOTMUCH_SHOW_TEXT_PART_REPLY);
        } else if (disposition &&
                   strcasecmp (g_mime_content_disposition_get_disposition (disposition),
                               GMIME_DISPOSITION_ATTACHMENT) == 0) {
            const char *filename = g_mime_part_get_filename (GMIME_PART (node->part));
-           printf ("Attachment: %s (%s)\n", filename,
-                   g_mime_content_type_to_string (content_type));
+           g_mime_stream_printf (stream, "Attachment: %s (%s)\n", filename,
+                                 g_mime_content_type_to_string (content_type));
        } else {
-           printf ("Non-text part: %s\n",
-                   g_mime_content_type_to_string (content_type));
+           g_mime_stream_printf (stream, "Non-text part: %s\n",
+                                 g_mime_content_type_to_string (content_type));
        }
     }
 
     for (i = 0; i < node->nchildren; i++)
-       format_part_reply (mime_node_child (node, i));
+       format_part_reply (stream, mime_node_child (node, i));
 }
 
 typedef enum {
@@ -337,6 +331,12 @@ add_recipients_from_message (GMimeMessage *reply,
                             GMimeMessage *message,
                             notmuch_bool_t reply_all)
 {
+
+    /* There is a memory leak here with gmime-2.6 because get_sender
+     * returns a newly allocated list, while the others return
+     * references to libgmime owned data. This leak will be fixed with
+     * the transition to gmime-3.0.
+     */
     struct {
        InternetAddressList * (*get_header)(GMimeMessage *message);
        GMimeRecipientType recipient_type;
@@ -630,12 +630,12 @@ static int do_reply(notmuch_config_t *config,
     if (format == FORMAT_JSON || format == FORMAT_SEXP) {
        unsigned count;
 
-       status = notmuch_query_count_messages_st (query, &count);
+       status = notmuch_query_count_messages (query, &count);
        if (print_status_query ("notmuch reply", query, status))
            return 1;
 
        if (count != 1) {
-           fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);
+           fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count);
            return 1;
        }
 
@@ -645,7 +645,7 @@ static int do_reply(notmuch_config_t *config,
            sp = sprinter_sexp_create (config, stdout);
     }
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (print_status_query ("notmuch reply", query, status))
        return 1;
 
@@ -678,9 +678,14 @@ static int do_reply(notmuch_config_t *config,
            /* End */
            sp->end (sp);
        } else {
-           show_reply_headers (reply);
-           if (format == FORMAT_DEFAULT)
-               format_part_reply (node);
+           GMimeStream *stream_stdout = stream_stdout = g_mime_stream_stdout_new ();
+           if (stream_stdout) {
+               show_reply_headers (stream_stdout, reply);
+               if (format == FORMAT_DEFAULT)
+                   format_part_reply (stream_stdout, node);
+           }
+           g_mime_stream_flush (stream_stdout);
+           g_object_unref(stream_stdout);
        }
 
        g_object_unref (G_OBJECT (reply));
@@ -701,11 +706,6 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[])
     int opt_index;
     notmuch_show_params_t params = {
        .part = -1,
-       .crypto = {
-           .verify = FALSE,
-           .decrypt = FALSE,
-           .gpgpath = NULL
-       }
     };
     int format = FORMAT_DEFAULT;
     int reply_all = TRUE;
index 8c65d5ad196d7705fca8142eac5199bae9c658b2..019e14eea846d6a68fe36a0210318bcd35d84063 100644 (file)
@@ -123,7 +123,7 @@ do_search_threads (search_context_t *ctx)
     if (ctx->offset < 0) {
        unsigned count;
        notmuch_status_t status;
-       status = notmuch_query_count_threads_st (ctx->query, &count);
+       status = notmuch_query_count_threads (ctx->query, &count);
        if (print_status_query ("notmuch search", ctx->query, status))
            return 1;
 
@@ -132,7 +132,7 @@ do_search_threads (search_context_t *ctx)
            ctx->offset = 0;
     }
 
-    status = notmuch_query_search_threads_st (ctx->query, &threads);
+    status = notmuch_query_search_threads (ctx->query, &threads);
     if (print_status_query("notmuch search", ctx->query, status))
        return 1;
 
@@ -529,7 +529,7 @@ do_search_messages (search_context_t *ctx)
     if (ctx->offset < 0) {
        unsigned count;
        notmuch_status_t status;
-       status = notmuch_query_count_messages_st (ctx->query, &count);
+       status = notmuch_query_count_messages (ctx->query, &count);
        if (print_status_query ("notmuch search", ctx->query, status))
            return 1;
 
@@ -538,7 +538,7 @@ do_search_messages (search_context_t *ctx)
            ctx->offset = 0;
     }
 
-    status = notmuch_query_search_messages_st (ctx->query, &messages);
+    status = notmuch_query_search_messages (ctx->query, &messages);
     if (print_status_query ("notmuch search", ctx->query, status))
        return 1;
 
@@ -629,7 +629,7 @@ do_search_tags (const search_context_t *ctx)
        tags = notmuch_database_get_all_tags (notmuch);
     } else {
        notmuch_status_t status;
-       status = notmuch_query_search_messages_st (query, &messages);
+       status = notmuch_query_search_messages (query, &messages);
        if (print_status_query ("notmuch search", query, status))
            return 1;
 
@@ -735,11 +735,19 @@ _notmuch_search_prepare (search_context_t *ctx, notmuch_config_t *config, int ar
     if (ctx->exclude != NOTMUCH_EXCLUDE_FALSE) {
        const char **search_exclude_tags;
        size_t search_exclude_tags_length;
+       notmuch_status_t status;
 
        search_exclude_tags = notmuch_config_get_search_exclude_tags
            (config, &search_exclude_tags_length);
-       for (i = 0; i < search_exclude_tags_length; i++)
-           notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]);
+
+       for (i = 0; i < search_exclude_tags_length; i++) {
+           status = notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]);
+           if (status && status != NOTMUCH_STATUS_IGNORED) {
+               print_status_query ("notmuch search", ctx->query, status);
+               return EXIT_FAILURE;
+           }
+       }
+
        notmuch_query_set_omit_excluded (ctx->query, ctx->exclude);
     }
 
index 22fa655ad20d8deea55297af4616c2cec7e292d0..3ce4b63cf5046492ab39ebf5ee865ecd72bb785b 100644 (file)
 #include "gmime-filter-reply.h"
 #include "sprinter.h"
 
-static notmuch_status_t
-format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,
-                 int indent, const notmuch_show_params_t *params);
-
-static const notmuch_show_format_t format_text = {
-    .new_sprinter = sprinter_text_create,
-    .part = format_part_text,
-};
-
-static notmuch_status_t
-format_part_sprinter_entry (const void *ctx, sprinter_t *sp, mime_node_t *node,
-                           int indent, const notmuch_show_params_t *params);
-
-static const notmuch_show_format_t format_json = {
-    .new_sprinter = sprinter_json_create,
-    .part = format_part_sprinter_entry,
-};
-
-static const notmuch_show_format_t format_sexp = {
-    .new_sprinter = sprinter_sexp_create,
-    .part = format_part_sprinter_entry,
-};
-
-static notmuch_status_t
-format_part_mbox (const void *ctx, sprinter_t *sp, mime_node_t *node,
-                 int indent, const notmuch_show_params_t *params);
-
-static const notmuch_show_format_t format_mbox = {
-    .new_sprinter = sprinter_text_create,
-    .part = format_part_mbox,
-};
-
-static notmuch_status_t
-format_part_raw (unused (const void *ctx), sprinter_t *sp, mime_node_t *node,
-                unused (int indent),
-                unused (const notmuch_show_params_t *params));
-
-static const notmuch_show_format_t format_raw = {
-    .new_sprinter = sprinter_text_create,
-    .part = format_part_raw,
-};
-
 static const char *
 _get_tags_as_string (const void *ctx, notmuch_message_t *message)
 {
@@ -110,6 +68,17 @@ _get_one_line_summary (const void *ctx, notmuch_message_t *message)
                            from, relative_date, tags);
 }
 
+static const char *_get_disposition(GMimeObject *meta)
+{
+    GMimeContentDisposition *disposition;
+
+    disposition = g_mime_object_get_content_disposition (meta);
+    if (!disposition)
+       return NULL;
+
+    return g_mime_content_disposition_get_disposition (disposition);
+}
+
 /* Emit a sequence of key/value pairs for the metadata of message.
  * The caller should begin a map before calling this. */
 static void
@@ -133,7 +102,20 @@ format_message_sprinter (sprinter_t *sp, notmuch_message_t *message)
     sp->boolean (sp, notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_EXCLUDED));
 
     sp->map_key (sp, "filename");
-    sp->string (sp, notmuch_message_get_filename (message));
+    if (notmuch_format_version >= 3) {
+       notmuch_filenames_t *filenames;
+
+       sp->begin_list (sp);
+       for (filenames = notmuch_message_get_filenames (message);
+            notmuch_filenames_valid (filenames);
+            notmuch_filenames_move_to_next (filenames)) {
+           sp->string (sp, notmuch_filenames_get (filenames));
+       }
+       notmuch_filenames_destroy (filenames);
+       sp->end (sp);
+    } else {
+       sp->string (sp, notmuch_message_get_filename (message));
+    }
 
     sp->map_key (sp, "timestamp");
     date = notmuch_message_get_date (message);
@@ -220,8 +202,9 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
      * reflected in the file devel/schemata. */
 
     InternetAddressList *recipients;
-    const char *recipients_string;
+    char *recipients_string;
     const char *reply_to_string;
+    char *date_string;
 
     sp->begin_map (sp);
 
@@ -236,6 +219,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
     if (recipients_string) {
        sp->map_key (sp, "To");
        sp->string (sp, recipients_string);
+       g_free (recipients_string);
     }
 
     recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_CC);
@@ -243,6 +227,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
     if (recipients_string) {
        sp->map_key (sp, "Cc");
        sp->string (sp, recipients_string);
+       g_free (recipients_string);
     }
 
     recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_BCC);
@@ -250,6 +235,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
     if (recipients_string) {
        sp->map_key (sp, "Bcc");
        sp->string (sp, recipients_string);
+       g_free (recipients_string);
     }
 
     reply_to_string = g_mime_message_get_reply_to (message);
@@ -266,7 +252,9 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
        sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "References"));
     } else {
        sp->map_key (sp, "Date");
-       sp->string (sp, g_mime_message_get_date_as_string (message));
+       date_string = g_mime_message_get_date_as_string (message);
+       sp->string (sp, date_string);
+       g_free (date_string);
     }
 
     sp->end (sp);
@@ -288,6 +276,7 @@ show_text_part_content (GMimeObject *part, GMimeStream *stream_out,
 {
     GMimeContentType *content_type = g_mime_object_get_content_type (GMIME_OBJECT (part));
     GMimeStream *stream_filter = NULL;
+    GMimeFilter *crlf_filter = NULL;
     GMimeDataWrapper *wrapper;
     const char *charset;
 
@@ -299,8 +288,10 @@ show_text_part_content (GMimeObject *part, GMimeStream *stream_out,
        return;
 
     stream_filter = g_mime_stream_filter_new (stream_out);
+    crlf_filter = g_mime_filter_crlf_new (FALSE, FALSE);
     g_mime_stream_filter_add(GMIME_STREAM_FILTER (stream_filter),
-                            g_mime_filter_crlf_new (FALSE, FALSE));
+                            crlf_filter);
+    g_object_unref (crlf_filter);
 
     charset = g_mime_object_get_content_type_parameter (part, "charset");
     if (charset) {
@@ -435,6 +426,7 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,
        GMIME_OBJECT (node->envelope_part) : node->part;
     GMimeContentType *content_type = g_mime_object_get_content_type (meta);
     const notmuch_bool_t leaf = GMIME_IS_PART (node->part);
+    GMimeStream *stream = params->out_stream;
     const char *part_type;
     int i;
 
@@ -442,69 +434,75 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,
        notmuch_message_t *message = node->envelope_file;
 
        part_type = "message";
-       printf ("\f%s{ id:%s depth:%d match:%d excluded:%d filename:%s\n",
-               part_type,
-               notmuch_message_get_message_id (message),
-               indent,
-               notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_MATCH) ? 1 : 0,
-               notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_EXCLUDED) ? 1 : 0,
-               notmuch_message_get_filename (message));
+       g_mime_stream_printf (stream, "\f%s{ id:%s depth:%d match:%d excluded:%d filename:%s\n",
+                             part_type,
+                             notmuch_message_get_message_id (message),
+                             indent,
+                             notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_MATCH) ? 1 : 0,
+                             notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_EXCLUDED) ? 1 : 0,
+                             notmuch_message_get_filename (message));
     } else {
-       GMimeContentDisposition *disposition = g_mime_object_get_content_disposition (meta);
+       char *content_string;
+       const char *disposition = _get_disposition (meta);
        const char *cid = g_mime_object_get_content_id (meta);
        const char *filename = leaf ?
            g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;
 
        if (disposition &&
-           strcasecmp (g_mime_content_disposition_get_disposition (disposition),
-                       GMIME_DISPOSITION_ATTACHMENT) == 0)
+           strcasecmp (disposition, GMIME_DISPOSITION_ATTACHMENT) == 0)
            part_type = "attachment";
        else
            part_type = "part";
 
-       printf ("\f%s{ ID: %d", part_type, node->part_num);
+       g_mime_stream_printf (stream, "\f%s{ ID: %d", part_type, node->part_num);
        if (filename)
-           printf (", Filename: %s", filename);
+           g_mime_stream_printf (stream, ", Filename: %s", filename);
        if (cid)
-           printf (", Content-id: %s", cid);
-       printf (", Content-type: %s\n", g_mime_content_type_to_string (content_type));
+           g_mime_stream_printf (stream, ", Content-id: %s", cid);
+
+       content_string = g_mime_content_type_to_string (content_type);
+       g_mime_stream_printf (stream, ", Content-type: %s\n", content_string);
+       g_free (content_string);
     }
 
     if (GMIME_IS_MESSAGE (node->part)) {
        GMimeMessage *message = GMIME_MESSAGE (node->part);
        InternetAddressList *recipients;
-       const char *recipients_string;
+       char *recipients_string;
+       char *date_string;
 
-       printf ("\fheader{\n");
+       g_mime_stream_printf (stream, "\fheader{\n");
        if (node->envelope_file)
-           printf ("%s\n", _get_one_line_summary (ctx, node->envelope_file));
-       printf ("Subject: %s\n", g_mime_message_get_subject (message));
-       printf ("From: %s\n", g_mime_message_get_sender (message));
+           g_mime_stream_printf (stream, "%s\n", _get_one_line_summary (ctx, node->envelope_file));
+       g_mime_stream_printf (stream, "Subject: %s\n", g_mime_message_get_subject (message));
+       g_mime_stream_printf (stream, "From: %s\n", g_mime_message_get_sender (message));
        recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
        recipients_string = internet_address_list_to_string (recipients, 0);
        if (recipients_string)
-           printf ("To: %s\n", recipients_string);
+           g_mime_stream_printf (stream, "To: %s\n", recipients_string);
+       g_free (recipients_string);
        recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_CC);
        recipients_string = internet_address_list_to_string (recipients, 0);
        if (recipients_string)
-           printf ("Cc: %s\n", recipients_string);
-       printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
-       printf ("\fheader}\n");
-
-       printf ("\fbody{\n");
+           g_mime_stream_printf (stream, "Cc: %s\n", recipients_string);
+       g_free (recipients_string);
+       date_string = g_mime_message_get_date_as_string (message);
+       g_mime_stream_printf (stream, "Date: %s\n", date_string);
+       g_free (date_string);
+       g_mime_stream_printf (stream, "\fheader}\n");
+
+       g_mime_stream_printf (stream, "\fbody{\n");
     }
 
     if (leaf) {
        if (g_mime_content_type_is_type (content_type, "text", "*") &&
            !g_mime_content_type_is_type (content_type, "text", "html"))
        {
-           GMimeStream *stream_stdout = g_mime_stream_file_new (stdout);
-           g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
-           show_text_part_content (node->part, stream_stdout, 0);
-           g_object_unref(stream_stdout);
+           show_text_part_content (node->part, stream, 0);
        } else {
-           printf ("Non-text part: %s\n",
-                   g_mime_content_type_to_string (content_type));
+           char *content_string = g_mime_content_type_to_string (content_type);
+           g_mime_stream_printf (stream, "Non-text part: %s\n", content_string);
+           g_free (content_string);
        }
     }
 
@@ -512,9 +510,9 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,
        format_part_text (ctx, sp, mime_node_child (node, i), indent, params);
 
     if (GMIME_IS_MESSAGE (node->part))
-       printf ("\fbody}\n");
+       g_mime_stream_printf (stream, "\fbody}\n");
 
-    printf ("\f%s}\n", part_type);
+    g_mime_stream_printf (stream, "\f%s}\n", part_type);
 
     return NOTMUCH_STATUS_SUCCESS;
 }
@@ -572,6 +570,8 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
     GMimeObject *meta = node->envelope_part ?
        GMIME_OBJECT (node->envelope_part) : node->part;
     GMimeContentType *content_type = g_mime_object_get_content_type (meta);
+    char *content_string;
+    const char *disposition = _get_disposition (meta);
     const char *cid = g_mime_object_get_content_id (meta);
     const char *filename = GMIME_IS_PART (node->part) ?
        g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;
@@ -599,7 +599,14 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
     }
 
     sp->map_key (sp, "content-type");
-    sp->string (sp, g_mime_content_type_to_string (content_type));
+    content_string = g_mime_content_type_to_string (content_type);
+    sp->string (sp, content_string);
+    g_free (content_string);
+
+    if (disposition) {
+       sp->map_key (sp, "content-disposition");
+       sp->string (sp, disposition);
+    }
 
     if (cid) {
        sp->map_key (sp, "content-id");
@@ -732,7 +739,7 @@ format_part_mbox (const void *ctx, unused (sprinter_t *sp), mime_node_t *node,
 static notmuch_status_t
 format_part_raw (unused (const void *ctx), unused (sprinter_t *sp),
                 mime_node_t *node, unused (int indent),
-                unused (const notmuch_show_params_t *params))
+                const notmuch_show_params_t *params)
 {
     if (node->envelope_file) {
        /* Special case the entire message to avoid MIME parsing. */
@@ -772,13 +779,7 @@ format_part_raw (unused (const void *ctx), unused (sprinter_t *sp),
        return NOTMUCH_STATUS_SUCCESS;
     }
 
-    GMimeStream *stream_stdout;
-    GMimeStream *stream_filter = NULL;
-
-    stream_stdout = g_mime_stream_file_new (stdout);
-    g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
-
-    stream_filter = g_mime_stream_filter_new (stream_stdout);
+    GMimeStream *stream_filter = g_mime_stream_filter_new (params->out_stream);
 
     if (GMIME_IS_PART (node->part)) {
        /* For leaf parts, we emit only the transfer-decoded
@@ -801,9 +802,6 @@ format_part_raw (unused (const void *ctx), unused (sprinter_t *sp),
     if (stream_filter)
        g_object_unref (stream_filter);
 
-    if (stream_stdout)
-       g_object_unref(stream_stdout);
-
     return NOTMUCH_STATUS_SUCCESS;
 }
 
@@ -899,16 +897,16 @@ do_show_single (void *ctx,
     notmuch_status_t status;
     unsigned int count;
 
-    status = notmuch_query_count_messages_st (query, &count);
+    status = notmuch_query_count_messages (query, &count);
     if (print_status_query ("notmuch show", query, status))
        return 1;
 
     if (count != 1) {
-       fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);
+       fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count);
        return 1;
     }
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (print_status_query ("notmuch show", query, status))
        return 1;
 
@@ -938,7 +936,7 @@ do_show (void *ctx,
     notmuch_messages_t *messages;
     notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS;
 
-    status= notmuch_query_search_threads_st (query, &threads);
+    status= notmuch_query_search_threads (query, &threads);
     if (print_status_query ("notmuch show", query, status))
        return 1;
 
@@ -978,10 +976,43 @@ enum {
     NOTMUCH_FORMAT_RAW
 };
 
+static const notmuch_show_format_t format_json = {
+    .new_sprinter = sprinter_json_create,
+    .part = format_part_sprinter_entry,
+};
+
+static const notmuch_show_format_t format_sexp = {
+    .new_sprinter = sprinter_sexp_create,
+    .part = format_part_sprinter_entry,
+};
+
+static const notmuch_show_format_t format_text = {
+    .new_sprinter = sprinter_text_create,
+    .part = format_part_text,
+};
+
+static const notmuch_show_format_t format_mbox = {
+    .new_sprinter = sprinter_text_create,
+    .part = format_part_mbox,
+};
+
+static const notmuch_show_format_t format_raw = {
+    .new_sprinter = sprinter_text_create,
+    .part = format_part_raw,
+};
+
+static const notmuch_show_format_t *formatters[] = {
+    [NOTMUCH_FORMAT_JSON] = &format_json,
+    [NOTMUCH_FORMAT_SEXP] = &format_sexp,
+    [NOTMUCH_FORMAT_TEXT] = &format_text,
+    [NOTMUCH_FORMAT_MBOX] = &format_mbox,
+    [NOTMUCH_FORMAT_RAW] = &format_raw,
+};
+
 enum {
-    ENTIRE_THREAD_DEFAULT,
-    ENTIRE_THREAD_TRUE,
-    ENTIRE_THREAD_FALSE,
+    ENTIRE_THREAD_DEFAULT = -1,
+    ENTIRE_THREAD_FALSE = FALSE,
+    ENTIRE_THREAD_TRUE = TRUE,
 };
 
 /* The following is to allow future options to be added more easily */
@@ -997,25 +1028,20 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     notmuch_query_t *query;
     char *query_string;
     int opt_index, ret;
-    const notmuch_show_format_t *format = &format_text;
+    const notmuch_show_format_t *formatter;
     sprinter_t *sprinter;
     notmuch_show_params_t params = {
        .part = -1,
        .omit_excluded = TRUE,
        .output_body = TRUE,
-       .crypto = {
-           .verify = FALSE,
-           .decrypt = FALSE,
-           .gpgpath = NULL
-       },
-       .include_html = FALSE
     };
-    int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED;
+    int format = NOTMUCH_FORMAT_NOT_SPECIFIED;
     int exclude = EXCLUDE_TRUE;
     int entire_thread = ENTIRE_THREAD_DEFAULT;
+    notmuch_bool_t single_message;
 
     notmuch_opt_desc_t options[] = {
-       { NOTMUCH_OPT_KEYWORD, &format_sel, "format", 'f',
+       { NOTMUCH_OPT_KEYWORD, &format, "format", 'f',
          (notmuch_keyword_t []){ { "json", NOTMUCH_FORMAT_JSON },
                                  { "text", NOTMUCH_FORMAT_TEXT },
                                  { "sexp", NOTMUCH_FORMAT_SEXP },
@@ -1051,40 +1077,25 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     if (params.crypto.decrypt)
        params.crypto.verify = TRUE;
 
-    if (format_sel == NOTMUCH_FORMAT_NOT_SPECIFIED) {
+    /* specifying a part implies single message display */
+    single_message = params.part >= 0;
+
+    if (format == NOTMUCH_FORMAT_NOT_SPECIFIED) {
        /* if part was requested and format was not specified, use format=raw */
        if (params.part >= 0)
-           format_sel = NOTMUCH_FORMAT_RAW;
+           format = NOTMUCH_FORMAT_RAW;
        else
-           format_sel = NOTMUCH_FORMAT_TEXT;
+           format = NOTMUCH_FORMAT_TEXT;
     }
 
-    switch (format_sel) {
-    case NOTMUCH_FORMAT_JSON:
-       format = &format_json;
-       break;
-    case NOTMUCH_FORMAT_TEXT:
-       format = &format_text;
-       break;
-    case NOTMUCH_FORMAT_SEXP:
-       format = &format_sexp;
-       break;
-    case NOTMUCH_FORMAT_MBOX:
+    if (format == NOTMUCH_FORMAT_MBOX) {
        if (params.part > 0) {
            fprintf (stderr, "Error: specifying parts is incompatible with mbox output format.\n");
            return EXIT_FAILURE;
        }
-
-       format = &format_mbox;
-       break;
-    case NOTMUCH_FORMAT_RAW:
-       format = &format_raw;
-       /* If --format=raw specified without specifying part, we can only
-        * output single message, so set part=0 */
-       if (params.part < 0)
-           params.part = 0;
-       params.raw = TRUE;
-       break;
+    } else if (format == NOTMUCH_FORMAT_RAW) {
+       /* raw format only supports single message display */
+       single_message = TRUE;
     }
 
     notmuch_exit_if_unsupported_format ();
@@ -1092,10 +1103,12 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     /* Default is entire-thread = FALSE except for format=json and
      * format=sexp. */
     if (entire_thread == ENTIRE_THREAD_DEFAULT) {
-       if (format == &format_json || format == &format_sexp)
-           entire_thread = ENTIRE_THREAD_TRUE;
+       if (format == NOTMUCH_FORMAT_JSON || format == NOTMUCH_FORMAT_SEXP)
+           params.entire_thread = TRUE;
        else
-           entire_thread = ENTIRE_THREAD_FALSE;
+           params.entire_thread = FALSE;
+    } else {
+       params.entire_thread = entire_thread;
     }
 
     if (!params.output_body) {
@@ -1103,22 +1116,17 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
            fprintf (stderr, "Warning: --body=false is incompatible with --part > 0. Disabling.\n");
            params.output_body = TRUE;
        } else {
-           if (format != &format_json && format != &format_sexp)
+           if (format != NOTMUCH_FORMAT_JSON && format != NOTMUCH_FORMAT_SEXP)
                fprintf (stderr,
                         "Warning: --body=false only implemented for format=json and format=sexp\n");
        }
     }
 
     if (params.include_html &&
-        (format_sel != NOTMUCH_FORMAT_JSON && format_sel != NOTMUCH_FORMAT_SEXP)) {
+        (format != NOTMUCH_FORMAT_JSON && format != NOTMUCH_FORMAT_SEXP)) {
        fprintf (stderr, "Warning: --include-html only implemented for format=json and format=sexp\n");
     }
 
-    if (entire_thread == ENTIRE_THREAD_TRUE)
-       params.entire_thread = TRUE;
-    else
-       params.entire_thread = FALSE;
-
     query_string = query_string_from_args (config, argc-opt_index, argv+opt_index);
     if (query_string == NULL) {
        fprintf (stderr, "Out of memory\n");
@@ -1145,32 +1153,47 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     }
 
     /* Create structure printer. */
-    sprinter = format->new_sprinter(config, stdout);
+    formatter = formatters[format];
+    sprinter = formatter->new_sprinter(config, stdout);
+
+    params.out_stream = g_mime_stream_stdout_new ();
 
     /* If a single message is requested we do not use search_excludes. */
-    if (params.part >= 0)
-       ret = do_show_single (config, query, format, sprinter, &params);
-    else {
+    if (single_message) {
+       ret = do_show_single (config, query, formatter, sprinter, &params);
+    else {
        /* We always apply set the exclude flag. The
         * exclude=true|false option controls whether or not we return
         * threads that only match in an excluded message */
        const char **search_exclude_tags;
        size_t search_exclude_tags_length;
        unsigned int i;
+       notmuch_status_t status;
 
        search_exclude_tags = notmuch_config_get_search_exclude_tags
            (config, &search_exclude_tags_length);
-       for (i = 0; i < search_exclude_tags_length; i++)
-           notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
+
+       for (i = 0; i < search_exclude_tags_length; i++) {
+           status = notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
+           if (status && status != NOTMUCH_STATUS_IGNORED) {
+               print_status_query ("notmuch show", query, status);
+               ret = -1;
+               goto DONE;
+           }
+       }
 
        if (exclude == EXCLUDE_FALSE) {
            notmuch_query_set_omit_excluded (query, FALSE);
            params.omit_excluded = FALSE;
        }
 
-       ret = do_show (config, query, format, sprinter, &params);
+       ret = do_show (config, query, formatter, sprinter, &params);
     }
 
+ DONE:
+    g_mime_stream_flush (params.out_stream);
+    g_object_unref (params.out_stream);
+
     notmuch_crypto_cleanup (&params.crypto);
     notmuch_query_destroy (query);
     notmuch_database_destroy (notmuch);
index 18d78ddd1ad7a2391e9f66b7f5c6c2eb905c42a1..9c03754d58568a04f9a7971d2296ab014c19f054 100644 (file)
@@ -121,7 +121,7 @@ tag_query (void *ctx, notmuch_database_t *notmuch, const char *query_string,
     /* tagging is not interested in any special sort order */
     notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);
 
-    status = notmuch_query_search_messages_st (query, &messages);
+    status = notmuch_query_search_messages (query, &messages);
     if (print_status_query ("notmuch tag", query, status))
        return status;
 
index 38b73c1d2accea68fa9d667fccfe518f97ab86ea..8e332ce644101addf99304952334b71838817f11 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -33,7 +33,7 @@ typedef int (*command_function_t) (notmuch_config_t *config, int argc, char *arg
 typedef struct command {
     const char *name;
     command_function_t function;
-    notmuch_bool_t create_config;
+    notmuch_config_mode_t config_mode;
     const char *summary;
 } command_t;
 
@@ -97,35 +97,35 @@ int notmuch_minimal_options (const char *subcommand_name,
 }
 
 static command_t commands[] = {
-    { NULL, notmuch_command, TRUE,
+    { NULL, notmuch_command, NOTMUCH_CONFIG_OPEN | NOTMUCH_CONFIG_CREATE,
       "Notmuch main command." },
-    { "setup", notmuch_setup_command, TRUE,
+    { "setup", notmuch_setup_command, NOTMUCH_CONFIG_OPEN | NOTMUCH_CONFIG_CREATE,
       "Interactively set up notmuch for first use." },
-    { "new", notmuch_new_command, FALSE,
+    { "new", notmuch_new_command, NOTMUCH_CONFIG_OPEN,
       "Find and import new messages to the notmuch database." },
-    { "insert", notmuch_insert_command, FALSE,
+    { "insert", notmuch_insert_command, NOTMUCH_CONFIG_OPEN,
       "Add a new message into the maildir and notmuch database." },
-    { "search", notmuch_search_command, FALSE,
+    { "search", notmuch_search_command, NOTMUCH_CONFIG_OPEN,
       "Search for messages matching the given search terms." },
-    { "address", notmuch_address_command, FALSE,
+    { "address", notmuch_address_command, NOTMUCH_CONFIG_OPEN,
       "Get addresses from messages matching the given search terms." },
-    { "show", notmuch_show_command, FALSE,
+    { "show", notmuch_show_command, NOTMUCH_CONFIG_OPEN,
       "Show all messages matching the search terms." },
-    { "count", notmuch_count_command, FALSE,
+    { "count", notmuch_count_command, NOTMUCH_CONFIG_OPEN,
       "Count messages matching the search terms." },
-    { "reply", notmuch_reply_command, FALSE,
+    { "reply", notmuch_reply_command, NOTMUCH_CONFIG_OPEN,
       "Construct a reply template for a set of messages." },
-    { "tag", notmuch_tag_command, FALSE,
+    { "tag", notmuch_tag_command, NOTMUCH_CONFIG_OPEN,
       "Add/remove tags for all messages matching the search terms." },
-    { "dump", notmuch_dump_command, FALSE,
+    { "dump", notmuch_dump_command, NOTMUCH_CONFIG_OPEN,
       "Create a plain-text dump of the tags for each message." },
-    { "restore", notmuch_restore_command, FALSE,
+    { "restore", notmuch_restore_command, NOTMUCH_CONFIG_OPEN,
       "Restore the tags from the given dump file (see 'dump')." },
-    { "compact", notmuch_compact_command, FALSE,
+    { "compact", notmuch_compact_command, NOTMUCH_CONFIG_OPEN,
       "Compact the notmuch database." },
-    { "config", notmuch_config_command, FALSE,
+    { "config", notmuch_config_command, NOTMUCH_CONFIG_OPEN,
       "Get or set settings in the notmuch configuration file." },
-    { "help", notmuch_help_command, TRUE, /* create but don't save config */
+    { "help", notmuch_help_command, NOTMUCH_CONFIG_CREATE, /* create but don't save config */
       "This message, or more detailed help for the named command." }
 };
 
@@ -363,6 +363,39 @@ notmuch_command (notmuch_config_t *config,
     return EXIT_SUCCESS;
 }
 
+/*
+ * Try to run subcommand in argv[0] as notmuch- prefixed external
+ * command. argv must be NULL terminated (argv passed to main always
+ * is).
+ *
+ * Does not return if the external command is found and
+ * executed. Return TRUE if external command is not found. Return
+ * FALSE on errors.
+ */
+static notmuch_bool_t try_external_command(char *argv[])
+{
+    char *old_argv0 = argv[0];
+    notmuch_bool_t ret = TRUE;
+
+    argv[0] = talloc_asprintf (NULL, "notmuch-%s", old_argv0);
+
+    /*
+     * This will only return on errors. Not finding an external
+     * command (ENOENT) is not an error from our perspective.
+     */
+    execvp (argv[0], argv);
+    if (errno != ENOENT) {
+       fprintf (stderr, "Error: Running external command '%s' failed: %s\n",
+                argv[0], strerror(errno));
+       ret = FALSE;
+    }
+
+    talloc_free (argv[0]);
+    argv[0] = old_argv0;
+
+    return ret;
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -406,13 +439,15 @@ main (int argc, char *argv[])
 
     command = find_command (command_name);
     if (!command) {
-       fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n",
-                command_name);
+       /* This won't return if the external command is found. */
+       if (try_external_command(argv + opt_index))
+           fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n",
+                    command_name);
        ret = EXIT_FAILURE;
        goto DONE;
     }
 
-    config = notmuch_config_open (local, config_file_name, command->create_config);
+    config = notmuch_config_open (local, config_file_name, command->config_mode);
     if (!config) {
        ret = EXIT_FAILURE;
        goto DONE;
diff --git a/notmuch.desktop b/notmuch.desktop
deleted file mode 100644 (file)
index f160047..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Name=Notmuch (emacs interface)
-Exec=emacs -f notmuch
-Icon=emblem-mail
-Terminal=false
-Type=Application
-Categories=Network;Email;
diff --git a/performance-test/M02-show.sh b/performance-test/M02-show.sh
new file mode 100755 (executable)
index 0000000..d73035e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+test_description='show'
+
+. ./perf-test-lib.sh || exit 1
+
+memory_start
+
+memory_run 'show *' "notmuch show '*' 1>/dev/null"
+memory_run 'show --format=json *' "notmuch show --format=json '*' 1>/dev/null"
+memory_run 'show --format=sexp *' "notmuch show --format=sexp '*' 1>/dev/null"
+
+memory_done
diff --git a/performance-test/M03-search.sh b/performance-test/M03-search.sh
new file mode 100755 (executable)
index 0000000..8d026ee
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+test_description='search'
+
+. ./perf-test-lib.sh || exit 1
+
+memory_start
+
+memory_run 'search *' "notmuch search '*' 1>/dev/null"
+memory_run 'search --format=json *' "notmuch search --format=json '*' 1>/dev/null"
+memory_run 'search --format=sexp *' "notmuch search --format=sexp '*' 1>/dev/null"
+
+memory_done
diff --git a/performance-test/M04-reply.sh b/performance-test/M04-reply.sh
new file mode 100755 (executable)
index 0000000..0e1ce08
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+test_description='search'
+
+. ./perf-test-lib.sh || exit 1
+
+memory_start
+
+for id in $(notmuch search --output=messages '*' | shuf -n 5); do
+    memory_run "reply $id" "notmuch reply \"$id\" 1>/dev/null"
+    memory_run "reply --format=json $id" "notmuch reply --format=json \"$id\" 1>/dev/null"
+    memory_run "reply --format=sexp $id" "notmuch reply --format=sexp \"$id\" 1>/dev/null"
+done
+
+memory_done
index 00d2f1c6050bb7330bba19e4a17a7bbe097cae42..c89d5aab39a069e7ee28596b3f20ea0e7a8803ed 100644 (file)
@@ -149,7 +149,7 @@ memory_run ()
 
     printf "[ %d ]\t%s\n" $test_count "$1"
 
-    NOTMUCH_TALLOC_REPORT="$talloc_log" valgrind --leak-check=full --log-file="$log_file" $2
+    NOTMUCH_TALLOC_REPORT="$talloc_log" eval "valgrind --leak-check=full --log-file='$log_file' $2"
 
     awk '/LEAK SUMMARY/,/suppressed/ { sub(/^==[0-9]*==/," "); print }' "$log_file"
     echo
index 343c161f471aa827ff186df01e7c24afe71e5d06..d9fca7b832fd91ed4cc41469adf437cbd9fac595 100644 (file)
@@ -28,13 +28,15 @@ line_error (tag_parse_status_t status,
     fprintf (stderr, status < 0 ? "Error: " : "Warning: ");
     vfprintf (stderr, format, va_args);
     fprintf (stderr, " [%s]\n", line);
+
+    va_end (va_args);
+
     return status;
 }
 
 const char *
 illegal_tag (const char *tag, notmuch_bool_t remove)
 {
-
     if (*tag == '\0' && ! remove)
        return "empty tag forbidden";
 
@@ -155,7 +157,6 @@ tag_parse_status_t
 parse_tag_command_line (void *ctx, int argc, char **argv,
                        char **query_str, tag_op_list_t *tag_ops)
 {
-
     int i;
 
     for (i = 0; i < argc; i++) {
@@ -202,6 +203,8 @@ message_error (notmuch_message_t *message,
     vfprintf (stderr, format, va_args);
     fprintf (stderr, "Message-ID: %s\n", notmuch_message_get_message_id (message));
     fprintf (stderr, "Status: %s\n", notmuch_status_to_string (status));
+
+    va_end (va_args);
 }
 
 static int
@@ -209,14 +212,12 @@ makes_changes (notmuch_message_t *message,
               tag_op_list_t *list,
               tag_op_flag_t flags)
 {
-
     size_t i;
 
     notmuch_tags_t *tags;
     notmuch_bool_t changes = FALSE;
 
     /* First, do we delete an existing tag? */
-    changes = FALSE;
     for (tags = notmuch_message_get_tags (message);
         ! changes && notmuch_tags_valid (tags);
         notmuch_tags_move_to_next (tags)) {
index 91b369367bdf0814706815ddd9a1698bf170b651..0df72c9216541fce4a342358869d2d4f20b2e5f3 100644 (file)
@@ -12,15 +12,15 @@ smtp_dummy_srcs =           \
 
 smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
 
-$(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
+$(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libnotmuch_util.a
        $(call quiet,CC) $^ -o $@ $(LDFLAGS)
 
-$(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a
+$(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libnotmuch_util.a
        $(call quiet,CC) $^ -o $@ $(LDFLAGS) $(TALLOC_LDFLAGS)
 
 random_corpus_deps =  $(dir)/random-corpus.o  $(dir)/database-test.o \
                        notmuch-config.o status.o command-line-arguments.o \
-                       lib/libnotmuch.a util/libutil.a \
+                       lib/libnotmuch.a util/libnotmuch_util.a \
                        parse-time-string/libparse-time-string.a
 
 $(dir)/random-corpus: $(random_corpus_deps)
@@ -61,7 +61,7 @@ test-binaries: $(TEST_BINARIES)
 
 test:  all test-binaries
 ifeq ($V,)
-       @echo 'Use "$(MAKE) V=1" to print test headings and PASSing results.'
+       @echo 'Use "$(MAKE) V=1" to see the details for passing and known broken tests.'
        @env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS)
 else
 # The user has explicitly enabled quiet execution.
@@ -77,4 +77,4 @@ check: test
 SRCS := $(SRCS) $(test_srcs)
 CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \
         $(dir)/database-test.o \
-        $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*
+        $(dir)/corpora.mail $(dir)/test-results $(dir)/tmp.*
index 104a120ea28bfb7250243f1d331ed8efd1e99fa0..f2499bce780bdda3ae1c17242aab4f00d9ad8252 100644 (file)
@@ -33,6 +33,17 @@ chosen directory to your PATH before running the tests.
 
 e.g. env PATH=/opt/gnu/bin:$PATH make test
 
+For FreeBSD you need to install latest gdb from ports or packages and
+provide path to it in TEST_GDB environment variable before executing
+the tests, native FreeBSD gdb does not not work.  If you install
+coreutils, which provides GNU versions of basic utils like 'date' and
+'base64' on FreeBSD, the test suite will use these instead of the
+native ones. This provides robustness against portability issues with
+these system tools. Most often the tests are written, reviewed and
+tested on Linux system so such portability issues arise from time to
+time.
+
+
 Running Tests
 -------------
 The easiest way to run tests is to say "make test", (or simply run the
@@ -189,16 +200,21 @@ Test harness library
 There are a handful helper functions defined in the test harness
 library for your script to use.
 
- test_expect_success <message> <script>
+ test_begin_subtest <message>
+
+   Set the test description message for a subsequent test_expect_*
+   invocation (see below).
+
+ test_expect_success <script>
 
-   This takes two strings as parameter, and evaluates the
+   This takes a string as parameter, and evaluates the
    <script>.  If it yields success, test is considered
-   successful.  <message> should state what it is testing.
+   successful.
 
- test_begin_subtest <message>
+ test_expect_code <code> <script>
 
-   Set the test description message for a subsequent test_expect_equal
-   invocation (see below).
+   This takes two strings as parameter, and evaluates the <script>.
+   If it yields <code> exit status, test is considered successful.
 
  test_subtest_known_broken
 
index d6811bd1075639d71986b283880d6bb40312a3b1..36a7ca4c5bdfb78ed28430ab6c471123780b85f9 100755 (executable)
@@ -18,26 +18,21 @@ fi
 
 ################################################################
 # Test harness
-test_expect_success 'success is reported like this' '
-    :
-'
+test_begin_subtest 'success is reported like this'
+test_expect_success ':'
+
+test_begin_subtest 'test runs if prerequisite is satisfied'
 test_set_prereq HAVEIT
 haveit=no
-test_expect_success HAVEIT 'test runs if prerequisite is satisfied' '
-    test_have_prereq HAVEIT &&
-    haveit=yes
-'
+test_expect_success 'test_have_prereq HAVEIT && haveit=yes'
 
+test_begin_subtest 'tests clean up after themselves'
 clean=no
-test_expect_success 'tests clean up after themselves' '
-    test_when_finished clean=yes
-'
+test_expect_success 'test_when_finished clean=yes'
 
+test_begin_subtest 'tests clean up even after a failure'
 cleaner=no
-test_expect_code 1 'tests clean up even after a failure' '
-    test_when_finished cleaner=yes &&
-    (exit 1)
-'
+test_expect_code 1 'test_when_finished cleaner=yes && (exit 1)'
 
 if test $clean$cleaner != yesyes
 then
@@ -45,9 +40,8 @@ then
        exit 1
 fi
 
-test_expect_code 2 'failure to clean up causes the test to fail' '
-    test_when_finished "(exit 2)"
-'
+test_begin_subtest 'failure to clean up causes the test to fail'
+test_expect_code 2 'test_when_finished "(exit 2)"'
 
 EXPECTED=$TEST_DIRECTORY/test.expected-output
 suppress_diff_date() {
@@ -72,19 +66,15 @@ test_expect_equal "$output" "$expected"
 ################################################################
 # Test mail store prepared in test-lib.sh
 
-test_expect_success \
-    'test that mail store was created' \
-    'test -d "${MAIL_DIR}"'
-
+test_begin_subtest 'test that mail store was created'
+test_expect_success 'test -d "${MAIL_DIR}"'
 
+test_begin_subtest 'mail store should be empty'
 find "${MAIL_DIR}" -type f -print >should-be-empty
-test_expect_success \
-    'mail store should be empty' \
-    'cmp -s /dev/null should-be-empty'
+test_expect_success 'cmp -s /dev/null should-be-empty'
 
-test_expect_success \
-    'NOTMUCH_CONFIG is set and points to an existing file' \
-    'test -f "${NOTMUCH_CONFIG}"'
+test_begin_subtest 'NOTMUCH_CONFIG is set and points to an existing file'
+test_expect_success 'test -f "${NOTMUCH_CONFIG}"'
 
 test_begin_subtest 'PATH is set to build directory'
 test_expect_equal \
@@ -92,7 +82,7 @@ test_expect_equal \
     "$(echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,')"
 
 test_begin_subtest 'notmuch is compiled with debugging symbols'
-readelf --sections $(which notmuch) | grep \.debug
+readelf --sections $(command -v notmuch) | grep \.debug
 test_expect_equal 0 $?
 
 test_done
index c173237631125ebd68894508763f1f61fab94d74..0c833de262170f5aea7b778aa62bcef0f9ed4d63 100755 (executable)
@@ -3,18 +3,27 @@
 test_description="online help"
 . ./test-lib.sh || exit 1
 
-test_expect_success 'notmuch --help' 'notmuch --help'
-test_expect_success 'notmuch help' 'notmuch help'
-test_expect_success 'notmuch --version' 'notmuch --version'
+test_begin_subtest 'notmuch --help'
+test_expect_success 'notmuch --help'
+
+test_begin_subtest 'notmuch help'
+test_expect_success 'notmuch help'
+
+test_begin_subtest 'notmuch --version'
+test_expect_success 'notmuch --version'
 
 if [ $NOTMUCH_HAVE_MAN -eq 1 ]; then
-    test_expect_success 'notmuch --help tag' 'notmuch --help tag'
-    test_expect_success 'notmuch help tag' 'notmuch help tag'
+    test_begin_subtest 'notmuch --help tag'
+    test_expect_success 'notmuch --help tag'
+
+    test_begin_subtest 'notmuch help tag'
+    test_expect_success 'notmuch help tag'
 else
-    test_expect_success 'notmuch --help tag (man pages not available)' \
-       'test_must_fail notmuch --help tag >/dev/null'
-    test_expect_success 'notmuch help tag (man pages not available)' \
-       'test_must_fail notmuch help tag >/dev/null'
+    test_begin_subtest 'notmuch --help tag (man pages not available)'
+    test_expect_success 'test_must_fail notmuch --help tag >/dev/null'
+
+    test_begin_subtest 'notmuch help tag (man pages not available)'
+    test_expect_success 'test_must_fail notmuch help tag >/dev/null'
 fi
 
 test_done
index 8b4dbbc481891e9cec748fa35cf9d5c6a1e0f029..a3d7380e81c8c12f1a685ca1f4e61cac292ea63c 100755 (executable)
@@ -16,12 +16,14 @@ if [ $NOTMUCH_HAVE_XAPIAN_COMPACT -eq 0 ]; then
     test_expect_equal "$output" "notmuch was compiled against a xapian version lacking compaction support.
 Compaction failed: Unsupported operation"
 
-    test_expect_code 1 "Compact unsupported: status code" "notmuch compact"
+    test_begin_subtest "Compact unsupported: status code"
+    test_expect_code 1 "notmuch compact"
 
     test_done
 fi
 
-test_expect_success "Running compact" "notmuch compact --backup=${TEST_DIRECTORY}/xapian.old"
+test_begin_subtest "Running compact"
+test_expect_success "notmuch compact --backup=${TEST_DIRECTORY}/xapian.old"
 
 test_begin_subtest "Compact preserves database"
 output=$(notmuch search \* | notmuch_search_sanitize)
@@ -30,8 +32,8 @@ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
 
-test_expect_success 'Restoring Backup' \
-    'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&
+test_begin_subtest "Restoring Backup"
+test_expect_success 'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&
      mv ${TEST_DIRECTORY}/xapian.old ${MAIL_DIR}/.notmuch/xapian'
 
 test_begin_subtest "Checking restored backup"
index beeb574a3b30e36fb6e7694b385a769701f0e54e..ffa303efaceca99cdc7c0d6cbf75a83f6184bb1d 100755 (executable)
@@ -286,8 +286,8 @@ notmuch config set new.tags "-foo;bar"
 output=$(NOTMUCH_NEW --debug 2>&1)
 test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden"
 
-test_expect_code 1 "Invalid tags set exit code" \
-    "NOTMUCH_NEW --debug 2>&1"
+test_begin_subtest "Invalid tags set exit code"
+test_expect_code 1 "NOTMUCH_NEW --debug 2>&1"
 
 notmuch config set new.tags $OLDCONFIG
 
@@ -298,4 +298,38 @@ output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' )
 chmod u+w  ${MAIL_DIR}/.notmuch/xapian/*.${db_ending}
 test_expect_equal "$output" "A Xapian exception occurred opening database"
 
+
+test_begin_subtest "Handle files vanishing between scandir and add_file"
+
+# A file for scandir to find. It won't get indexed, so can be empty.
+touch ${MAIL_DIR}/vanish
+
+# Breakpoint to remove the file before indexing
+cat <<EOF > notmuch-new-vanish.gdb
+set breakpoint pending on
+set logging file notmuch-new-vanish-gdb.log
+set logging on
+break add_file
+commands
+shell rm -f ${MAIL_DIR}/vanish
+continue
+end
+run
+EOF
+
+${TEST_GDB} --batch-silent --return-child-result -x notmuch-new-vanish.gdb \
+    --args notmuch new 2>OUTPUT 1>/dev/null
+echo "exit status: $?" >> OUTPUT
+
+# Clean up the file in case gdb isn't available.
+rm -f ${MAIL_DIR}/vanish
+
+cat <<EOF > EXPECTED
+Unexpected error with file ${MAIL_DIR}/vanish
+add_file: Something went wrong trying to read or write a file
+Error opening ${MAIL_DIR}/vanish: No such file or directory
+exit status: 75
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done
index d6933a7689712fed3ea97fb819d075597d550b57..4751440e94a1acf7ef552fd0503be3d4264dbaf7 100755 (executable)
@@ -115,7 +115,7 @@ EOF
 
 backup_database
 test_begin_subtest "error message from query_search_messages"
-gdb --batch-silent --return-child-result -x count-files.gdb \
+${TEST_GDB} --batch-silent --return-child-result -x count-files.gdb \
     --args notmuch count --output=files '*' 2>OUTPUT 1>/dev/null
 cat <<EOF > EXPECTED
 notmuch count: A Xapian exception occurred
@@ -126,4 +126,31 @@ sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean
 test_expect_equal_file EXPECTED OUTPUT.clean
 restore_database
 
+test_begin_subtest "count library function is non-destructive"
+cat<<EOF > EXPECTED
+1: 52 messages
+2: 52 messages
+Exclude 'spam'
+3: 52 messages
+4: 52 messages
+EOF
+test_python <<EOF
+import sys
+import notmuch
+
+query_string = 'tag:inbox or tag:spam'
+tag_string = 'spam'
+
+database = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+query = notmuch.Query(database, query_string)
+
+print("1: {} messages".format(query.count_messages()))
+print("2: {} messages".format(query.count_messages()))
+print("Exclude '{}'".format(tag_string))
+query.exclude_tag(tag_string)
+print("3: {} messages".format(query.count_messages()))
+print("4: {} messages".format(query.count_messages()))
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done
index 57472b913964e4ca0200de2cc5ccea5bb98253f5..48f212ee09283f45468a405c55544223c31daf0f 100755 (executable)
@@ -20,13 +20,13 @@ gen_insert_msg() {
        "[body]=\"insert-message\""
 }
 
-test_expect_code 1 "Insert zero-length file" \
-    "notmuch insert < /dev/null"
+test_begin_subtest "Insert zero-length file"
+test_expect_code 1 "notmuch insert < /dev/null"
 
 # This test is a proxy for other errors that may occur while trying to
 # add a message to the notmuch database, e.g. database locked.
-test_expect_code 1 "Insert non-message" \
-    "echo bad_message | notmuch insert"
+test_begin_subtest "Insert non-message"
+test_expect_code 1 "echo bad_message | notmuch insert"
 
 test_begin_subtest "Database empty so far"
 test_expect_equal "0" "`notmuch count --output=messages '*'`"
@@ -43,7 +43,7 @@ expected='[[[{
  "id": "'"${gen_msg_id}"'",
  "match": true,
  "excluded": false,
- "filename": "'"${cur_msg_filename}"'",
+ "filename": ["'"${cur_msg_filename}"'"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","unread"],
@@ -60,7 +60,7 @@ test_expect_equal_json "$output" "$expected"
 
 test_begin_subtest "Insert duplicate message"
 notmuch insert +duptag -unread < "$gen_msg_filename"
-output=$(notmuch search --output=files "subject:insert-subject" | wc -l)
+output=$((`notmuch search --output=files "subject:insert-subject" | wc -l`))
 test_expect_equal "$output" 2
 
 test_begin_subtest "Duplicate message does not change tags"
@@ -138,9 +138,9 @@ notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"
 output=$(notmuch search --output=messages path:Drafts/cur tag:draft NOT tag:unread)
 test_expect_equal "$output" "id:$gen_msg_id"
 
+test_begin_subtest "Insert message into non-existent folder"
 gen_insert_msg
-test_expect_code 1 "Insert message into non-existent folder" \
-    "notmuch insert --folder=nonesuch < $gen_msg_filename"
+test_expect_code 1 "notmuch insert --folder=nonesuch < $gen_msg_filename"
 
 test_begin_subtest "Insert message, create folder"
 gen_insert_msg
@@ -162,9 +162,9 @@ notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
 output=$(notmuch count path:F/G/H/I/J/new tag:folder)
 test_expect_equal "$output" "2"
 
+test_begin_subtest "Insert message, create invalid subfolder"
 gen_insert_msg
-test_expect_code 1 "Insert message, create invalid subfolder" \
-    "notmuch insert --folder=../G --create-folder $gen_msg_filename"
+test_expect_code 1 "notmuch insert --folder=../G --create-folder $gen_msg_filename"
 
 OLDCONFIG=$(notmuch config get new.tags)
 
@@ -180,8 +180,8 @@ gen_insert_msg
 output=$(notmuch insert $gen_msg_filename 2>&1)
 test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden"
 
-test_expect_code 1 "Invalid tags set exit code" \
-    "notmuch insert $gen_msg_filename 2>&1"
+test_begin_subtest "Invalid tags set exit code"
+test_expect_code 1 "notmuch insert $gen_msg_filename 2>&1"
 
 notmuch config set new.tags $OLDCONFIG
 
@@ -205,23 +205,29 @@ done
 gen_insert_msg
 
 for code in  FILE_NOT_EMAIL READ_ONLY_DATABASE UPGRADE_REQUIRED PATH_ERROR; do
-    test_expect_code 1 "EXIT_FAILURE when add_message returns $code" \
-         "gdb --batch-silent --return-child-result \
+    test_begin_subtest "EXIT_FAILURE when add_message returns $code"
+    test_expect_code 1 \
+         "${TEST_GDB} --batch-silent --return-child-result \
             -ex 'set args insert < $gen_msg_filename' \
             -x index-file-$code.gdb notmuch"
-    test_expect_code 0 "success exit with --keep when add_message returns $code" \
-         "gdb --batch-silent --return-child-result \
+
+    test_begin_subtest "success exit with --keep when add_message returns $code"
+    test_expect_code 0 \
+         "${TEST_GDB} --batch-silent --return-child-result \
             -ex 'set args insert --keep < $gen_msg_filename' \
             -x index-file-$code.gdb notmuch"
 done
 
 for code in OUT_OF_MEMORY XAPIAN_EXCEPTION ; do
-    test_expect_code 75 "EX_TEMPFAIL when add_message returns $code" \
-         "gdb --batch-silent --return-child-result \
+    test_begin_subtest "EX_TEMPFAIL when add_message returns $code"
+    test_expect_code 75 \
+         "${TEST_GDB} --batch-silent --return-child-result \
             -ex 'set args insert < $gen_msg_filename' \
             -x index-file-$code.gdb notmuch"
-    test_expect_code 0 "success exit with --keep when add_message returns $code" \
-         "gdb --batch-silent --return-child-result \
+
+    test_begin_subtest "success exit with --keep when add_message returns $code"
+    test_expect_code 0 \
+         "${TEST_GDB} --batch-silent --return-child-result \
             -ex 'set args insert --keep < $gen_msg_filename' \
             -x index-file-$code.gdb notmuch"
 done
index 5e8b20ce1657869d6a9d6c1d0039f3764f48d575..d2d71ca9e7c2aa154d591192a4ec008a1834aa08 100755 (executable)
@@ -34,6 +34,11 @@ add_message '[subject]="search by id"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"
 output=$(notmuch search id:${gen_msg_id} | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by id (inbox unread)"
 
+test_begin_subtest "Search by mid:"
+add_message '[subject]="search by mid"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
+output=$(notmuch search mid:${gen_msg_id} | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by mid (inbox unread)"
+
 test_begin_subtest "Search by tag:"
 add_message '[subject]="search by tag"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
 notmuch tag +searchbytag id:${gen_msg_id}
@@ -127,6 +132,7 @@ thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; subjectsearchtest (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by id (inbox unread)
+thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by mid (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by tag (inbox searchbytag unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by thread (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; body search (phrase) (inbox unread)
@@ -138,7 +144,7 @@ thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unr
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; subject search test (phrase) (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; this phrase should not match the subject search test (inbox unread)
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Search body (utf-8):"
 add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="message body utf8: bödý"'
index a28eaf20a5d0f112eaf64d432f1a249a4e861b59..dccefcb7f0128b214c6d2d5e74afddacc394f3af 100755 (executable)
@@ -32,7 +32,7 @@ thread:THREADID
 thread:THREADID
 thread:THREADID
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=threads --format=json"
 notmuch search --format=json --output=threads '*' | sed -e s/\".*\"/\"THREADID\"/ >OUTPUT
@@ -120,25 +120,25 @@ id:87lji5cbwo.fsf@yoom.home.cworth.org
 id:1258471718-6781-2-git-send-email-dottedmag@dottedmag.net
 id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --duplicate=1"
 notmuch search --output=messages --duplicate=1 '*' >OUTPUT
 # reuse same EXPECTED as above
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --duplicate=2"
 notmuch search --output=messages --duplicate=2 '*' >OUTPUT
 cat <<EOF >EXPECTED
 id:20091117232137.GA7669@griffis1.net
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --duplicate=3"
 notmuch search --output=messages --duplicate=3 '*' >OUTPUT
 cat <<EOF >EXPECTED
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --format=json"
 notmuch search --format=json --output=messages '*' >OUTPUT
@@ -196,26 +196,26 @@ cat <<EOF >EXPECTED
 "1258471718-6781-2-git-send-email-dottedmag@dottedmag.net",
 "1258471718-6781-1-git-send-email-dottedmag@dottedmag.net"]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --format=json --duplicate=1"
 notmuch search --output=messages --format=json --duplicate=1 '*' >OUTPUT
 # reuse same EXPECTED as above
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --format=json --duplicate=2"
 notmuch search --output=messages --format=json --duplicate=2 '*' >OUTPUT
 cat <<EOF >EXPECTED
 ["20091117232137.GA7669@griffis1.net"]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=messages --format=json --duplicate=3"
 notmuch search --output=messages --format=json --duplicate=3 '*' >OUTPUT
 cat <<EOF >EXPECTED
 []
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=files"
 notmuch search --output=files '*' | notmuch_search_files_sanitize | sort >OUTPUT
@@ -274,7 +274,7 @@ MAIL_DIR/foo/new/09:2,
 MAIL_DIR/foo/new/10:2,
 MAIL_DIR/new/04:2,
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 dup1=$(notmuch search --output=files id:20091117232137.GA7669@griffis1.net | head -n 1 | sed -e "s,$MAIL_DIR,MAIL_DIR,")
 dup2=$(notmuch search --output=files id:20091117232137.GA7669@griffis1.net | tail -n 1 | sed -e "s,$MAIL_DIR,MAIL_DIR,")
@@ -335,7 +335,7 @@ MAIL_DIR/foo/cur/07:2,
 MAIL_DIR/02:2,
 MAIL_DIR/01:2,
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=files --format=json"
 notmuch search --format=json --output=files '*' | notmuch_search_files_sanitize \
@@ -395,14 +395,14 @@ cat <<EOF | test_sort_json >EXPECTED
 "MAIL_DIR/02:2,",
 "MAIL_DIR/01:2,"]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=files --format=json --duplicate=2"
 notmuch search --format=json --output=files --duplicate=2 '*' | notmuch_search_files_sanitize >OUTPUT
 cat <<EOF >EXPECTED
 ["$dup2"]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=tags"
 notmuch search --output=tags '*' >OUTPUT
@@ -412,7 +412,7 @@ inbox
 signed
 unread
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=tags --format=json"
 notmuch search --format=json --output=tags '*' >OUTPUT
@@ -422,7 +422,7 @@ cat <<EOF >EXPECTED
 "signed",
 "unread"]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "sanitize output for quoted-printable line-breaks in author and subject"
 add_message "[subject]='two =?ISO-8859-1?Q?line=0A_subject?=
@@ -431,16 +431,16 @@ notmuch search id:"$gen_msg_id" | notmuch_search_sanitize >OUTPUT
 cat <<EOF >EXPECTED
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; two line  subject headers (inbox unread)
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "search for non-existent message prints nothing"
 notmuch search "no-message-matches-this" > OUTPUT
 echo -n >EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "search --format=json for non-existent message prints proper empty json"
 notmuch search --format=json "no-message-matches-this" > OUTPUT
 echo "[]" >EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index a194faf3b8425ec5bd8eabcee59b7637cd82e813..5931b1475e0b3d7358d84c2692dee3b72f2af517 100755 (executable)
@@ -25,12 +25,12 @@ Adrian Perez de Castro <aperez@igalia.com>
 Israel Herraiz <isra@herraiz.org>
 Mikhail Gusarov <dottedmag@dottedmag.net>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "without --output"
 notmuch address '*' >OUTPUT
 # Use EXPECTED from previous subtest
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=sender --format=json"
 notmuch address --output=sender --format=json '*' >OUTPUT
@@ -53,7 +53,7 @@ cat <<EOF >EXPECTED
 {"name": "Israel Herraiz", "address": "isra@herraiz.org", "name-addr": "Israel Herraiz <isra@herraiz.org>"},
 {"name": "Mikhail Gusarov", "address": "dottedmag@dottedmag.net", "name-addr": "Mikhail Gusarov <dottedmag@dottedmag.net>"}]
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=recipients"
 notmuch address --output=recipients '*' >OUTPUT
@@ -66,7 +66,7 @@ notmuch <notmuch@notmuchmail.org>
 Keith Packard <keithp@keithp.com>
 Mikhail Gusarov <dottedmag@dottedmag.net>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=sender --output=recipients"
 notmuch address --output=sender --output=recipients '*' >OUTPUT
@@ -94,7 +94,7 @@ Adrian Perez de Castro <aperez@igalia.com>
 Israel Herraiz <isra@herraiz.org>
 Mikhail Gusarov <dottedmag@dottedmag.net>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=sender --output=count"
 notmuch address --output=sender --output=count '*' | sort -n >OUTPUT
@@ -117,7 +117,7 @@ cat <<EOF >EXPECTED
 7      Keith Packard <keithp@keithp.com>
 12     Carl Worth <cworth@cworth.org>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--output=count --format=json"
 # Since the iteration order of GHashTable is not specified, we
@@ -143,7 +143,7 @@ cat <<EOF >EXPECTED
 {"name": "Rolland Santimano", "address": "rollandsantimano@yahoo.com", "name-addr": "Rolland Santimano <rollandsantimano@yahoo.com>", "count": 1}
 {"name": "Stewart Smith", "address": "stewart@flamingspork.com", "name-addr": "Stewart Smith <stewart@flamingspork.com>", "count": 3}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--deduplicate=no --sort=oldest-first --output=sender"
 notmuch address --deduplicate=no --sort=oldest-first --output=sender '*' >OUTPUT
@@ -201,7 +201,7 @@ Chris Wilson <chris@chris-wilson.co.uk>
 Olivier Berger <olivier.berger@it-sudparis.eu>
 François Boulogne <boulogne.f@gmail.com>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--deduplicate=no --sort=newest-first --output=sender --output=recipients"
 notmuch address --deduplicate=no --sort=newest-first --output=sender --output=recipients path:foo/new >OUTPUT
@@ -213,7 +213,7 @@ notmuch@notmuchmail.org
 Lars Kellogg-Stedman <lars@seas.harvard.edu>
 notmuch@notmuchmail.org
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--deduplicate=address --output=sender --output=recipients"
 notmuch address --deduplicate=address --output=sender --output=recipients '*' | sort >OUTPUT
@@ -238,7 +238,7 @@ Rolland Santimano <rollandsantimano@yahoo.com>
 Stewart Smith <stewart@flamingspork.com>
 notmuch@notmuchmail.org
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 generate_message '[from]="Foo Bar <foo.bar@example.com>"'
 generate_message '[from]="Foo Bar <Foo.Bar@Example.Com>"'
@@ -266,7 +266,7 @@ Foo Bar <foo.bar@example.com>
 foo.bar@example.com
 foo.bar@example.com
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--deduplicate=mailbox --output=sender --output=count"
 notmuch address --deduplicate=mailbox --output=sender --output=count from:example.com | sort -n >OUTPUT
@@ -279,7 +279,7 @@ cat <<EOF >EXPECTED
 2      Foo Bar <foo.bar@example.com>
 2      foo.bar@example.com
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--deduplicate=address --output=sender --output=count"
 notmuch address --deduplicate=address --output=sender --output=count from:example.com | sort -n >OUTPUT
@@ -287,6 +287,6 @@ cat <<EOF >EXPECTED
 3      Baz <foo.bar+baz@example.com>
 7      Foo Bar <foo.bar@example.com>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index 61d1311608a755c5815bf545ff46170036339fa5..0d0a3b874526dccd24166066be3767fbe29efea5 100755 (executable)
@@ -19,8 +19,11 @@ test_expect_equal "$output" "\
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag3 unread)
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag3 unread)"
 
-test_expect_code 1 "No tag operations" 'notmuch tag One'
-test_expect_code 1 "No query" 'notmuch tag +tag2'
+test_begin_subtest "No tag operations"
+test_expect_code 1 'notmuch tag One'
+
+test_begin_subtest "No query"
+test_expect_code 1 'notmuch tag +tag2'
 
 test_begin_subtest "Redundant tagging"
 notmuch tag +tag1 -tag3 One
@@ -282,9 +285,11 @@ notmuch dump --format=batch-tag| \
 
 test_expect_equal_file EXPECTED OUTPUT
 
-test_expect_code 1 "Empty tag names" 'notmuch tag + One'
+test_begin_subtest "Empty tag names"
+test_expect_code 1 'notmuch tag + One'
 
-test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'
+test_begin_subtest "Tag name beginning with -"
+test_expect_code 1 'notmuch tag +- One'
 
 test_begin_subtest "Xapian exception: read only files"
 chmod u-w  ${MAIL_DIR}/.notmuch/xapian/*.${db_ending}
index b346f37ee4717d43e8229079ec5d0482d84d08fe..ac51895e826d260601260d6aae1a55bb90138fa9 100755 (executable)
@@ -5,16 +5,16 @@ test_description="--format=json output"
 test_begin_subtest "Show message: json"
 add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"json-show-message\""
 output=$(notmuch show --format=json "json-show-message")
-test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
+test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": [\"${gen_msg_filename}\"], \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
 
 # This should be the same output as above.
 test_begin_subtest "Show message: json --body=true"
 output=$(notmuch show --format=json --body=true "json-show-message")
-test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
+test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": [\"${gen_msg_filename}\"], \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
 
 test_begin_subtest "Show message: json --body=false"
 output=$(notmuch show --format=json --body=false "json-show-message")
-test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}}, []]]]"
+test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": [\"${gen_msg_filename}\"], \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Bcc\": \"test_suite+bcc@notmuchmail.org\", \"Reply-To\": \"test_suite+replyto@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}}, []]]]"
 
 test_begin_subtest "Search message: json"
 add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""
@@ -33,7 +33,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
 test_begin_subtest "Show message: json, utf-8"
 add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""
 output=$(notmuch show --format=json "jsön-show-méssage")
-test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"
+test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": [\"${gen_msg_filename}\"], \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"
 
 test_begin_subtest "Show message: json, inline attachment filename"
 subject='json-show-inline-attachment-filename'
@@ -48,7 +48,7 @@ output=$(notmuch show --format=json "id:$id")
 filename=$(notmuch search --output=files "id:$id")
 # Get length of README after base64-encoding, minus additional newline.
 attachment_length=$(( $(base64 $TEST_DIRECTORY/README | wc -c) - 1 ))
-test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"excluded\": false, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"content-length\": $attachment_length, \"content-transfer-encoding\": \"base64\", \"filename\": \"README\"}]}]}, []]]]"
+test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"excluded\": false, \"filename\": [\"$filename\"], \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"content-length\": $attachment_length, \"content-transfer-encoding\": \"base64\", \"content-disposition\": \"inline\", \"filename\": \"README\"}]}]}, []]]]"
 
 test_begin_subtest "Search message: json, utf-8"
 add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""
@@ -64,10 +64,77 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
  \"tags\": [\"inbox\",
  \"unread\"]}]"
 
-test_expect_code 20 "Format version: too low" \
-    "notmuch search --format-version=0 \\*"
+test_begin_subtest "Format version: too low"
+test_expect_code 20 "notmuch search --format-version=0 \\*"
 
-test_expect_code 21 "Format version: too high" \
-    "notmuch search --format-version=999 \\*"
+test_begin_subtest "Format version: too high"
+test_expect_code 21 "notmuch search --format-version=999 \\*"
+
+test_begin_subtest "Show message: multiple filenames"
+add_message "[id]=message-id@example.com [filename]=copy1"
+add_message "[id]=message-id@example.com [filename]=copy2"
+cat <<EOF > EXPECTED
+[
+    [
+        [
+            {
+                "date_relative": "2001-01-05",
+                "excluded": false,
+                "filename": [
+                    "${MAIL_DIR}/copy1",
+                    "${MAIL_DIR}/copy2"
+                ],
+                "headers": {
+                    "Date": "Fri, 05 Jan 2001 15:43:52 +0000",
+                    "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
+                    "Subject": "Show message: multiple filenames",
+                    "To": "Notmuch Test Suite <test_suite@notmuchmail.org>"
+                },
+                "id": "message-id@example.com",
+                "match": true,
+                "tags": [
+                    "inbox",
+                    "unread"
+                ],
+                "timestamp": 978709432
+            },
+            []
+        ]
+    ]
+]
+EOF
+output=$(notmuch show --format=json --body=false id:message-id@example.com)
+test_expect_equal_json "$output" "$(cat EXPECTED)"
+
+test_begin_subtest "Show message: multiple filenames, format version 2"
+cat <<EOF > EXPECTED
+[
+    [
+        [
+            {
+                "date_relative": "2001-01-05",
+                "excluded": false,
+                "filename": "${MAIL_DIR}/copy1",
+                "headers": {
+                    "Date": "Fri, 05 Jan 2001 15:43:52 +0000",
+                    "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
+                    "Subject": "Show message: multiple filenames",
+                    "To": "Notmuch Test Suite <test_suite@notmuchmail.org>"
+                },
+                "id": "message-id@example.com",
+                "match": true,
+                "tags": [
+                    "inbox",
+                    "unread"
+                ],
+                "timestamp": 978709432
+            },
+            []
+        ]
+    ]
+]
+EOF
+output=$(notmuch show --format=json --body=false --format-version=2 id:message-id@example.com)
+test_expect_equal_json "$output" "$(cat EXPECTED)"
 
 test_done
index 800ebc6310e7f6cd7e9b5dac50303461e673008e..40e5e21d62cc2c87b2b70e0a67933b932505f40c 100755 (executable)
@@ -5,16 +5,16 @@ test_description="--format=sexp output"
 test_begin_subtest "Show message: sexp"
 add_message "[subject]=\"sexp-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"sexp-show-message\""
 output=$(notmuch show --format=sexp "sexp-show-message")
-test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename \"${gen_msg_filename}\" :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"sexp-show-message\n\"))) ())))"
+test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename (\"${gen_msg_filename}\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"sexp-show-message\n\"))) ())))"
 
 # This should be the same output as above.
 test_begin_subtest "Show message: sexp --body=true"
 output=$(notmuch show --format=sexp --body=true "sexp-show-message")
-test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename \"${gen_msg_filename}\" :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"sexp-show-message\n\"))) ())))"
+test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename (\"${gen_msg_filename}\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"sexp-show-message\n\"))) ())))"
 
 test_begin_subtest "Show message: sexp --body=false"
 output=$(notmuch show --format=sexp --body=false "sexp-show-message")
-test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename \"${gen_msg_filename}\" :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\")) ())))"
+test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename (\"${gen_msg_filename}\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-subject\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Bcc \"test_suite+bcc@notmuchmail.org\" :Reply-To \"test_suite+replyto@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\")) ())))"
 
 test_begin_subtest "Search message: sexp"
 add_message "[subject]=\"sexp-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"sexp-search-message\""
@@ -24,7 +24,7 @@ test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000
 test_begin_subtest "Show message: sexp, utf-8"
 add_message "[subject]=\"sexp-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""
 output=$(notmuch show --format=sexp "jsön-show-méssage")
-test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename \"${gen_msg_filename}\" :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-utf8-body-sübjéct\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"jsön-show-méssage\n\"))) ())))"
+test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :filename (\"${gen_msg_filename}\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\" \"unread\") :headers (:Subject \"sexp-show-utf8-body-sübjéct\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"text/plain\" :content \"jsön-show-méssage\n\"))) ())))"
 
 test_begin_subtest "Show message: sexp, inline attachment filename"
 subject='sexp-show-inline-attachment-filename'
@@ -39,7 +39,7 @@ output=$(notmuch show --format=sexp "id:$id")
 filename=$(notmuch search --output=files "id:$id")
 # Get length of README after base64-encoding, minus additional newline.
 attachment_length=$(( $(base64 $TEST_DIRECTORY/README | wc -c) - 1 ))
-test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename \"$filename\" :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\") :headers (:Subject \"sexp-show-inline-attachment-filename\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"test_suite@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"multipart/mixed\" :content ((:id 2 :content-type \"text/plain\" :content \"This is a test message with inline attachment with a filename\") (:id 3 :content-type \"application/octet-stream\" :filename \"README\" :content-transfer-encoding \"base64\" :content-length $attachment_length))))) ())))"
+test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename (\"$filename\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\") :headers (:Subject \"sexp-show-inline-attachment-filename\" :From \"Notmuch Test Suite <test_suite@notmuchmail.org>\" :To \"test_suite@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"multipart/mixed\" :content ((:id 2 :content-type \"text/plain\" :content \"This is a test message with inline attachment with a filename\") (:id 3 :content-type \"application/octet-stream\" :content-disposition \"inline\" :filename \"README\" :content-transfer-encoding \"base64\" :content-length $attachment_length))))) ())))"
 
 test_begin_subtest "Search message: sexp, utf-8"
 add_message "[subject]=\"sexp-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""
index 35678909b0ce110ca650c108a9478aae4139e5dd..12a10451b408bd362ecd5472e2c7c0bb28222b42 100755 (executable)
@@ -178,7 +178,7 @@ Non-text part: application/pgp-signature
 \fbody}
 \fmessage}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=1, message body"
 notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -217,7 +217,7 @@ Non-text part: application/pgp-signature
 \fpart}
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=2, multipart/mixed"
 notmuch show --format=text --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -251,7 +251,7 @@ And this message is signed.
 \fpart}
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=3, rfc822 part"
 notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -275,7 +275,7 @@ This is an embedded message, with a multipart/alternative part.
 \fbody}
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=4, rfc822's multipart"
 notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -289,7 +289,7 @@ This is an embedded message, with a multipart/alternative part.
 \fpart}
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=5, rfc822's html part"
 notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -298,7 +298,7 @@ cat <<EOF >EXPECTED
 Non-text part: text/html
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=6, rfc822's text part"
 notmuch show --format=text --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -307,7 +307,7 @@ cat <<EOF >EXPECTED
 This is an embedded message, with a multipart/alternative part.
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=7, inline attachement"
 notmuch show --format=text --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -316,7 +316,7 @@ cat <<EOF >EXPECTED
 This is a text attachment.
 \fattachment}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=8, plain text part"
 notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -327,7 +327,7 @@ And this message is signed.
 -Carl
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=text --part=9, pgp signature (unverified)"
 notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -336,23 +336,22 @@ cat <<EOF >EXPECTED
 Non-text part: application/pgp-signature
 \fpart}
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
-test_expect_success \
-    "--format=text --part=8, no part, expect error" \
-    "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=text --part=8, no part, expect error"
+test_expect_success "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
 
 test_begin_subtest "--format=json --part=0, full message"
 notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
-{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [
+{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": ["${MAIL_DIR}/multipart"], "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [
 {"id": 1, "content-type": "multipart/signed", "content": [
 {"id": 2, "content-type": "multipart/mixed", "content": [
-{"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
+{"id": 3, "content-type": "message/rfc822", "content-disposition": "inline", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
 {"id": 4, "content-type": "multipart/alternative", "content": [
 {"id": 5, "content-type": "text/html", "content-length": 71},
 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]}, 
-{"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, 
+{"id": 7, "content-type": "text/plain", "content-disposition": "attachment", "filename": "attachment", "content": "This is a text attachment.\n"},
 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, 
 {"id": 9, "content-type": "application/pgp-signature", "content-length": 197}]}]}
 EOF
@@ -363,11 +362,11 @@ notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OU
 cat <<EOF >EXPECTED
 {"id": 1, "content-type": "multipart/signed", "content": [
 {"id": 2, "content-type": "multipart/mixed", "content": [
-{"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
+{"id": 3, "content-type": "message/rfc822", "content-disposition": "inline", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
 {"id": 4, "content-type": "multipart/alternative", "content": [
 {"id": 5, "content-type": "text/html", "content-length": 71},
 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]}, 
-{"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, 
+{"id": 7, "content-type": "text/plain", "content-disposition": "attachment", "filename": "attachment", "content": "This is a text attachment.\n"},
 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, 
 {"id": 9, "content-type": "application/pgp-signature", "content-length": 197}]}
 EOF
@@ -377,11 +376,11 @@ test_begin_subtest "--format=json --part=2, multipart/mixed"
 notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
 {"id": 2, "content-type": "multipart/mixed", "content": [
-{"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
+{"id": 3, "content-type": "message/rfc822", "content-disposition": "inline", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
 {"id": 4, "content-type": "multipart/alternative", "content": [
 {"id": 5, "content-type": "text/html", "content-length": 71},
 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]}, 
-{"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, 
+{"id": 7, "content-type": "text/plain", "content-disposition": "attachment", "filename": "attachment", "content": "This is a text attachment.\n"},
 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}
 EOF
 test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
@@ -389,7 +388,7 @@ test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
 test_begin_subtest "--format=json --part=3, rfc822 part"
 notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
-{"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
+{"id": 3, "content-type": "message/rfc822", "content-disposition": "inline", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
 {"id": 4, "content-type": "multipart/alternative", "content": [
 {"id": 5, "content-type": "text/html", "content-length": 71},
 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]}
@@ -422,7 +421,11 @@ test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
 test_begin_subtest "--format=json --part=7, inline attachment"
 notmuch show --format=json --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
-{"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}
+{"id": 7,
+ "content-type": "text/plain",
+ "filename": "attachment",
+ "content": "This is a text attachment.\n",
+ "content-disposition": "attachment"}
 EOF
 test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
 
@@ -440,21 +443,20 @@ cat <<EOF >EXPECTED
 EOF
 test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
 
-test_expect_success \
-    "--format=json --part=10, no part, expect error" \
-    "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=json --part=10, no part, expect error"
+test_expect_success "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
 
 test_begin_subtest "--format=raw"
 notmuch show --format=raw 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
-test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
+test_expect_equal_file "${MAIL_DIR}"/multipart  OUTPUT
 
 test_begin_subtest "--format=raw --part=0, full message"
 notmuch show --format=raw --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
-test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
+test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT
 
 test_begin_subtest "--format=raw --part=1, message body"
 notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
-test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
+test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT
 
 test_begin_subtest "--format=raw --part=2, multipart/mixed"
 notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -499,11 +501,11 @@ And this message is signed.
 
 --=-=-=--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=3, rfc822 part"
 notmuch show --format=raw --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
-test_expect_equal_file OUTPUT embedded_message
+test_expect_equal_file embedded_message OUTPUT
 
 test_begin_subtest "--format=raw --part=4, rfc822's multipart"
 notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -529,28 +531,28 @@ This is an embedded message, with a multipart/alternative part.
 
 --==-=-==--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=5, rfc822's html part"
 notmuch show --format=raw --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
 <p>This is an embedded message, with a multipart/alternative part.</p>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=6, rfc822's text part"
 notmuch show --format=raw --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
 This is an embedded message, with a multipart/alternative part.
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=7, inline attachment"
 notmuch show --format=raw --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
 This is a text attachment.
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=8, plain text part"
 notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -559,7 +561,7 @@ And this message is signed.
 
 -Carl
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "--format=raw --part=9, pgp signature (unverified)"
 notmuch show --format=raw --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -574,11 +576,10 @@ W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
 =zkga
 -----END PGP SIGNATURE-----
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
-test_expect_success \
-    "--format=raw --part=10, no part, expect error" \
-    "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=raw --part=10, no part, expect error"
+test_expect_success "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
 
 test_begin_subtest "--format=mbox"
 notmuch show --format=mbox 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -586,11 +587,10 @@ printf "From cworth@cworth.org Fri Jan  5 15:43:57 2001\n" >EXPECTED
 cat "${MAIL_DIR}"/multipart >>EXPECTED
 # mbox output is expected to include a blank line
 echo >>EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
-test_expect_success \
-    "--format=mbox --part=1, incompatible, expect error" \
-    "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=mbox --part=1, incompatible, expect error"
+test_expect_success "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
 
 test_begin_subtest "'notmuch reply' to a multipart message"
 notmuch reply 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -614,7 +614,7 @@ Non-text part: text/html
 > 
 > -Carl
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "'notmuch reply' to a multipart message with json format"
 notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT
@@ -627,7 +627,7 @@ notmuch_json_show_sanitize <<EOF >EXPECTED
  "original": {"id": "XXXXX",
  "match": false,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437,
  "date_relative": "2001-01-05",
  "tags": ["attachment","inbox","signed","unread"],
@@ -641,6 +641,7 @@ notmuch_json_show_sanitize <<EOF >EXPECTED
  "content-type": "multipart/mixed",
  "content": [{"id": 3,
  "content-type": "message/rfc822",
+ "content-disposition": "inline",
  "content": [{"headers": {"Subject": "html message",
  "From": "Carl Worth <cworth@cworth.org>",
  "To": "cworth@cworth.org",
@@ -655,6 +656,7 @@ notmuch_json_show_sanitize <<EOF >EXPECTED
  "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
  {"id": 7,
  "content-type": "text/plain",
+ "content-disposition": "attachment",
  "filename": "attachment",
  "content": "This is a text attachment.\n"},
  {"id": 8,
@@ -715,7 +717,7 @@ cat_expected_head ()
         cat <<EOF
 [[[{"id": "htmlmessage", "match":true, "excluded": false, "date_relative":"2000-01-01",
    "timestamp": 946684800,
-   "filename": "${MAIL_DIR}/include-html",
+   "filename": ["${MAIL_DIR}/include-html"],
    "tags": ["inbox", "unread"],
    "headers": { "Date": "Sat, 01 Jan 2000 00:00:00 +0000", "From": "A <a@example.com>",
                 "Subject": "html message", "To": "B <b@example.com>"},
index 132c1d77370fcfa62ae4709b4eca33a66b8937cc..2167ba8ef97333b90b89e9c765c27720461865bc 100755 (executable)
@@ -66,11 +66,11 @@ test_expect_equal "$output" "thread:XXX   2001-01-12 [6/8] Notmuch Test Suite; t
 test_begin_subtest "Use empty subjects if necessary."
 add_message '[subject]="@FORCE_EMPTY"' \
            '[date]="Sat, 13 Jan 2001 15:43:45 -0000"' \
-            '[from]="Empty Sender \<empty_test@notmuchmail.org\>"'
+            '[from]="Empty Sender <empty_test@notmuchmail.org>"'
 empty_parent=${gen_msg_id}
 add_message '[subject]="@FORCE_EMPTY"' \
            '[date]="Sun, 14 Jan 2001 15:43:45 -0000"' \
-            '[from]="Empty Sender \<empty_test@notmuchmail.org\>"' \
+            '[from]="Empty Sender <empty_test@notmuchmail.org>"' \
             "[in-reply-to]=\<$empty_parent\>"
 output=$(notmuch search --sort=newest-first from:empty_test@notmuchmail.org | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-14 [2/2] Empty Sender;  (inbox unread)"
@@ -78,15 +78,15 @@ test_expect_equal "$output" "thread:XXX   2001-01-14 [2/2] Empty Sender;  (inbox
 test_begin_subtest "Avoid empty subjects if possible (newest-first)."
 add_message '[subject]="Non-empty subject (1)"' \
            '[date]="Mon, 15 Jan 2001 15:43:45 -0000"' \
-            '[from]="Empty Sender \<empty_test@notmuchmail.org\>"' \
+            '[from]="Empty Sender <empty_test@notmuchmail.org>"' \
             "[in-reply-to]=\<$empty_parent\>"
 add_message '[subject]="Non-empty subject (2)"' \
            '[date]="Mon, 16 Jan 2001 15:43:45 -0000"' \
-            '[from]="Empty Sender \<empty_test@notmuchmail.org\>"' \
+            '[from]="Empty Sender <empty_test@notmuchmail.org>"' \
             "[in-reply-to]=\<$empty_parent\>"
 add_message '[subject]="@FORCE_EMPTY"' \
            '[date]="Tue, 17 Jan 2001 15:43:45 -0000"' \
-            '[from]="Empty Sender \<empty_test@notmuchmail.org\>"' \
+            '[from]="Empty Sender <empty_test@notmuchmail.org>"' \
             "[in-reply-to]=\<$empty_parent\>"
 output=$(notmuch search --sort=newest-first from:Empty | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-17 [5/5] Empty Sender; Non-empty subject (2) (inbox unread)"
index 818a86541496c21adc6ceaf382df2af0e6f5f141..17741e0d7a85db77ca35e686f612d5e0ee6e99b4 100755 (executable)
@@ -229,7 +229,7 @@ test_expect_equal_json "$output" '
         ],
         "date_relative": "2010-01-05",
         "excluded": false,
-        "filename": "'${MAIL_DIR}'/msg-012",
+        "filename": ["'${MAIL_DIR}'/msg-012"],
         "headers": {
             "Date": "Tue, 05 Jan 2010 15:43:56 +0000",
             "From": "\u2603 <snowman@example.com>",
index faa10364acf52a19a9553ebe515b4bb01bd81b61..75fb0b404bbebbf134cc4fe7c040016817245910 100755 (executable)
@@ -2,54 +2,67 @@
 test_description="\"notmuch dump\" and \"notmuch restore\""
 . ./test-lib.sh || exit 1
 
+NOTMUCH_NEW > /dev/null
+test_begin_subtest "dump header"
+cat <<EOF > EXPECTED
+#notmuch-dump batch-tag:3 config,properties,tags
+EOF
+notmuch dump > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
 add_email_corpus
 
-test_expect_success 'Dumping all tags' \
-  'generate_message &&
-  notmuch new &&
-  notmuch dump > dump.expected'
+test_begin_subtest "Dumping all tags"
+test_expect_success 'generate_message && notmuch new && notmuch dump > dump.expected'
 
 # The use of from:cworth is rather arbitrary: it matches some of the
 # email corpus' messages, but not all of them.
 
-test_expect_success 'Dumping all tags II' \
+test_begin_subtest "Dumping all tags II"
+test_expect_success \
   'notmuch tag +ABC +DEF -- from:cworth &&
   notmuch dump > dump-ABC_DEF.expected &&
   ! cmp dump.expected dump-ABC_DEF.expected'
 
-test_expect_success 'Clearing all tags' \
+test_begin_subtest "Clearing all tags"
+test_expect_success \
   'sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
   notmuch restore --input=clear.expected &&
   notmuch dump > clear.actual &&
   test_cmp clear.expected clear.actual'
 
-test_expect_success 'Accumulate original tags' \
+test_begin_subtest "Clearing all tags"
+test_expect_success \
   'notmuch tag +ABC +DEF -- from:cworth &&
   notmuch restore --accumulate < dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump-ABC_DEF.expected dump.actual'
 
-test_expect_success 'Restoring original tags' \
+test_begin_subtest "Restoring original tags"
+test_expect_success \
   'notmuch restore --input=dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
-test_expect_success 'Restore with nothing to do' \
+test_begin_subtest "Restore with nothing to do"
+test_expect_success \
   'notmuch restore < dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
-test_expect_success 'Accumulate with existing tags' \
+test_begin_subtest "Accumulate with existing tags"
+test_expect_success \
   'notmuch restore --accumulate --input=dump.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
-test_expect_success 'Accumulate with no tags' \
+test_begin_subtest "Accumulate with no tags"
+test_expect_success \
   'notmuch restore --accumulate < clear.expected &&
   notmuch dump > dump.actual &&
   test_cmp dump.expected dump.actual'
 
-test_expect_success 'Accumulate with new tags' \
+test_begin_subtest "Accumulate with new tags"
+test_expect_success \
   'notmuch restore --input=dump.expected &&
   notmuch restore --accumulate --input=dump-ABC_DEF.expected &&
   notmuch dump >  OUTPUT.$test_count &&
@@ -57,7 +70,8 @@ test_expect_success 'Accumulate with new tags' \
   test_cmp dump-ABC_DEF.expected OUTPUT.$test_count'
 
 # notmuch restore currently only considers the first argument.
-test_expect_success 'Invalid restore invocation' \
+test_begin_subtest "Invalid restore invocation"
+test_expect_success \
   'test_must_fail notmuch restore --input=dump.expected another_one'
 
 test_begin_subtest "dump --output=outfile"
@@ -115,7 +129,7 @@ test_begin_subtest "Check for a safe set of message-ids"
 notmuch search --output=messages from:cworth | sed s/^id:// > EXPECTED
 notmuch search --output=messages from:cworth | sed s/^id:// |\
        $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "format=batch-tag, dump sanity check."
 NOTMUCH_DUMP_TAGS --format=sup from:cworth | cut -f1 -d' ' | \
index f720c99817a1561ef8df2c1300644d8a2ee600db..89f4d1be4816a8926a0663eeea46db54750e77f3 100755 (executable)
@@ -4,7 +4,7 @@ test_description="threading when messages received out of order"
 
 # Generate all single-root four message thread structures.  We'll use
 # this for multiple tests below.
-THREADS=$(python ${TEST_DIRECTORY}/gen-threads.py 4)
+THREADS=$($NOTMUCH_PYTHON ${TEST_DIRECTORY}/gen-threads.py 4)
 nthreads=$(wc -l <<< "$THREADS")
 
 test_begin_subtest "Messages with one parent get linked in all delivery orders"
index 01385ae81f4084de75f7cbcc83b8567d759df2e8..ef5998496535310d0447d9485593a919e5036438 100755 (executable)
@@ -8,13 +8,13 @@ EXPECTED=$TEST_DIRECTORY/emacs.expected-output
 add_email_corpus
 
 # syntax errors in test-lib.el cause mysterious failures
-test_expect_success 'Syntax of emacs test library' \
-    "${TEST_EMACS} -Q --batch --load $TEST_DIRECTORY/test-lib.el"
+test_begin_subtest "Syntax of emacs test library"
+test_expect_success "${TEST_EMACS} -Q --batch --load $TEST_DIRECTORY/test-lib.el"
 
 test_begin_subtest "Basic notmuch-hello view in emacs"
 test_emacs '(notmuch-hello)
            (test-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello
+test_expect_equal_file $EXPECTED/notmuch-hello OUTPUT
 
 test_begin_subtest "Saved search with 0 results"
 test_emacs '(let ((notmuch-show-empty-saved-searches t)
@@ -24,20 +24,20 @@ test_emacs '(let ((notmuch-show-empty-saved-searches t)
                        ("empty" . "tag:doesnotexist"))))
              (notmuch-hello)
              (test-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-with-empty
+test_expect_equal_file $EXPECTED/notmuch-hello-with-empty OUTPUT
 
 test_begin_subtest "No saved searches displayed (all with 0 results)"
 test_emacs '(let ((notmuch-saved-searches
                   '\''(("empty" . "tag:doesnotexist"))))
              (notmuch-hello)
              (test-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
+test_expect_equal_file $EXPECTED/notmuch-hello-no-saved-searches OUTPUT
 
 test_begin_subtest "Basic notmuch-search view in emacs"
 test_emacs '(notmuch-search "tag:inbox")
            (notmuch-test-wait)
            (test-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
 
 test_begin_subtest "Incremental parsing of search results"
 test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
@@ -47,7 +47,7 @@ test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
            (ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal)
            (ad-activate 'notmuch-search-process-filter)
            (test-output)"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
 
 test_begin_subtest "Navigation of notmuch-hello to search results"
 test_emacs '(notmuch-hello)
@@ -56,34 +56,34 @@ test_emacs '(notmuch-hello)
            (widget-button-press (1- (point)))
            (notmuch-test-wait)
            (test-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox
+test_expect_equal_file $EXPECTED/notmuch-hello-view-inbox OUTPUT
 
 test_begin_subtest "Basic notmuch-show view in emacs"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
 test_emacs "(notmuch-show \"$maildir_storage_thread\")
            (test-output)"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
 
 test_begin_subtest "Basic notmuch-show view in emacs default indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
 test_emacs "(let ((notmuch-show-indent-messages-width 1))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
 
 test_begin_subtest "Basic notmuch-show view in emacs without indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
 test_emacs "(let ((notmuch-show-indent-messages-width 0))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation OUTPUT
 
 test_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
 test_emacs "(let ((notmuch-show-indent-messages-width 4))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation OUTPUT
 
 test_begin_subtest "notmuch-show for message with invalid From"
 add_message "[subject]=\"message-with-invalid-from\"" \
@@ -100,7 +100,7 @@ Date: GENERATED_DATE
 This is just a test message (#1)
 EOF
 notmuch_date_sanitize < OUTPUT.raw > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Navigation of notmuch-search to thread view"
 test_emacs '(notmuch-search "tag:inbox")
@@ -110,7 +110,7 @@ test_emacs '(notmuch-search "tag:inbox")
            (notmuch-search-show-thread)
            (notmuch-test-wait)
            (test-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
 
 test_begin_subtest "Add tag from search view"
 os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)
@@ -206,7 +206,85 @@ Content-Type: text/plain
 
 This is a test that messages are sent via SMTP
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "Folding a long header when sending via (fake) SMTP"
+long_subject="This is a long subject `echo {1..1000}`"
+emacs_deliver_message \
+    "${long_subject}" \
+    'This is a test that long headers are folded when messages are sent via SMTP' \
+    '(message-goto-to)
+     (kill-whole-line)
+     (insert "To: user@example.com\n")'
+sed \
+    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \
+    -e s',^\(Content-Type: text/plain\); charset=us-ascii$,\1,' < sent_message >OUTPUT
+cat <<EOF >EXPECTED
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: user@example.com
+Subject: This is a long subject 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
+ 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
+ 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
+ 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
+ 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
+ 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
+ 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
+ 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
+ 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
+ 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
+ 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
+ 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
+ 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
+ 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
+ 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
+ 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
+ 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
+ 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
+ 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
+ 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
+ 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
+ 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419
+ 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
+ 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
+ 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
+ 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
+ 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509
+ 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
+ 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
+ 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
+ 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
+ 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
+ 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
+ 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
+ 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653
+ 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671
+ 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689
+ 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707
+ 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
+ 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743
+ 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761
+ 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779
+ 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797
+ 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815
+ 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
+ 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
+ 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869
+ 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887
+ 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905
+ 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
+ 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
+ 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959
+ 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977
+ 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995
+ 996 997 998 999 1000
+Date: 01 Jan 2000 12:00:00 -0000
+Message-ID: <XXX>
+MIME-Version: 1.0
+Content-Type: text/plain
+
+This is a test that long headers are folded when messages are sent via SMTP
+EOF
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"
 notmuch new > /dev/null
@@ -223,7 +301,7 @@ To:
 Subject: 
 --text follows this line--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 # Make another FCC maildir specific for the next test
 mkdir -p mail/sent-string/cur
@@ -241,7 +319,7 @@ Subject:
 Fcc: ${MAIL_DIR}/sent-string
 --text follows this line--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 # Make more FCC maildirs specific for the next test
 mkdir -p mail/sent-list-match/cur
@@ -264,7 +342,7 @@ Subject:
 Fcc: ${MAIL_DIR}/sent-list-match
 --text follows this line--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 # Make another FCC maildir specific for the next test
 mkdir -p mail/sent-list-catch-all/cur
@@ -284,7 +362,7 @@ Subject:
 Fcc: ${MAIL_DIR}/sent-list-catch-all
 --text follows this line--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "notmuch-fcc-dirs set to a list (no match)"
 test_emacs "(let ((notmuch-fcc-dirs
@@ -298,7 +376,7 @@ To:
 Subject: 
 --text follows this line--
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply within emacs"
 test_emacs '(let ((message-hidden-headers ''()))
@@ -320,7 +398,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
 
 > This is a test that messages are sent via SMTP
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply from alternate address within emacs"
 add_message '[from]="Sender <sender@example.com>"' \
@@ -343,7 +421,7 @@ Sender <sender@example.com> writes:
 
 > This is just a test message (#${gen_msg_cnt})
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply from address in named group list within emacs"
 add_message '[from]="Sender <sender@example.com>"' \
@@ -367,7 +445,7 @@ Sender <sender@example.com> writes:
 
 > This is just a test message (#${gen_msg_cnt})
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply within emacs to a multipart/mixed message"
 test_emacs '(let ((message-hidden-headers ''()))
@@ -428,7 +506,7 @@ Adrian Perez de Castro <aperez@igalia.com> writes:
 > notmuch@notmuchmail.org
 > http://notmuchmail.org/mailman/listinfo/notmuch
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply within emacs to a multipart/alternative message"
 test_emacs '(let ((message-hidden-headers ''()))
@@ -498,7 +576,7 @@ Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:
 > notmuch@notmuchmail.org
 > http://notmuchmail.org/mailman/listinfo/notmuch
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply within emacs to an html-only message"
 add_message '[content-type]="text/html"' \
@@ -519,7 +597,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
 
 > Hi,This is an HTML test message.OK?
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply within emacs to message from self"
 test_subtest_known_broken
@@ -566,7 +644,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
 
 > <#!part disposition=inline>
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
 # save as archive to test that Emacs does not re-compress .gz
@@ -613,7 +691,7 @@ test_begin_subtest "View raw message within emacs"
 test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
            (notmuch-show-view-raw-message)
            (test-output)'
-test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
+test_expect_equal_file $EXPECTED/raw-message-cf0c4d-52ad0a OUTPUT
 
 test_begin_subtest "Hiding/showing signature in notmuch-show view"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
@@ -623,7 +701,7 @@ test_emacs "(notmuch-show \"$maildir_storage_thread\")
            (search-backward \"Click/Enter to hide.\")
            (button-activate (button-at (point)))
            (test-output)"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
+test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
 
 test_begin_subtest "Detection and hiding of top-post quoting of message"
 add_message '[subject]="The problem with top-posting"' \
@@ -671,13 +749,13 @@ Thanks for the advice! I will be sure to put it to good use.
 
 [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
 notmuch_date_sanitize < OUTPUT.raw > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Hiding message in notmuch-show view"
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
            (notmuch-show-toggle-message)
            (test-visible-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
+test_expect_equal_file $EXPECTED/notmuch-show-thread-with-hidden-messages OUTPUT
 
 test_begin_subtest "Hiding message with visible citation in notmuch-show view"
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
@@ -685,7 +763,7 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
            (button-activate (button-at (point)))
            (notmuch-show-toggle-message)
            (test-visible-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
+test_expect_equal_file $EXPECTED/notmuch-show-thread-with-hidden-messages OUTPUT
 
 test_begin_subtest "notmuch-show: show message headers"
 test_emacs \
@@ -693,7 +771,7 @@ test_emacs \
               (notmuch-message-headers-visible t))
           (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
           (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-visible
+test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-visible OUTPUT
 
 test_begin_subtest "notmuch-show: hide message headers"
 test_emacs \
@@ -701,7 +779,7 @@ test_emacs \
               (notmuch-message-headers-visible nil))
           (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
           (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden
+test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-hidden OUTPUT
 
 test_begin_subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-visibility-headers)"
 test_emacs \
@@ -710,20 +788,20 @@ test_emacs \
           (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
           (notmuch-show-toggle-visibility-headers)
           (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden
+test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-hidden OUTPUT
 
 test_begin_subtest "notmuch-show: collapse all messages in thread"
 test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")
        (let ((current-prefix-arg t))
          (notmuch-show-open-or-close-all)
          (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-collapsed
+test_expect_equal_file $EXPECTED/notmuch-show-thread-with-all-messages-collapsed OUTPUT
 
 test_begin_subtest "notmuch-show: uncollapse all messages in thread"
 test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")
        (notmuch-show-open-or-close-all)
        (test-visible-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed
+test_expect_equal_file $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed OUTPUT
 
 test_begin_subtest "Stashing in notmuch-show"
 add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
@@ -769,7 +847,7 @@ http://mid.gmane.org/bought
 https://marc.info/?i=bought
 https://mid.mail-archive.com/bought
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Stashing in notmuch-search"
 test_emacs '(notmuch-search "id:\"bought\"")
@@ -794,14 +872,14 @@ test_emacs "(notmuch-search \"$message1 or $message2\")
            (redisplay)
            (notmuch-show-advance-and-archive)
            (test-output)"
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Refresh show buffer"
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
            (test-visible-output "EXPECTED")
            (notmuch-show-refresh-view)
            (test-visible-output)'
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Refresh modified show buffer"
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
@@ -811,7 +889,7 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
            (test-visible-output "EXPECTED")
            (notmuch-show-refresh-view)
            (test-visible-output)'
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"
 id='message-with-application/mpeg-attachment@notmuchmail.org'
@@ -905,9 +983,8 @@ test_emacs "(let ((mm-text-html-renderer
 # Different Emacs versions and renderers give very different results,
 # so just check that something reasonable showed up.  We first cat the
 # output so the test framework will print it if the test fails.
-test_expect_success "Rendering HTML mail with images" \
-    'cat OUTPUT && grep -q smiley OUTPUT'
-
+test_begin_subtest "Rendering HTML mail with images"
+test_expect_success 'cat OUTPUT && grep -q smiley OUTPUT'
 
 test_begin_subtest "Search handles subprocess error exit codes"
 cat > notmuch_fail <<EOF
index 3fd6958a0441d6a73bc6004b8b242e2537dbd96f..e9d5e3584f87042472a205eefb00db8c115b7ced 100755 (executable)
@@ -27,6 +27,6 @@ test_emacs '(notmuch-search "*")
            (notmuch-test-wait)
            (test-output)'
 sed -i -e s',  *, ,g' -e 's/xxx*/[BLOB]/g' OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index efeaa3f60d6e28fa4489a05dad2837ff844dd4fa..6d9566354bb32b1b3705dcf6daeb993dc39fa29c 100755 (executable)
@@ -39,7 +39,7 @@ output=$(notmuch show --format=json id:${gen_msg_id} | notmuch_json_show_sanitiz
 test_expect_equal_json "$output" '[[[{"id": "XXXXX",
 "match": true,
 "excluded": false,
-"filename": "YYYYY",
+"filename": ["YYYYY"],
 "timestamp": 42,
 "date_relative": "2001-01-05",
 "tags": ["inbox","replied"],
@@ -52,7 +52,8 @@ test_expect_equal_json "$output" '[[[{"id": "XXXXX",
 "content": "This is just a test message (#3)\n"}]},
 []]]]'
 
-test_expect_success 'notmuch reply works with renamed file (without notmuch new)' 'notmuch reply id:${gen_msg_id}'
+test_begin_subtest "notmuch reply works with renamed file (without notmuch new)"
+test_expect_success 'notmuch reply id:${gen_msg_id}'
 
 test_begin_subtest "notmuch new detects no file rename after tag->flag synchronization"
 output=$(NOTMUCH_NEW)
@@ -123,9 +124,10 @@ output+=$(notmuch search subject:"Message to lose maildir info" | notmuch_search
 test_expect_equal "$output" "No new mail. Detected 1 file rename.
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Message to lose maildir info (inbox)"
 
+test_begin_subtest "Can remove unread tag from message in non-maildir directory"
 add_message [subject]='"Non-maildir message"' [dir]=notmaildir [filename]='non-maildir-message'
 expected=$(notmuch search --output=files subject:"Non-maildir message")
-test_expect_success "Can remove unread tag from message in non-maildir directory" 'notmuch tag -unread subject:"Non-maildir message"'
+test_expect_success 'notmuch tag -unread subject:"Non-maildir message"'
 
 test_begin_subtest "Message in non-maildir directory does not get renamed"
 output=$(notmuch search --output=files subject:"Non-maildir message")
index a1e5e206081ff03a5c0d15e0bc648d0835b65420..d21cad144cb15311aec1a39ae5fb0aa830ad62ad 100755 (executable)
@@ -11,6 +11,8 @@ add_gnupg_home ()
 {
     local output
     [ -d ${GNUPGHOME} ] && return
+    _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
+    at_exit_function _gnupg_exit
     mkdir -m 0700 "$GNUPGHOME"
     gpg --no-tty --import <$TEST_DIRECTORY/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1
     test_debug "cat $GNUPGHOME/import.log"
@@ -28,7 +30,8 @@ add_gnupg_home
 # Change this if we ship a new test key
 FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381"
 
-test_expect_success 'emacs delivery of signed message' \
+test_begin_subtest "emacs delivery of signed message"
+test_expect_success \
 'emacs_fcc_message \
     "test signed message 001" \
     "This is a test signed message." \
@@ -41,7 +44,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","signed"],
@@ -75,7 +78,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","signed"],
@@ -109,7 +112,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","signed"],
@@ -134,11 +137,12 @@ test_expect_equal_json \
     "$expected"
 mv "${GNUPGHOME}"{.bak,}
 
+test_begin_subtest "emacs delivery of encrypted message with attachment"
 # create a test encrypted message with attachment
 cat <<EOF >TESTATTACHMENT
 This is a test file.
 EOF
-test_expect_success 'emacs delivery of encrypted message with attachment' \
+test_expect_success \
 'emacs_fcc_message \
     "test encrypted message 001" \
     "This is a test encrypted message.\n" \
@@ -183,7 +187,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["encrypted","inbox"],
@@ -205,6 +209,7 @@ expected='[[[{"id": "XXXXX",
  "content": "This is a test encrypted message.\n"},
  {"id": 5,
  "content-type": "application/octet-stream",
+ "content-disposition": "attachment",
  "content-length": "NONZERO",
  "content-transfer-encoding": "base64",
  "filename": "TESTATTACHMENT"}]}]}]},
@@ -230,7 +235,7 @@ notmuch show \
     --part=5 \
     --decrypt \
     subject:"test encrypted message 001" >OUTPUT
-test_expect_equal_file OUTPUT TESTATTACHMENT
+test_expect_equal_file TESTATTACHMENT OUTPUT
 
 test_begin_subtest "decryption failure with missing key"
 mv "${GNUPGHOME}"{,.bak}
@@ -240,7 +245,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["encrypted","inbox"],
@@ -263,7 +268,8 @@ test_expect_equal_json \
     "$expected"
 mv "${GNUPGHOME}"{.bak,}
 
-test_expect_success 'emacs delivery of encrypted + signed message' \
+test_begin_subtest "emacs delivery of encrypted + signed message"
+test_expect_success \
 'emacs_fcc_message \
     "test encrypted message 002" \
     "This is another test encrypted message.\n" \
@@ -276,7 +282,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["encrypted","inbox"],
@@ -350,7 +356,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","signed"],
index a8be45e7098e39531bc31112e840d2286434b1eb..0f39bc6933945144086ad2ac4b05ab9765f5dd14 100755 (executable)
@@ -7,6 +7,8 @@ add_gpgsm_home ()
 {
     local fpr
     [ -d ${GNUPGHOME} ] && return
+    _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
+    at_exit_function _gnupg_exit
     mkdir -m 0700 "$GNUPGHOME"
     gpgsm --no-tty --no-common-certs-import --disable-dirmngr --import < $TEST_DIRECTORY/smime/test.crt >"$GNUPGHOME"/import.log 2>&1
     fpr=$(gpgsm  --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p')
@@ -23,14 +25,16 @@ FINGERPRINT=$(openssl x509 -fingerprint -in test_suite.pem -noout | sed -e 's/^.
 
 add_gpgsm_home
 
-test_expect_success 'emacs delivery of S/MIME signed message' \
+test_begin_subtest "emacs delivery of S/MIME signed message"
+test_expect_success \
      'emacs_fcc_message \
      "test signed message 001" \
      "This is a test signed message." \
      "(mml-secure-message-sign \"smime\")"'
 
+test_begin_subtest "emacs delivery of S/MIME encrypted + signed message"
 # Hard code the MML to avoid several interactive questions
-test_expect_success 'emacs delivery of S/MIME encrypted + signed message' \
+test_expect_success \
 'emacs_fcc_message \
     "test encrypted message 001" \
     "<#secure method=smime mode=signencrypt keyfile=\\\"test_suite.pem\\\" certfile=\\\"test_suite.pem\\\">\nThis is a test encrypted message.\n"'
@@ -51,7 +55,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \
 expected='[[[{"id": "XXXXX",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 946728000,
  "date_relative": "2000-01-01",
  "tags": ["inbox","signed"],
@@ -69,6 +73,7 @@ expected='[[[{"id": "XXXXX",
  "content-type": "text/plain",
  "content": "This is a test signed message.\n"},
  {"id": 3,
+  "content-disposition": "attachment",
   "content-length": "NONZERO",
   "content-transfer-encoding": "base64",
   "content-type": "application/x-pkcs7-signature",
index b3dbb1b543e9e0a9e8d83821ddf1e182f5fb0a57..9c6d4e647db5dc0e124e470e8ed707121406881c 100755 (executable)
@@ -27,7 +27,7 @@ test_expect_equal "$result" "$output"
 
 test_begin_subtest 'comparing existing to exported symbols'
 nm -P $TEST_DIRECTORY/../lib/libnotmuch.so | awk '$2 == "T" && $1 ~ "^notmuch" {print $1}' | sort | uniq > ACTUAL
-sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED
+sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p' $TEST_DIRECTORY/../lib/notmuch.h | sort | uniq > EXPORTED
 test_expect_equal_file EXPORTED ACTUAL
 
 test_done
index da4ec2b8c61a15403b14433b0774ca6aaaf7f2b7..d1cb45eccc143ed27273f9ef83ccc214306dba6a 100755 (executable)
@@ -28,7 +28,7 @@ MAIL_DIR/msg-001
 MAIL_DIR/spam/msg-001
 EOF
 notmuch search --output=files id:$id_x | notmuch_search_files_sanitize >OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Test matches folder:spam"
 output=$(notmuch search folder:spam)
index 845dfde75fd6e8bae20283da3285d3046b498761..a46a2df2a1febb740a0e5bd180da97224e0677ba 100755 (executable)
@@ -64,7 +64,7 @@ if test_require_external_prereq gdb; then
     # -tty /dev/null works around a conflict between the 'timeout' wrapper
     # and gdb's attempt to control the TTY.
     export MAIL_DIR
-    gdb -tty /dev/null -batch -x $TEST_DIRECTORY/atomicity.py notmuch 1>gdb.out 2>&1
+    ${TEST_GDB} -tty /dev/null -batch -x $TEST_DIRECTORY/atomicity.py notmuch 1>gdb.out 2>&1
 
     # Get the final, golden output
     notmuch search '*' > expected
@@ -95,6 +95,7 @@ fi
 test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts'
 test_expect_equal_file searchall expectall
 
-test_expect_success "detected $outcount>10 abort points" "test $outcount -gt 10"
+test_begin_subtest "detected $outcount>10 abort points"
+test_expect_success "test $outcount -gt 10"
 
 test_done
index 4726bc366ecebda8fc48e694ad802403ea4c6807..a9a61145699b19ca5e61129f91255c7b154e6f72 100755 (executable)
@@ -16,7 +16,7 @@ for t in q_new.search_threads():
     print (t.get_thread_id())
 EOF
 notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "compare message ids"
 test_python <<EOF
@@ -28,7 +28,7 @@ for m in q_new.search_messages():
     print (m.get_message_id())
 EOF
 notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "get non-existent file"
 test_python <<EOF
@@ -38,4 +38,23 @@ print (db.find_message_by_filename("i-dont-exist"))
 EOF
 test_expect_equal "$(cat OUTPUT)" "None"
 
+test_begin_subtest "get revision"
+test_python ${MAIL_DIR} <<'EOF'
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+(revision, uuid) = db.get_revision()
+print ("%s\t%lu" % (uuid, revision))
+EOF
+notmuch_uuid_sanitize < OUTPUT > CLEAN
+cat <<'EOF' >EXPECTED
+UUID   53
+EOF
+test_expect_equal_file EXPECTED CLEAN
+
+grep '^[0-9a-f]' OUTPUT > INITIAL_OUTPUT
+
+test_begin_subtest "output of count matches test code"
+notmuch count --lastmod '*' | cut -f2-3 > OUTPUT
+test_expect_equal_file INITIAL_OUTPUT OUTPUT
+
 test_done
index 20e06917fa3f2616750910f4ea58e0fa8b51ad1a..52f9fe0f8bfd7e8ee224f50b4b3785c6888a1c69 100755 (executable)
@@ -23,7 +23,7 @@ for t in @q.search_threads do
 end
 EOF
 notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "compare message ids"
 test_ruby <<"EOF"
@@ -40,7 +40,7 @@ for m in @q.search_messages do
 end
 EOF
 notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "get non-existent file"
 test_ruby <<"EOF"
@@ -67,7 +67,7 @@ end
 print @q.count_messages(),"\n"
 EOF
 notmuch count --output=messages tag:inbox > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "count threads"
 test_ruby <<"EOF"
@@ -81,7 +81,7 @@ end
 print @q.count_threads(),"\n"
 EOF
 notmuch count --output=threads tag:inbox > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "get all tags"
 test_ruby <<"EOF"
@@ -97,6 +97,6 @@ for tag in @t do
 end
 EOF
 notmuch search --output=tags '*' > EXPECTED
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index ed1191319fecbf49f681b0f46ee4a197a45ccdee..7917a82f0154ef1d8355e62d7ae30ebb796e3fa8 100755 (executable)
@@ -70,7 +70,8 @@ output=`notmuch new 2>&1`
 test_expect_equal "$output" "Error: pre-new hook failed with status 13"
 
 # depends on the previous subtest leaving broken hook behind
-test_expect_code 1 "pre-new non-zero exit status (notmuch status)" "notmuch new"
+test_begin_subtest "pre-new non-zero exit status (notmuch status)"
+test_expect_code 1 "notmuch new"
 
 # depends on the previous subtests leaving 1 new message behind
 test_begin_subtest "pre-new non-zero exit status aborts new"
@@ -89,15 +90,16 @@ echo "Error: post-new hook failed with status 13" >> expected
 test_expect_equal_file expected output
 
 # depends on the previous subtest leaving broken hook behind
-test_expect_code 1 "post-new non-zero exit status (notmuch status)" "notmuch new"
+test_begin_subtest "post-new non-zero exit status (notmuch status)"
+test_expect_code 1 "notmuch new"
 
+test_begin_subtest "post-insert hook does not affect insert status"
 rm_hooks
 generate_message
 create_failing_hook "post-insert"
-test_expect_success "post-insert hook does not affect insert status" \
-    "notmuch insert < \"$gen_msg_filename\" > /dev/null"
+test_expect_success "notmuch insert < \"$gen_msg_filename\" > /dev/null"
 
-test_begin_subtest "hook without executable permissions"
+test_begin_subtest "hook without executable permissions"
 rm_hooks
 mkdir -p ${HOOK_DIR}
 cat <<EOF >"${HOOK_DIR}/pre-new"
@@ -105,15 +107,15 @@ cat <<EOF >"${HOOK_DIR}/pre-new"
 echo foo
 EOF
 output=`notmuch new 2>&1`
-test_expect_code 1 "hook without executable permissions" "notmuch new"
+test_expect_code 1 "notmuch new"
 
-test_begin_subtest "hook execution failure"
+test_begin_subtest "hook execution failure"
 rm_hooks
 mkdir -p ${HOOK_DIR}
 cat <<EOF >"${HOOK_DIR}/pre-new"
 no hashbang, execl fails
 EOF
 chmod +x "${HOOK_DIR}/pre-new"
-test_expect_code 1 "hook execution failure" "notmuch new"
+test_expect_code 1 "notmuch new"
 
 test_done
index f8ff8ff9139dd90edd15eafda6b9a76cb908f56a..fad134e305c59592b2d6d12dfbb7afa12c9f7266 100755 (executable)
@@ -12,6 +12,6 @@ string foo
 positional arg 1 pos1
 positional arg 2 pos2
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index a8ed22824e0c3efce61a86b42a886b59f09ad1ca..ac214a5b2b451c05d0b6d2baa9b733362e8fbf7d 100755 (executable)
@@ -13,7 +13,7 @@ test_emacs "(let ((notmuch-hello-sections
                                      \"Test\" '((\"inbox\" . \"tag:inbox\")))))))
            (notmuch-hello)
            (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
+test_expect_equal_file $EXPECTED/notmuch-hello-new-section OUTPUT
 
 test_begin_subtest "User-defined section with empty, hidden entry"
 test_emacs "(let ((notmuch-hello-sections
@@ -24,7 +24,7 @@ test_emacs "(let ((notmuch-hello-sections
                                      :hide-empty-searches t)))))
              (notmuch-hello)
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
+test_expect_equal_file $EXPECTED/notmuch-hello-section-with-empty OUTPUT
 
 test_begin_subtest "User-defined section, unread tag filtered out"
 test_emacs "(let ((notmuch-hello-sections
@@ -33,7 +33,7 @@ test_emacs "(let ((notmuch-hello-sections
                                      :hide-tags '(\"unread\"))))))
              (notmuch-hello)
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
+test_expect_equal_file $EXPECTED/notmuch-hello-section-hidden-tag OUTPUT
 
 test_begin_subtest "User-defined section, different query for counts"
 test_emacs "(let ((notmuch-hello-sections
@@ -42,21 +42,21 @@ test_emacs "(let ((notmuch-hello-sections
                                      :filter-count \"tag:signed\")))))
              (notmuch-hello)
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
+test_expect_equal_file $EXPECTED/notmuch-hello-section-counts OUTPUT
 
 test_begin_subtest "Empty custom tags section"
 test_emacs "(let* ((widget (widget-create 'notmuch-hello-tags-section))
                    (notmuch-hello-sections (list (widget-value widget))))
              (notmuch-hello)
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-empty-custom-tags-section
+test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-tags-section OUTPUT
 
 test_begin_subtest "Empty custom queries section"
 test_emacs "(let* ((widget (widget-create 'notmuch-hello-query-section))
                    (notmuch-hello-sections (list (widget-value widget))))
              (notmuch-hello)
              (test-output))"
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-empty-custom-queries-section
+test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-queries-section OUTPUT
 
 test_begin_subtest "Column alignment for tag/queries with long names"
 tag=a-very-long-tag # length carefully calculated for 80 characters window width
@@ -64,6 +64,6 @@ notmuch tag +$tag '*'
 test_emacs '(notmuch-hello)
             (test-output)'
 notmuch tag -$tag '*'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-long-names
+test_expect_equal_file $EXPECTED/notmuch-hello-long-names OUTPUT
 
 test_done
index 0342a8745b3d136e942809768a1a5ee6b0368419..74d546bd2c455afb9da6079c66c4feb0eb2d17f4 100755 (executable)
@@ -27,7 +27,7 @@ EOF
 test_emacs "(notmuch-show \"id:$message_id\")
            (test-visible-output \"OUTPUT.raw\")"
 notmuch_date_sanitize < OUTPUT.raw > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Bare subject #1"
 output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
@@ -45,20 +45,20 @@ test_begin_subtest "don't process cryptographic MIME parts"
 test_emacs '(let ((notmuch-crypto-process-mime nil))
        (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-off
+test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-off OUTPUT
 
 test_begin_subtest "process cryptographic MIME parts"
 test_emacs '(let ((notmuch-crypto-process-mime t))
        (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
+test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT
 
 test_begin_subtest "process cryptographic MIME parts (w/ notmuch-show-toggle-process-crypto)"
 test_emacs '(let ((notmuch-crypto-process-mime nil))
        (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
        (notmuch-show-toggle-process-crypto)
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
+test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT
 
 test_begin_subtest "notmuch-show: don't elide non-matching messages"
 test_emacs '(let ((notmuch-show-only-matching-messages nil))
@@ -67,7 +67,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
        (notmuch-search-show-thread)
        (notmuch-test-wait)
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off
+test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-off OUTPUT
 
 test_begin_subtest "notmuch-show: elide non-matching messages"
 test_emacs '(let ((notmuch-show-only-matching-messages t))
@@ -76,7 +76,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages t))
        (notmuch-search-show-thread)
        (notmuch-test-wait)
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
 
 test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"
 test_emacs '(let ((notmuch-show-only-matching-messages nil))
@@ -86,7 +86,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
        (notmuch-test-wait)
        (notmuch-show-toggle-elide-non-matching)
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
 
 test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)"
 test_emacs '(let ((notmuch-show-only-matching-messages nil))
@@ -95,7 +95,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
        (notmuch-search-show-thread t)
        (notmuch-test-wait)
        (test-visible-output))'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
 
 test_begin_subtest "notmuch-show: disable indentation of thread content (w/ notmuch-show-toggle-thread-indentation)"
 test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
@@ -104,7 +104,7 @@ test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir st
        (notmuch-test-wait)
        (notmuch-show-toggle-thread-indentation)
        (test-visible-output)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-indent-thread-content-off
+test_expect_equal_file $EXPECTED/notmuch-show-indent-thread-content-off OUTPUT
 
 test_begin_subtest "id buttonization"
 add_message '[body]="
@@ -161,7 +161,7 @@ cid:xxx
 <<mid:abc>>. <<mid:abc>>, <<mid:abc>>;
 EOF
 notmuch_date_sanitize < OUTPUT.raw > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 
 test_begin_subtest "Show handles subprocess errors"
index 7624fa4d10a645b8b8c5d636e76370b4a7904030..5d6d53a82326c7f58260f83e0798722b5768393e 100755 (executable)
@@ -48,7 +48,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
 cat <<EOF >EXPECTED
 Yen: $UTF8_YEN
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "8bit text parts are decoded when rendering"
 test_emacs '(notmuch-show "id:test-plain-8bit@example.com")
@@ -57,7 +57,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
 cat <<EOF >EXPECTED
 Yen: $UTF8_YEN
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "HTML parts are decoded when rendering"
 test_emacs '(notmuch-show "id:test-html@example.com")
@@ -67,7 +67,7 @@ cat <<EOF >EXPECTED
 [ text/html ]
 Yen: $UTF8_YEN
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 # Test saving
 
@@ -125,7 +125,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
 cat <<EOF >EXPECTED
 Yen: =A2=44
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "8bit text message are not decoded when viewing"
 test_emacs '(notmuch-show "id:test-plain-8bit@example.com")
@@ -135,6 +135,6 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
 cat <<EOF >EXPECTED
 Yen: $BIG5_YEN
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index b6181b51c2ff741562d3cbe2f73097862c97bbc9..958ff888a8652127a855ffe2509af61e247cd11a 100755 (executable)
@@ -12,7 +12,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-test-wait)
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
 
 test_begin_subtest "Refreshed notmuch-tree view in emacs"
 test_emacs '(notmuch-tree "tag:inbox")
@@ -21,7 +21,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-test-wait)
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
 
 # In the following tag tests we make sure the display is updated
 # correctly and, in a separate test, that the database is updated
@@ -34,7 +34,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-tree-tag (list "+test_tag"))
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-tagged
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-tagged OUTPUT
 
 test_begin_subtest "Tag message in notmuch tree view (database)"
 output=$(notmuch search --output=messages 'tag:test_tag')
@@ -47,7 +47,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-tree-tag (list "-test_tag"))
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
 
 test_begin_subtest "Untag message in notmuch tree view (database)"
 output=$(notmuch search --output=messages 'tag:test_tag')
@@ -61,7 +61,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-tree-tag-thread (list "+test_thread_tag"))
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-thread-tagged
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-thread-tagged OUTPUT
 
 test_begin_subtest "Tag message in notmuch tree view (database)"
 output=$(notmuch search --output=messages 'tag:test_thread_tag')
@@ -82,7 +82,7 @@ test_emacs '(notmuch-tree "tag:inbox")
            (notmuch-tree-tag-thread (list "-test_thread_tag"))
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
 
 test_begin_subtest "Untag message in notmuch tree view (database)"
 output=$(notmuch search --output=messages 'tag:test_thread_tag')
@@ -98,7 +98,7 @@ test_emacs '(notmuch-hello)
            (notmuch-test-wait)
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
 
 test_begin_subtest "Tree view of a single thread (from search)"
 test_emacs '(notmuch-hello)
@@ -110,7 +110,7 @@ test_emacs '(notmuch-hello)
            (notmuch-test-wait)
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread
+test_expect_equal_file $EXPECTED/notmuch-tree-single-thread OUTPUT
 
 test_begin_subtest "Tree view of a single thread (from show)"
 test_emacs '(notmuch-hello)
@@ -123,7 +123,7 @@ test_emacs '(notmuch-hello)
            (notmuch-test-wait)
            (test-output)
            (delete-other-windows)'
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread
+test_expect_equal_file $EXPECTED/notmuch-tree-single-thread OUTPUT
 
 test_begin_subtest "Message window of tree view"
 test_emacs '(notmuch-hello)
@@ -137,8 +137,7 @@ test_emacs '(notmuch-hello)
            (select-window notmuch-tree-message-window)
            (test-output)
            (delete-other-windows)'
-cp OUTPUT /tmp/mjwout
-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-show-window
+test_expect_equal_file $EXPECTED/notmuch-tree-show-window OUTPUT
 
 test_begin_subtest "Stash id"
 output=$(test_emacs '(notmuch-tree "id:1258498485-sup-142@elly")
index 256a885f806a060fbf605a49ebbea6b7b669a7a3..32031e3174d3005413ac0d652b0654f30cfed21f 100755 (executable)
@@ -109,7 +109,7 @@ expected=$(notmuch_json_show_sanitize <<EOF
                 ],
                 "date_relative": "2001-01-05",
                 "excluded": false,
-                "filename": "YYYYY",
+                "filename": ["YYYYY"],
                 "headers": {
                     "Date": "Fri, 05 Jan 2001 15:43:57 +0000",
                     "From": "",
@@ -139,7 +139,7 @@ expected=$(notmuch_json_show_sanitize <<EOF
                 ],
                 "date_relative": "1970-01-01",
                 "excluded": false,
-                "filename": "YYYYY",
+                "filename": ["YYYYY"],
                 "headers": {
                     "Date": "Thu, 01 Jan 1970 00:00:00 +0000",
                     "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
index 10527b185fce927c8dab732d7b6ce7d816017812..86cf37292d8561b2725fe2594b0240e1c78d511f 100755 (executable)
@@ -5,7 +5,7 @@ test_description="hex encoding and decoding"
 test_begin_subtest "round trip"
 find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED
 $TEST_DIRECTORY/hex-xcode --direction=encode < EXPECTED | $TEST_DIRECTORY/hex-xcode --direction=decode > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "punctuation"
 tag1='comic_swear=$&^%$^%\\//-+$^%$'
@@ -28,7 +28,7 @@ test_begin_subtest "round trip (in-place)"
 find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED
 $TEST_DIRECTORY/hex-xcode --in-place --direction=encode < EXPECTED |\
      $TEST_DIRECTORY/hex-xcode --in-place --direction=decode > OUTPUT
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "punctuation (in-place)"
 tag1='comic_swear=$&^%$^%\\//-+$^%$'
index 198a2e609ac7778642e42f2e1b48ce20634cd41a..f10207f8cf8e1840ac40628b23089ef657b4e51d 100755 (executable)
@@ -26,6 +26,6 @@ thread:XXX   2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older ver
 thread:XXX   2009-11-18 [1/3] Carl Worth| Aron Griffis, Keith Packard; [notmuch] archive (inbox unread)
 thread:XXX   2009-11-18 [1/2] Carl Worth| Keith Packard; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
 EOF
-test_expect_equal_file OUTPUT EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done
index 5ab066ac7baab83c3822172993f34fb48161ecf4..fa288bb199038ba445206905713b7b32d647ca60 100755 (executable)
@@ -21,7 +21,7 @@ output=$(notmuch show --format=json 'subject:one' | notmuch_json_show_sanitize)
 expected='[[[{"id": "foo@one.com",
  "match": true,
  "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437,
  "date_relative": "2001-01-05",
  "tags": ["inbox", "unread"],
@@ -34,7 +34,7 @@ expected='[[[{"id": "foo@one.com",
  "content": "This is just a test message (#1)\n"}]},
  [[{"id": "msg-002@notmuch-test-suite",
  "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05",
  "tags": ["inbox", "unread"], "headers": {"Subject": "Re: one",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -54,7 +54,7 @@ add_message '[in-reply-to]="<bar@baz.com>"' \
 output=$(notmuch show --format=json 'subject:two' | notmuch_json_show_sanitize)
 expected='[[[{"id": "foo@two.com",
  "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "two",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -63,7 +63,7 @@ expected='[[[{"id": "foo@two.com",
  "body": [{"id": 1, "content-type": "text/plain",
  "content": "This is just a test message (#3)\n"}]},
  [[{"id": "msg-004@notmuch-test-suite", "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "Re: two",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -82,7 +82,7 @@ add_message '[in-reply-to]="<foo@three.com>"' \
     '[subject]="Re: three"'
 output=$(notmuch show --format=json 'subject:three' | notmuch_json_show_sanitize)
 expected='[[[{"id": "foo@three.com", "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "three",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -90,7 +90,7 @@ expected='[[[{"id": "foo@three.com", "match": true, "excluded": false,
  "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1,
  "content-type": "text/plain", "content": "This is just a test message (#5)\n"}]},
  [[{"id": "msg-006@notmuch-test-suite", "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "Re: three",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -111,7 +111,7 @@ add_message '[in-reply-to]="<baz@four.com>"' \
     '[subject]="neither"'
 output=$(notmuch show --format=json 'subject:four' | notmuch_json_show_sanitize)
 expected='[[[{"id": "foo@four.com", "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "four",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -119,7 +119,7 @@ expected='[[[{"id": "foo@four.com", "match": true, "excluded": false,
  "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1,
  "content-type": "text/plain", "content": "This is just a test message (#7)\n"}]},
  [[{"id": "msg-009@notmuch-test-suite", "match": false, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "neither",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -127,7 +127,7 @@ expected='[[[{"id": "foo@four.com", "match": true, "excluded": false,
  "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1,
  "content-type": "text/plain", "content": "This is just a test message (#9)\n"}]},
  []]]]], [[{"id": "bar@four.com", "match": true, "excluded": false,
- "filename": "YYYYY",
+ "filename": ["YYYYY"],
  "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["inbox", "unread"],
  "headers": {"Subject": "not-four",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -145,7 +145,7 @@ add_message '[id]="bar@five.com"' \
     '[subject]="not-five"'
 output=$(notmuch show --format=json 'subject:five' | notmuch_json_show_sanitize)
 expected='[[[{"id": "XXXXX", "match": true, "excluded": false,
- "filename": "YYYYY", "timestamp": 42, "date_relative": "2001-01-05",
+ "filename": ["YYYYY"], "timestamp": 42, "date_relative": "2001-01-05",
  "tags": ["inbox", "unread"], "headers": {"Subject": "five",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
  "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
@@ -153,7 +153,7 @@ expected='[[[{"id": "XXXXX", "match": true, "excluded": false,
  "content-type": "text/plain",
  "content": "This is just a test message (#10)\n"}]},
  [[{"id": "XXXXX", "match": true, "excluded": false,
- "filename": "YYYYY", "timestamp": 42, "date_relative": "2001-01-05",
+ "filename": ["YYYYY"], "timestamp": 42, "date_relative": "2001-01-05",
  "tags": ["inbox", "unread"],
  "headers": {"Subject": "not-five",
  "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
index a3a7d39c5251acd32edc987041596bb4601e40db..f0fd1511d0567f99fd0ab027a8e627441855431e 100755 (executable)
@@ -10,8 +10,8 @@ if [ ! -e ${TEST_DIRECTORY}/test-databases/${dbtarball} ]; then
     test_subtest_missing_external_prereq_["${dbtarball} - fetch with 'make download-test-databases'"]=t
 fi
 
+test_begin_subtest "database checksum"
 test_expect_success \
-    'database checksum' \
     '( cd $TEST_DIRECTORY/test-databases &&
        sha256sum --quiet --check --status ${dbtarball}.sha256 )'
 
@@ -25,7 +25,8 @@ test_begin_subtest "path: search does not work with old database version"
 output=$(notmuch search path:foo)
 test_expect_equal "$output" ""
 
-test_expect_success 'pre upgrade dump' 'notmuch dump | sort > pre-upgrade-dump'
+test_begin_subtest "pre upgrade dump"
+test_expect_success 'notmuch dump | sort > pre-upgrade-dump'
 
 test_begin_subtest "database upgrade from format version 1"
 output=$(notmuch new | sed -e 's/^Backing up tags to .*$/Backing up tags to FILENAME/')
index 087c6bd74707736384994f71d8720e2539475233..34d15698d9b69c80139c1bc54c3eef95b54d3c73 100755 (executable)
@@ -5,7 +5,8 @@ test_description="error reporting for library"
 
 add_email_corpus
 
-test_expect_success "building database" "NOTMUCH_NEW"
+test_begin_subtest "building database"
+test_expect_success "NOTMUCH_NEW"
 
 test_begin_subtest "Open null pointer"
 test_C <<'EOF'
@@ -285,7 +286,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
    {
        notmuch_messages_t *messages = NULL;
        notmuch_query_t *query=notmuch_query_create (db, "*");
-       stat = notmuch_query_search_messages_st (query, &messages);
+       stat = notmuch_query_search_messages (query, &messages);
    }
 EOF
 sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean
@@ -302,9 +303,9 @@ backup_database
 test_begin_subtest "Xapian exception counting messages"
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
    {
+       int count;
        notmuch_query_t *query=notmuch_query_create (db, "id:87ocn0qh6d.fsf@yoom.home.cworth.org");
-       int count = notmuch_query_count_messages (query);
-       stat = (count == 0);
+       stat = notmuch_query_count_messages (query, &count);
    }
 EOF
 sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean
index 0936011ae6a1e50e3611d74846653afcffa5bf2f..76ad227944a0636b53168c8c0afd401dc26ef767 100755 (executable)
@@ -49,29 +49,29 @@ test_expect_equal 1 ${result}
 
 notmuch count --lastmod '*' | cut -f2 > UUID
 
-test_expect_success 'search succeeds with correct uuid' \
-                   "notmuch search --uuid=$(cat UUID) '*'"
+test_begin_subtest "search succeeds with correct uuid"
+test_expect_success "notmuch search --uuid=$(cat UUID) '*'"
 
-test_expect_success 'uuid works as global option ' \
-                   "notmuch --uuid=$(cat UUID) search '*'"
+test_begin_subtest "uuid works as global option"
+test_expect_success "notmuch --uuid=$(cat UUID) search '*'"
 
-test_expect_code 1 'uuid works as global option II' \
-                   "notmuch --uuid=this-is-no-uuid search '*'"
+test_begin_subtest "uuid works as global option II"
+test_expect_code 1 "notmuch --uuid=this-is-no-uuid search '*'"
 
-test_expect_code 1 'search fails with incorrect uuid' \
-                "notmuch search --uuid=this-is-no-uuid '*'"
+test_begin_subtest "search fails with incorrect uuid"
+test_expect_code 1 "notmuch search --uuid=this-is-no-uuid '*'"
 
-test_expect_success 'show succeeds with correct uuid' \
-                   "notmuch show --uuid=$(cat UUID) '*'"
+test_begin_subtest "show succeeds with correct uuid"
+test_expect_success "notmuch show --uuid=$(cat UUID) '*'"
 
-test_expect_code 1 'show fails with incorrect uuid' \
-                "notmuch show --uuid=this-is-no-uuid '*'"
+test_begin_subtest "show fails with incorrect uuid"
+test_expect_code 1 "notmuch show --uuid=this-is-no-uuid '*'"
 
-test_expect_success 'tag succeeds with correct uuid' \
-                   "notmuch tag --uuid=$(cat UUID) +test '*'"
+test_begin_subtest "tag succeeds with correct uuid"
+test_expect_success "notmuch tag --uuid=$(cat UUID) +test '*'"
 
-test_expect_code 1 'tag fails with incorrect uuid' \
-                "notmuch tag --uuid=this-is-no-uuid '*' +test2"
+test_begin_subtest "tag fails with incorrect uuid"
+test_expect_code 1 "notmuch tag --uuid=this-is-no-uuid '*' +test2"
 
 test_begin_subtest 'lastmod:0.. matches everything'
 total=$(notmuch count '*')
index 6f7106db475a60cb472f073cd7b391ef56b44434..512559a3aff90086809247e2cb3e8ef0a6451e32 100755 (executable)
@@ -15,7 +15,7 @@ count=0
 success=0
 for id in $(notmuch search --output=messages '*'); do
     count=$((count +1))
-    matches=$(notmuch search --output=threads "$id" | wc -l)
+    matches=$((`notmuch search --output=threads "$id" | wc -l`))
     if [ "$matches" = 1 ]; then
        success=$((success + 1))
     fi
index 6e4031af46bbcee14b90d5c782ca4d62fef2ba30..38abc2113c269cc328417312629789054b2d863d 100755 (executable)
@@ -3,21 +3,21 @@
 # Copyright (c) 2016 Daniel Kahn Gillmor
 #
 
-test_description='thread breakage during reindexing
+test_description='thread breakage during reindexing'
 
-notmuch uses ghost documents to track messages we have seen references
-to but have never seen.  Regardless of the order of delivery, message
-deletion, and reindexing, the list of ghost messages for a given
-stored corpus should not vary, so that threads can be reassmebled
-cleanly.
-
-In practice, we accept a small amount of variation (and therefore
-traffic pattern metadata leakage to be stored in the index) for the
-sake of efficiency.
-
-This test also embeds some subtests to ensure that indexing actually
-works properly and attempted fixes to threading issues do not break
-the expected contents of the index.'
+notmuch uses ghost documents to track messages we have seen references
+to but have never seen.  Regardless of the order of delivery, message
+deletion, and reindexing, the list of ghost messages for a given
+stored corpus should not vary, so that threads can be reassmebled
+cleanly.
+#
+In practice, we accept a small amount of variation (and therefore
+traffic pattern metadata leakage to be stored in the index) for the
+sake of efficiency.
+#
+This test also embeds some subtests to ensure that indexing actually
+works properly and attempted fixes to threading issues do not break
+# the expected contents of the index.
 
 . ./test-lib.sh || exit 1
 
index f0ae24f1a5fb4662431739b76123d9fcc24aca46..495b7699a0a781beee246fb6070bdb67e3ae584d 100755 (executable)
@@ -4,17 +4,17 @@ test_description='named queries'
 
 QUERYSTR="date:2009-11-18..2009-11-18 and tag:unread"
 
-test_expect_code 1 "error adding named query before initializing DB" \
-                "notmuch config set query.test \"$QUERYSTR\""
+test_begin_subtest "error adding named query before initializing DB"
+test_expect_code 1 "notmuch config set query.test \"$QUERYSTR\""
 
 add_email_corpus
 
-test_expect_success "adding named query" \
-                   "notmuch config set query.test \"$QUERYSTR\""
+test_begin_subtest "adding named query"
+test_expect_success "notmuch config set query.test \"$QUERYSTR\""
 
+test_begin_subtest "adding nested named query"
 QUERYSTR2="query:test and subject:Maildir"
-test_expect_success "adding nested named query" \
-                   "notmuch config set query.test2 \"$QUERYSTR2\""
+test_expect_success "notmuch config set query.test2 \"$QUERYSTR2\""
 
 test_begin_subtest "retrieve named query"
 output=$(notmuch config get query.test)
index 65ff19dc17d9401b38611986420794d8537c52d8..ba5f55daf9b189176a2955be325d98847094728f 100755 (executable)
@@ -209,6 +209,14 @@ EOF
 notmuch dump | grep '^#=' > OUTPUT
 test_expect_equal_file PROPERTIES OUTPUT
 
+test_begin_subtest "dump _only_ message properties"
+cat <<EOF > EXPECTED
+#notmuch-dump batch-tag:3 properties
+#= 4EFC743A.3060609@april.org fancy%20key%20with%20%c3%a1cc%c3%a8nts=import%20value%20with%20= testkey1=alice testkey1=bob testkey1=testvalue1 testkey1=testvalue2 testkey3=alice3 testkey3=bob3 testkey3=testvalue3
+EOF
+notmuch dump --include=properties > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
 
 test_begin_subtest "restore missing message property (single line)"
 notmuch dump | grep '^#=' > BEFORE1
diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh
new file mode 100755 (executable)
index 0000000..cd9e33a
--- /dev/null
@@ -0,0 +1,72 @@
+#!/usr/bin/env bash
+test_description="Emacs Draft Handling"
+. ./test-lib.sh || exit 1
+
+add_email_corpus
+
+notmuch config set search.exclude_tags deleted
+
+test_begin_subtest "Saving a draft indexes it"
+test_emacs '(notmuch-mua-mail)
+           (message-goto-subject)
+           (insert "draft-test-0001")
+           (notmuch-draft-save)
+           (test-output)'
+count1=$(notmuch count tag:draft)
+count2=$(notmuch count subject:draft-test-0001)
+test_expect_equal "$count1=$count2" "1=1"
+
+test_begin_subtest "Saving a draft tags previous draft as deleted"
+test_emacs '(notmuch-mua-mail)
+           (message-goto-subject)
+           (insert "draft-test-0002")
+           (notmuch-draft-save)
+           (notmuch-draft-save)
+           (test-output)'
+count1=$(notmuch count tag:draft)
+count2=$(notmuch count subject:draft-test-0002)
+
+test_expect_equal "$count1,$count2" "2,1"
+
+test_begin_subtest "Saving a signed draft adds header"
+test_emacs '(notmuch-mua-mail)
+           (message-goto-subject)
+           (insert "draft-test-0003")
+            ;; We would use (mml-secure-message-sign) but on emacs23
+            ;; that only signs the part, not the whole message.
+            (mml-secure-message mml-secure-method '\''sign)
+           (notmuch-draft-save)
+           (test-output)'
+header_count=$(notmuch show --format=raw subject:draft-test-0003 | grep -c ^X-Notmuch-Emacs-Secure)
+body_count=$(notmuch notmuch show --format=raw subject:draft-test-0003 | grep -c '^\<#secure')
+test_expect_equal "$header_count,$body_count" "1,0"
+
+test_begin_subtest "Refusing to save an encrypted draft"
+test_emacs '(notmuch-mua-mail)
+           (message-goto-subject)
+           (insert "draft-test-0004")
+           (mml-secure-message-sign-encrypt)
+           (let ((notmuch-draft-save-plaintext nil))
+                    (notmuch-draft-save))
+           (test-output)'
+count1=$(notmuch count tag:draft)
+count2=$(notmuch count subject:draft-test-0004)
+
+test_expect_equal "$count1,$count2" "3,0"
+
+test_begin_subtest "Resuming a signed draft"
+
+test_emacs '(notmuch-show "subject:draft-test-0003")
+           (notmuch-show-resume-message)
+           (test-output)'
+notmuch_dir_sanitize OUTPUT > OUTPUT.clean
+cat <<EOF | notmuch_dir_sanitize >EXPECTED
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: 
+Subject: draft-test-0003
+Fcc: MAIL_DIR/sent
+--text follows this line--
+<#secure method=pgpmime mode=sign>
+EOF
+test_expect_equal_file EXPECTED OUTPUT.clean
+test_done
diff --git a/test/T640-database-modified.sh b/test/T640-database-modified.sh
new file mode 100755 (executable)
index 0000000..e35e35f
--- /dev/null
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+test_description="DatabaseModifiedError handling"
+. ./test-lib.sh || exit 1
+
+# add enough messages to trigger the exception
+add_email_corpus
+
+test_begin_subtest "catching DatabaseModifiedError in _notmuch_message_ensure_metadata"
+# it seems to need to be an early document to trigger the exception
+first_id=$(notmuch search --output=messages '*'| head -1 | sed s/^id://)
+
+test_C ${MAIL_DIR} <<EOF
+#include <unistd.h>
+#include <stdlib.h>
+#include <notmuch-test.h>
+#include <talloc.h>
+#include <assert.h>
+int
+main (int argc, char **argv)
+{
+    const char *path = argv[1];
+
+    notmuch_database_t *rw_db, *ro_db;
+    notmuch_messages_t *messages;
+    notmuch_message_t *message, *ro_message;
+    notmuch_query_t *query;
+    notmuch_tags_t *tags;
+    int i;
+
+    EXPECT0 (notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_ONLY, &ro_db));
+    assert(ro_db);
+
+    EXPECT0 (notmuch_database_find_message (ro_db, "${first_id}", &ro_message));
+    assert(ro_message);
+
+    EXPECT0 (notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_WRITE, &rw_db));
+    query = notmuch_query_create(rw_db, "");
+    EXPECT0 (notmuch_query_search_messages (query, &messages));
+
+    for (;
+        notmuch_messages_valid (messages);
+        notmuch_messages_move_to_next (messages)) {
+       message = notmuch_messages_get (messages);
+       for (i=0; i<200; i++) {
+           char *tag_str = talloc_asprintf(rw_db, "%d", i);
+           EXPECT0 (notmuch_message_add_tag (message, tag_str));
+           talloc_free (tag_str);
+       }
+    }
+
+    notmuch_database_close (rw_db);
+
+    tags = notmuch_message_get_tags (ro_message);
+    if (tags)
+       printf("SUCCESS\n");
+    return 0;
+}
+EOF
+
+cat <<'EOF' >EXPECTED
+== stdout ==
+SUCCESS
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
new file mode 100755 (executable)
index 0000000..b7bdda1
--- /dev/null
@@ -0,0 +1,175 @@
+#!/usr/bin/env bash
+test_description='regular expression searches'
+. ./test-lib.sh || exit 1
+
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
+    test_done
+fi
+
+add_message '[dir]=bad' '[subject]="To the bone"'
+add_message '[dir]=.' '[subject]="Top level"'
+add_message '[dir]=bad/news' '[subject]="Bears"'
+mkdir -p "${MAIL_DIR}/duplicate/bad/news"
+cp "$gen_msg_filename" "${MAIL_DIR}/duplicate/bad/news"
+
+add_message '[dir]=things' '[subject]="These are a few"'
+add_message '[dir]=things/favorite' '[subject]="Raindrops, whiskers, kettles"'
+add_message '[dir]=things/bad' '[subject]="Bites, stings, sad feelings"'
+
+test_begin_subtest "empty path:// search"
+notmuch search 'path:""' > EXPECTED
+notmuch search 'path:/^$/' > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "empty folder:// search"
+notmuch search 'folder:""' > EXPECTED
+notmuch search 'folder:/^$/' > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "unanchored folder:// specification"
+output=$(notmuch search folder:/bad/ | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Bites, stings, sad feelings (inbox unread)"
+
+test_begin_subtest "anchored folder:// search"
+output=$(notmuch search 'folder:/^bad$/' | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)"
+
+test_begin_subtest "unanchored path:// specification"
+output=$(notmuch search path:/bad/ | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Bites, stings, sad feelings (inbox unread)"
+
+test_begin_subtest "anchored path:// search"
+output=$(notmuch search 'path:/^bad$/' | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)"
+
+# Use "standard" corpus from here on.
+rm -rf $MAIL_DIR
+add_email_corpus
+
+notmuch search --output=messages from:cworth > cworth.msg-ids
+
+# these headers will generate no document terms
+add_message '[from]="-" [subject]="empty from"'
+add_message '[subject]="-"'
+
+test_begin_subtest "null from: search"
+notmuch search 'from:""' | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2001-01-05 [1/1] -; empty from (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "null subject: search"
+notmuch search 'subject:""' | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; - (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "xapian wildcard search for from:"
+notmuch search --output=messages 'from:cwo*' > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "xapian wildcard search for subject:"
+test_expect_equal $(notmuch count 'subject:count*') 1
+
+test_begin_subtest "regexp from search, case sensitive"
+notmuch search --output=messages from:/carl/ > OUTPUT
+test_expect_equal_file /dev/null OUTPUT
+
+test_begin_subtest "empty regexp or query"
+notmuch search --output=messages from:/carl/ or from:/cworth/ > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "non-empty regexp and query"
+notmuch search  from:/cworth@cworth.org/ and subject:patch | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-18 [1/2] Carl Worth| Alex Botero-Lowry; [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (attachment inbox unread)
+thread:XXX   2009-11-18 [1/2] Carl Worth| Ingmar Vanhassel; [notmuch] [PATCH] Typsos (inbox unread)
+thread:XXX   2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+thread:XXX   2009-11-18 [1/2] Carl Worth| Keith Packard; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+thread:XXX   2009-11-18 [2/5] Carl Worth| Mikhail Gusarov, Keith Packard; [notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "regexp from search, duplicate term search"
+notmuch search --output=messages from:/cworth/ > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "long enough regexp matches only desired senders"
+notmuch search --output=messages 'from:"/C.* Wo/"' > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "shorter regexp matches one more sender"
+notmuch search --output=messages 'from:"/C.* W/"' > OUTPUT
+{ echo id:1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk; cat cworth.msg-ids; } > EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "regexp subject search, non-ASCII"
+notmuch search --output=messages subject:/accentué/ > OUTPUT
+echo id:877h1wv7mg.fsf@inf-8657.int-evry.fr > EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "regexp subject search, punctuation"
+notmuch search subject:/\'X\'/ | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-18 [2/2] Keith Packard, Carl Worth; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "regexp subject search, no punctuation"
+notmuch search  subject:/X/ | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-18 [2/2] Keith Packard, Carl Worth; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "combine regexp from and subject"
+notmuch search  subject:/-C/ and from:/.an.k/ | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-17 [1/2] Jan Janak| Carl Worth; [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "regexp error reporting"
+notmuch search 'from:/unbalanced[/' 1>OUTPUT 2>&1
+cat <<EOF > EXPECTED
+notmuch search: A Xapian exception occurred
+A Xapian exception occurred parsing query: Invalid regular expression
+Query string was: from:/unbalanced[/
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "empty mid search"
+notmuch search --output=messages mid:yoom > OUTPUT
+cp /dev/null EXPECTED
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "non-empty mid regex search"
+notmuch search --output=messages mid:/yoom/ > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "combine regexp mid and subject"
+notmuch search  subject:/-C/ and mid:/y..m/ | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "unanchored tag search"
+notmuch search tag:signed or tag:inbox > EXPECTED
+notmuch search tag:/i/ > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+notmuch tag +testsi '*'
+test_begin_subtest "anchored tag search"
+notmuch search tag:signed > EXPECTED
+notmuch search tag:/^si/ > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
diff --git a/test/T660-bad-date.sh b/test/T660-bad-date.sh
new file mode 100755 (executable)
index 0000000..a98e11c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+test_description="parsing of bad dates"
+. ./test-lib.sh || exit 1
+
+add_message [date]='"()"'
+
+test_begin_subtest 'Bad dates translate to a date after the Unix epoch'
+cat <<EOF >EXPECTED
+thread:0000000000000001   1970-01-01 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)
+EOF
+notmuch search '*' > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
diff --git a/test/T680-html-indexing.sh b/test/T680-html-indexing.sh
new file mode 100755 (executable)
index 0000000..74f3370
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+test_description="indexing of html parts"
+. ./test-lib.sh || exit 1
+
+add_email_corpus html
+
+test_begin_subtest 'embedded images should not be indexed'
+notmuch search kwpza7svrgjzqwi8fhb2msggwtxtwgqcxp4wbqr4wjddstqmeqa7 > OUTPUT
+test_expect_equal_file /dev/null OUTPUT
+
+test_begin_subtest 'ignore > in attribute text'
+notmuch search swordfish | notmuch_search_sanitize > OUTPUT
+test_expect_equal_file /dev/null OUTPUT
+
+test_begin_subtest 'non tag text should be indexed'
+notmuch search hunter2 | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX   2009-11-17 [1/1] David Bremner; test html attachment (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
index 1ca52b9c4f73aad5966e44e3dff8505b1d9e348f..389517e1571e0b6590d068ef9cc9c13a98b44a40 100644 (file)
@@ -71,4 +71,8 @@ class RenameBreakpoint(gdb.Breakpoint):
         return False
 RenameBreakpoint('rename')
 
-gdb.execute('run')
+try:
+    gdb.execute('run')
+except Exception:
+    import traceback
+    raise SystemExit(traceback.format_exc())
index 77c48e6e7138c6a53a20babe5711e8e641f513ea..c9a35fed1165e2a2c4a1599a342bb7ab71ad88ea 100644 (file)
@@ -9,3 +9,6 @@ default
 broken
   The broken corpus contains messages that are broken and/or RFC
   non-compliant, ensuring we deal with them in a sane way.
+
+html
+  The html corpus contains html parts
diff --git a/test/corpora/html/attribute-text b/test/corpora/html/attribute-text
new file mode 100644 (file)
index 0000000..6dae819
--- /dev/null
@@ -0,0 +1,15 @@
+From: David Bremner <david@example.net>
+To: David Bremner <david@example.net>
+Subject: test html attachment
+Date: Tue, 17 Nov 2009 21:28:38 +0600
+Message-ID: <87d1dajhgf.fsf@example.net>
+MIME-Version: 1.0
+Content-Type: text/html
+Content-Disposition: inline; filename=test.html
+
+<html>
+  <body>
+    <input value="a>swordfish">
+  </body>
+  hunter2
+</html>
diff --git a/test/corpora/html/embedded-image b/test/corpora/html/embedded-image
new file mode 100644 (file)
index 0000000..4085153
--- /dev/null
@@ -0,0 +1,69 @@
+From: =?utf-8?b?bWFsbW9ib3Jn?= <daemon@lublin.se>
+To: =?utf-8?b?Ym9lbmRlLm1hbG1vYm9yZw==?= <daemon@lublin.se>
+Date: Tue, 19 Jul 2016 11:54:24 +0200
+X-Feed2Imap-Version: 1.2.5
+Message-Id: <boendemalmoborg-1834@eltanin.uberspace.de>
+Subject: =?utf-8?b?VGFjayBhbGxhIHRyYWZpa2FudGVyIG9jaCBmb3Rnw6RuZ2FyZSE=?=
+Content-Type: multipart/alternative; boundary="=-1468922508-176605-12427-9500-21-="
+MIME-Version: 1.0
+
+
+--=-1468922508-176605-12427-9500-21-=
+Content-Type: text/plain; charset=utf-8; format=flowed
+Content-Transfer-Encoding: 8bit
+
+<http://malmoborg.se/2016/07/tack-alla-trafikanter-och-fotgangare/>
+
+Malmö 2016-07-09
+
+I skrivande stund Ã¤r vi i färd med att avetablera vÃ¥r entreprenad pÃ¥ 
+Tigern 3, Regementsgatan 6 i Malmö. Fastigheten har genomgÃ¥tt ett större 
+dräneringsarbete som i sin tur har inneburit vissa 
+trafikbegränsningar pÃ¥ Regementsgatan samt Davidshallsgatan under nÃ¥gra 
+veckors tid. Fastighetsägaren Ã¤r mycket nöjd med vÃ¥r arbetsinsats och vi 
+kan glatt meddela att bÃ¥da vägfilerna kommer att Ã¶ppnas inom kort. Nu 
+kommer den vackra fastigheten att klara sig torrskodd under mÃ¥nga Ã¥r 
+framöver [A]
+
+ 
+
+[A] http://malmoborg.se/wp-includes/images/smilies/icon_smile.gif
+-- 
+Feed: Förvaltnings AB Malmöborg
+<http://malmoborg.se>
+Item: Tack alla trafikanter och fotgängare!
+<http://malmoborg.se/2016/07/tack-alla-trafikanter-och-fotgangare/>
+Date: 2016-07-19 11:54:24 +0200
+Author: malmoborg
+Filed under: Nyheter
+
+--=-1468922508-176605-12427-9500-21-=
+Content-Type: text/html; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+<table border="1" width="100%" cellpadding="0" cellspacing="0" borderspacing="0"><tr><td>
+<table width="100%" bgcolor="#EDEDED" cellpadding="4" cellspacing="2">
+<tr><td align="right"><b>Feed:</b></td>
+<td width="100%"><a href="http://malmoborg.se">
+<b>Förvaltnings AB Malmöborg</b>
+</a>
+</td></tr><tr><td align="right"><b>Item:</b></td>
+<td width="100%"><a href="http://malmoborg.se/2016/07/tack-alla-trafikanter-och-fotgangare/"><b>Tack alla trafikanter och fotgängare!</b>
+</a>
+</td></tr></table></td></tr></table>
+
+<p>Malmö 2016-07-09</p>
+<p>I skrivande stund Ã¤r vi i färd med att avetablera vÃ¥r entreprenad pÃ¥ Tigern 3, Regementsgatan 6 i Malmö. Fastigheten har genomgÃ¥tt ett större dräneringsarbete som i sin tur har inneburit vissa trafikbegränsningar pÃ¥ Regementsgatan samt Davidshallsgatan under nÃ¥gra veckors tid. Fastighetsägaren Ã¤r mycket nöjd med vÃ¥r arbetsinsats och vi kan glatt meddela att bÃ¥da vägfilerna kommer att Ã¶ppnas inom kort. Nu kommer den vackra fastigheten att klara sig torrskodd under mÃ¥nga Ã¥r framöver <img src="data:image/gif;base64,R0lGODlhDwAPALMOAP/qAEVFRQAAAP/OAP/JAP+0AP6dAP/+k//9E///////
+xzMzM///6//lAAAAAAAAACH5BAEAAA4ALAAAAAAPAA8AAARb0EkZap3YVabO
+GRcWcAgCnIMRTEEnCCfwpqt2mHEOagoOnz+CKnADxoKFyiHHBBCSAdOiCVg8
+KwPZa7sVrgJZQWI8FhB2msGgwTXTWGqCXP4WBQr4wjDDstQmEQA7
+" alt=":-)" class="wp-smiley" /> </p>
+<p>&nbsp;</p>
+<hr width="100%"/>
+<table width="100%" cellpadding="0" cellspacing="0">
+<tr><td align="right"><font color="#ababab">Date:</font>&nbsp;&nbsp;</td><td><font color="#ababab">2016-07-19 11:54:24 +0200</font></td></tr>
+<tr><td align="right"><font color="#ababab">Author:</font>&nbsp;&nbsp;</td><td><font color="#ababab">malmoborg</font></td></tr>
+<tr><td align="right"><font color="#ababab">Filed under:</font>&nbsp;&nbsp;</td><td><font color="#ababab">Nyheter</font></td></tr>
+</table>
+
+--=-1468922508-176605-12427-9500-21-=--
diff --git a/test/corpora/lkml/cur/1354585346.000260:2, b/test/corpora/lkml/cur/1354585346.000260:2,
new file mode 100644 (file)
index 0000000..04664e5
--- /dev/null
@@ -0,0 +1,99 @@
+Return-Path: <stefan@datenfreihafen.org>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id 055BC431FBF
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:11:31 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id Vz+mNzdau2Gh for <notmuch@notmuchmail.org>;
+       Sat, 21 Nov 2009 16:11:30 -0800 (PST)
+Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19])
+       by olra.theworths.org (Postfix) with ESMTP id CFD61431FAE
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:11:29 -0800 (PST)
+Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur)
+       by sirius.lasnet.de with esmtpsa 
+       (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1)
+       id 1NC032-0000td-2v by authid <stefan@sostec.de> with cram_md5;
+       Sun, 22 Nov 2009 01:11:28 +0100
+Received: from stefan by excalibur with local (Exim 4.69)
+       (envelope-from <stefan@excalibur.local>)
+       id 1NC031-0001Dm-H7; Sun, 22 Nov 2009 01:11:23 +0100
+From: Stefan Schmidt <stefan@datenfreihafen.org>
+To: notmuch@notmuchmail.org
+Date: Sun, 22 Nov 2009 01:11:01 +0100
+Message-Id: <1258848661-4660-2-git-send-email-stefan@datenfreihafen.org>
+X-Mailer: git-send-email 1.6.5.3
+In-Reply-To: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+References: <yes> <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+Subject: [notmuch] [PATCH 2/2] notmuch-new: Tag mails not as unread when the
+       seen flag in the maildir is set.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 00:11:31 -0000
+
+With the new notmuch_message_get_flags() function we can get the information if
+a message was already flagged as seen in maildir by another mailer or tool. This
+gives a more realistic picture instead of flagging all as unread.
+
+Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
+---
+ Makefile      |    2 +-
+ notmuch-new.c |   16 +++++++++++++++-
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3fedcf1..dfcfc70 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ # Default FLAGS, (can be overridden by user such as "make CFLAGS=-O2")
+ WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
+-CFLAGS=-O2
++CFLAGS=-O0 -ggdb3
+ # Additional flags that we will append to whatever the user set.
+ # These aren't intended for the user to manipulate.
+diff --git a/notmuch-new.c b/notmuch-new.c
+index bc35b4e..ef4429d 100644
+--- a/notmuch-new.c
++++ b/notmuch-new.c
+@@ -41,8 +41,22 @@ handle_sigint (unused (int sig))
+ static void
+ tag_inbox_and_unread (notmuch_message_t *message)
+ {
+-    notmuch_message_add_tag (message, "inbox");
++    char *buf;
++    int i;
++
++    buf = notmuch_message_get_flags (message);
++    for (i = 0; i < strlen (buf); i++) {
++        /* If the S flag is set the message can be tagged as read */
++        if (buf[i] == 'S') {
++            notmuch_message_add_tag (message, "read");
++            goto inbox;
++        }
++    }
++
+     notmuch_message_add_tag (message, "unread");
++
++inbox:
++    notmuch_message_add_tag (message, "inbox");
+ }
+ static void
+-- 
+1.6.5.3
+
+
diff --git a/test/corpora/lkml/cur/1354585346.000261:2, b/test/corpora/lkml/cur/1354585346.000261:2,
new file mode 100644 (file)
index 0000000..5ca8132
--- /dev/null
@@ -0,0 +1,131 @@
+Return-Path: <stefan@datenfreihafen.org>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id E4203431FBF
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:11:31 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id k6PahtnYXl0O for <notmuch@notmuchmail.org>;
+       Sat, 21 Nov 2009 16:11:30 -0800 (PST)
+Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19])
+       by olra.theworths.org (Postfix) with ESMTP id 1BAB6431FBC
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:11:30 -0800 (PST)
+Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur)
+       by sirius.lasnet.de with esmtpsa 
+       (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1)
+       id 1NC02v-0000t5-LF by authid <stefan@sostec.de> with cram_md5;
+       Sun, 22 Nov 2009 01:11:29 +0100
+Received: from stefan by excalibur with local (Exim 4.69)
+       (envelope-from <stefan@excalibur.local>)
+       id 1NC02u-0001Dj-V9; Sun, 22 Nov 2009 01:11:16 +0100
+From: Stefan Schmidt <stefan@datenfreihafen.org>
+To: notmuch@notmuchmail.org
+Date: Sun, 22 Nov 2009 01:11:00 +0100
+Message-Id: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+X-Mailer: git-send-email 1.6.5.3
+In-Reply-To: <yes>
+References: <yes>
+Subject: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir
+       flags.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 00:11:32 -0000
+
+With notmuch_message_get_flags() we gain the information if the message was
+flagged as read, draft, trashed, etc. Handy for big mail spooles that were used
+with another mailer.
+
+Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
+---
+ lib/message.cc |   26 ++++++++++++++++++++++++++
+ lib/notmuch.h  |   10 ++++++++++
+ 2 files changed, 36 insertions(+), 0 deletions(-)
+
+diff --git a/lib/message.cc b/lib/message.cc
+index 069cedb..9bec61e 100644
+--- a/lib/message.cc
++++ b/lib/message.cc
+@@ -35,6 +35,7 @@ struct _notmuch_message {
+     char *thread_id;
+     char *in_reply_to;
+     char *filename;
++    char *flags;
+     notmuch_message_file_t *message_file;
+     notmuch_message_list_t *replies;
+@@ -114,6 +115,7 @@ _notmuch_message_create (const void *talloc_owner,
+     message->thread_id = NULL;
+     message->in_reply_to = NULL;
+     message->filename = NULL;
++    message->flags = NULL;
+     message->message_file = NULL;
+     message->replies = _notmuch_message_list_create (message);
+@@ -438,6 +440,30 @@ notmuch_message_get_filename (notmuch_message_t *message)
+     return message->filename;
+ }
++const char *
++notmuch_message_get_flags (notmuch_message_t *message)
++{
++    std::string filename_str, flags;
++    size_t position;
++    const char *db_path;
++
++    if (message->flags)
++      return message->flags;
++
++    filename_str = message->doc.get_data ();
++    db_path = notmuch_database_get_path (message->notmuch);
++
++    if (filename_str[0] != '/')
++      filename_str.insert (0, db_path);
++
++    /* Flags are everything behind ":" */
++    position = filename_str.find (":");
++    flags = filename_str.substr (position + 3); /* We don't want :2, */
++    message->flags = talloc_strdup (message, flags.c_str ());
++
++    return message->flags;
++}
++
+ time_t
+ notmuch_message_get_date (notmuch_message_t *message)
+ {
+diff --git a/lib/notmuch.h b/lib/notmuch.h
+index a61cd02..1da5dfd 100644
+--- a/lib/notmuch.h
++++ b/lib/notmuch.h
+@@ -694,6 +694,16 @@ notmuch_message_get_replies (notmuch_message_t *message);
+ const char *
+ notmuch_message_get_filename (notmuch_message_t *message);
++/* Get the maildir flags for the email corresponding to 'message'.
++ *
++ * The returned flags will be a string of ascii format flags.
++ *
++ * The returned string belongs to the message so should not be
++ * modified or freed by the caller (nor should it be referenced after
++ * the message is destroyed). */
++const char *
++notmuch_message_get_flags (notmuch_message_t *message);
++
+ /* Get the date of 'message' as a time_t value.
+  *
+  * For the original textual representation of the Date header from the
+-- 
+1.6.5.3
+
+
diff --git a/test/corpora/lkml/cur/1354585346.000265:2, b/test/corpora/lkml/cur/1354585346.000265:2,
new file mode 100644 (file)
index 0000000..7f3acd4
--- /dev/null
@@ -0,0 +1,85 @@
+Return-Path: <keithp@keithp.com>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id 5656D431FBC
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:28:35 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id Dam69vzNZiE1 for <notmuch@notmuchmail.org>;
+       Sat, 21 Nov 2009 16:28:34 -0800 (PST)
+Received: from keithp.com (home.keithp.com [63.227.221.253])
+       by olra.theworths.org (Postfix) with ESMTP id AA991431FAE
+       for <notmuch@notmuchmail.org>; Sat, 21 Nov 2009 16:28:34 -0800 (PST)
+Received: from localhost (localhost [127.0.0.1])
+       by keithp.com (Postfix) with ESMTP id 18FC076012A;
+       Sat, 21 Nov 2009 16:28:34 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at keithp.com
+Received: from keithp.com ([127.0.0.1])
+       by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024)
+       with LMTP id tw1iDvWYNGRC; Sat, 21 Nov 2009 16:28:31 -0800 (PST)
+Received: by keithp.com (Postfix, from userid 1033)
+       id 60F3176012B; Sat, 21 Nov 2009 16:28:31 -0800 (PST)
+Received: from keithp.com (localhost [127.0.0.1])
+       by keithp.com (Postfix) with ESMTP id 5330D76012A;
+       Sat, 21 Nov 2009 16:28:31 -0800 (PST)
+From: Keith Packard <keithp@keithp.com>
+To: Stefan Schmidt <stefan@datenfreihafen.org>, notmuch@notmuchmail.org
+In-Reply-To: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+References: <yes> <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+Date: Sat, 21 Nov 2009 16:28:30 -0800
+Message-ID: <yunvdh3pfm9.fsf@aiko.keithp.com>
+MIME-Version: 1.0
+Content-Type: multipart/signed; boundary="=-=-=";
+       micalg=pgp-sha1; protocol="application/pgp-signature"
+Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir
+ flags.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 00:28:35 -0000
+
+--=-=-=
+Content-Transfer-Encoding: quoted-printable
+
+On Sun, 22 Nov 2009 01:11:00 +0100, Stefan Schmidt <stefan@datenfreihafen.o=
+rg> wrote:
+
+> +const char *
+> +notmuch_message_get_flags (notmuch_message_t *message)
+
+This function should interpret the flags that it finds and return a
+suitable set of notmuch tags. I'd suggest that 'unread' messages get
+both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between
+'don't show this to be by default again please' and 'I've read this
+message'. It seems best to hide the maildir-specific details inside the
+library instead of exposing them.
+
+Also, we have only the 'unread' tag; we don't have a 'read' tag, which
+would simply be the inverse of 'unread'.
+
+=2D-=20
+keith.packard@intel.com
+
+--=-=-=
+Content-Type: application/pgp-signature
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iD8DBQFLCIWuQp8BWwlsTdMRAvcTAKDXHYc6MTuuZFMzHvZFs1omBbr9CACdEY/b
+jqyT/QmmgoA/GtIcs/DfLMY=
+=LVlh
+-----END PGP SIGNATURE-----
+--=-=-=--
+
diff --git a/test/corpora/lkml/cur/1354585346.000323:2, b/test/corpora/lkml/cur/1354585346.000323:2,
new file mode 100644 (file)
index 0000000..b7fc28f
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <stefan@datenfreihafen.org>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id 912FF431FBF
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 10:33:44 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id 9T+Abdbhab0i for <notmuch@notmuchmail.org>;
+       Sun, 22 Nov 2009 10:33:43 -0800 (PST)
+Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19])
+       by olra.theworths.org (Postfix) with ESMTP id 39D1C431FAE
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 10:33:43 -0800 (PST)
+Received: from p5b0353d3.dip.t-dialin.net ([91.3.83.211] helo=excalibur)
+       by sirius.lasnet.de with esmtpsa 
+       (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1)
+       id 1NCHFh-0000dR-It by authid <stefan@sostec.de> with cram_md5;
+       Sun, 22 Nov 2009 19:33:40 +0100
+Received: from stefan by excalibur with local (Exim 4.69)
+       (envelope-from <stefan@excalibur.local>)
+       id 1NCHFi-0002ot-2C; Sun, 22 Nov 2009 19:33:38 +0100
+Date: Sun, 22 Nov 2009 19:33:38 +0100
+From: Stefan Schmidt <stefan@datenfreihafen.org>
+To: Keith Packard <keithp@keithp.com>
+Message-ID: <20091122183338.GB5735@excalibur.local>
+References: <yes> <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+       <yunvdh3pfm9.fsf@aiko.keithp.com>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg=pgp-sha1;
+       protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc"
+Content-Disposition: inline
+In-Reply-To: <yunvdh3pfm9.fsf@aiko.keithp.com>
+X-Mailer: Mutt http://www.mutt.org/
+X-KeyID: 0xDDF51665
+X-Website: http://www.datenfreihafen.org/
+User-Agent: Mutt/1.5.20 (2009-06-14)
+Cc: notmuch@notmuchmail.org
+Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir
+ flags.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 18:33:44 -0000
+
+
+--C7zPtVaVf+AK4Oqc
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+Content-Transfer-Encoding: quoted-printable
+
+Hello.
+
+On Sat, 2009-11-21 at 16:28, Keith Packard wrote:
+> On Sun, 22 Nov 2009 01:11:00 +0100, Stefan Schmidt <stefan@datenfreihafen=
+=2Eorg> wrote:
+>=20
+> > +const char *
+> > +notmuch_message_get_flags (notmuch_message_t *message)
+>=20
+> This function should interpret the flags that it finds and return a
+> suitable set of notmuch tags. I'd suggest that 'unread' messages get
+> both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between
+> 'don't show this to be by default again please' and 'I've read this
+> message'. It seems best to hide the maildir-specific details inside the
+> library instead of exposing them.
+
+Thanks for the review. On a second thought the interface was really a bit u=
+gly.
+:)
+
+I'm just back to my box and going through the outstanding mails shows me th=
+at
+Michiel Buddingh has a more complete patch on the
+convert-maildir-flags-into-tags issue which Carl has tagged for review. Will
+wait what comes out of it and if anything is left for me to. :)
+
+regards
+Stefan Schmidt
+
+--C7zPtVaVf+AK4Oqc
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: Digital signature
+Content-Disposition: inline
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+Comment: http://www.datenfreihafen.org/contact.html
+
+iEYEARECAAYFAksJhAIACgkQbNSsvd31FmWDDgCgswbE3BE2XeExPzBBJf86efDw
+aFwAoMc3vaBmTjB2kG5ORUmk1E/ICBXK
+=k8v5
+-----END PGP SIGNATURE-----
+
+--C7zPtVaVf+AK4Oqc--
+
diff --git a/test/corpora/lkml/cur/1354585346.000324:2, b/test/corpora/lkml/cur/1354585346.000324:2,
new file mode 100644 (file)
index 0000000..a72ef9a
--- /dev/null
@@ -0,0 +1,71 @@
+Return-Path: <michiel@michielbuddingh.net>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id B580E431FBC
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 10:55:27 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id JHZeV0d6+Q8a for <notmuch@notmuchmail.org>;
+       Sun, 22 Nov 2009 10:55:26 -0800 (PST)
+Received: from aegir.org.uk (aegir.org.uk [87.238.170.13])
+       by olra.theworths.org (Postfix) with ESMTP id C6AAC431FAE
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 10:55:26 -0800 (PST)
+Received: from localhost.localdomain (109-9-ftth.onsnetstudenten.nl
+       [145.120.9.109])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by aegir.org.uk (Postfix) with ESMTPSA id 48CE72E02A;
+       Sun, 22 Nov 2009 19:55:26 +0100 (CET)
+Date: Sun, 22 Nov 2009 19:55:26 +0100
+From: Michiel Buddingh' <michiel@michielbuddingh.net>
+To: notmuch@notmuchmail.org, stefan@datenfreihafen.org,
+ keithp@keithp.com
+Message-ID: <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net>
+References: <yes> <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+       <yunvdh3pfm9.fsf@aiko.keithp.com>
+       <20091122183338.GB5735@excalibur.local>
+In-Reply-To: <20091122183338.GB5735@excalibur.local>
+User-Agent: Heirloom mailx 12.4 7/29/08
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir
+ flags.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 18:55:27 -0000
+
+Stefan Schmidt <stefan@datenfreihafen.org> wrote:
+> > This function should interpret the flags that it finds and return a
+> > suitable set of notmuch tags. I'd suggest that 'unread' messages get
+> > both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between
+> > 'don't show this to be by default again please' and 'I've read this
+> > message'. It seems best to hide the maildir-specific details inside the
+> > library instead of exposing them.
+>
+> Thanks for the review. On a second thought the interface was really a bit ugly.
+> :)
+>
+> I'm just back to my box and going through the outstanding mails shows me that
+> Michiel Buddingh has a more complete patch on the
+> convert-maildir-flags-into-tags issue which Carl has tagged for review. Will
+> wait what comes out of it and if anything is left for me to. :)
+
+Apologies.  In my haste to cover up my appalling and incorrect first patch, I
+neglected to review the archives to see if someone had already done this. Sorry
+for stealing your thunder.
+
+Michiel
+
diff --git a/test/corpora/lkml/cur/1354585346.000325:2, b/test/corpora/lkml/cur/1354585346.000325:2,
new file mode 100644 (file)
index 0000000..fc2da16
--- /dev/null
@@ -0,0 +1,86 @@
+Return-Path: <stefan@datenfreihafen.org>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id B2DE3431FBC
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 11:52:54 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id TrLH7uZhkvFU for <notmuch@notmuchmail.org>;
+       Sun, 22 Nov 2009 11:52:53 -0800 (PST)
+Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19])
+       by olra.theworths.org (Postfix) with ESMTP id 7024B431FAE
+       for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 11:52:53 -0800 (PST)
+Received: from p5b0353d3.dip.t-dialin.net ([91.3.83.211] helo=excalibur)
+       by sirius.lasnet.de with esmtpsa 
+       (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1)
+       id 1NCIUJ-0002QO-OM by authid <stefan@sostec.de> with cram_md5;
+       Sun, 22 Nov 2009 20:52:50 +0100
+Received: from stefan by excalibur with local (Exim 4.69)
+       (envelope-from <stefan@excalibur.local>)
+       id 1NCIUI-0003ON-Sr; Sun, 22 Nov 2009 20:52:46 +0100
+Date: Sun, 22 Nov 2009 20:52:46 +0100
+From: Stefan Schmidt <stefan@datenfreihafen.org>
+To: Michiel Buddingh' <michiel@michielbuddingh.net>
+Message-ID: <20091122195246.GC5735@excalibur.local>
+References: <yes> <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org>
+       <yunvdh3pfm9.fsf@aiko.keithp.com>
+       <20091122183338.GB5735@excalibur.local>
+       <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net>
+X-Mailer: Mutt http://www.mutt.org/
+X-KeyID: 0xDDF51665
+X-Website: http://www.datenfreihafen.org/
+User-Agent: Mutt/1.5.20 (2009-06-14)
+Cc: notmuch@notmuchmail.org
+Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir
+ flags.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Sun, 22 Nov 2009 19:52:54 -0000
+
+Hello.
+
+On Sun, 2009-11-22 at 19:55, Michiel Buddingh' wrote:
+> Stefan Schmidt <stefan@datenfreihafen.org> wrote:
+> > > This function should interpret the flags that it finds and return a
+> > > suitable set of notmuch tags. I'd suggest that 'unread' messages get
+> > > both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between
+> > > 'don't show this to be by default again please' and 'I've read this
+> > > message'. It seems best to hide the maildir-specific details inside the
+> > > library instead of exposing them.
+> >
+> > Thanks for the review. On a second thought the interface was really a bit ugly.
+> > :)
+> >
+> > I'm just back to my box and going through the outstanding mails shows me that
+> > Michiel Buddingh has a more complete patch on the
+> > convert-maildir-flags-into-tags issue which Carl has tagged for review. Will
+> > wait what comes out of it and if anything is left for me to. :)
+> 
+> Apologies.  In my haste to cover up my appalling and incorrect first patch, I
+> neglected to review the archives to see if someone had already done this. Sorry
+> for stealing your thunder.
+
+No need to be sorry. I'm interestecd in having this itch scratched, but don't
+care who is doing it. :)
+
+Just go ahead and get it in after Carl's review.
+
+regards
+Stefan Schmidt
+
diff --git a/test/corpora/lkml/cur/1354585346.000539:2, b/test/corpora/lkml/cur/1354585346.000539:2,
new file mode 100644 (file)
index 0000000..daa5673
--- /dev/null
@@ -0,0 +1,81 @@
+Return-Path: <ingmar@exherbo.org>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id BAA52431FBC
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 00:43:44 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id 0U+OLchDCS5T for <notmuch@notmuchmail.org>;
+       Thu, 26 Nov 2009 00:43:44 -0800 (PST)
+Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])
+       by olra.theworths.org (Postfix) with ESMTP id 05223431FAE
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 00:43:43 -0800 (PST)
+Received: from [83.101.72.69] (helo=localhost)
+       by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69)
+       (envelope-from <ingmar@exherbo.org>) id 1NDZx1-0000VV-3u
+       for notmuch@notmuchmail.org; Thu, 26 Nov 2009 08:43:43 +0000
+Content-Type: text/plain; charset=utf8
+From: Ingmar Vanhassel <ingmar@exherbo.org>
+To: notmuch <notmuch@notmuchmail.org>
+In-reply-to: <1259223435-29656-1-git-send-email-stefan@datenfreihafen.org>
+References: <yes> <1259223435-29656-1-git-send-email-stefan@datenfreihafen.org>
+Date: Thu, 26 Nov 2009 09:43:42 +0100
+Message-Id: <1259224970-sup-5259@cannonball>
+User-Agent: Sup/git
+Content-Transfer-Encoding: 8bit
+Subject: Re: [notmuch] [PATCH] Makefile: Enable backslash escapes for echo.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Thu, 26 Nov 2009 08:43:44 -0000
+
+Excerpts from Stefan Schmidt's message of Thu Nov 26 09:17:15 +0100 2009:
+> This fixes a visual glitch during a silent compile.
+> Before:
+> Use "make V=1" to see the verbose compile lines.\n  CC  debugger.o
+>   CC    gmime-filter-reply.o
+> 
+> After:
+> Use "make V=1" to see the verbose compile lines.
+>   CC    debugger.o
+>   CC    gmime-filter-reply.o
+> 
+> Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
+
+Looks right, works here with bash, dash & zsh, so:
+
+Reviewed-by: Ingmar Vanhassel <ingmar@exherbo.org>
+
+Thanks!
+
+> ---
+>  Makefile |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+> diff --git a/Makefile b/Makefile
+> index 2cd1b1b..2d19a6e 100644
+> --- a/Makefile
+> +++ b/Makefile
+> @@ -41,7 +41,7 @@ include Makefile.config
+>  # user how to enable verbose compiles.
+>  ifeq ($(V),)
+>  quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
+> -quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)"  $1    $@"; $($1)
+> +quiet = @echo -e $(quiet_DOC)$(eval quiet_DOC:=)"  $1    $@"; $($1)
+>  endif
+>  # The user has explicitly enabled quiet compilation.
+>  ifeq ($(V),0)
+-- 
+Exherbo KDE, X.org maintainer
+
diff --git a/test/corpora/lkml/cur/1354585346.000541:2, b/test/corpora/lkml/cur/1354585346.000541:2,
new file mode 100644 (file)
index 0000000..3e70055
--- /dev/null
@@ -0,0 +1,64 @@
+Return-Path: <kha@treskal.com>
+X-Original-To: notmuch@notmuchmail.org
+Delivered-To: notmuch@notmuchmail.org
+Received: from localhost (localhost [127.0.0.1])
+       by olra.theworths.org (Postfix) with ESMTP id 54307431FBC
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 03:41:18 -0800 (PST)
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
+Received: from olra.theworths.org ([127.0.0.1])
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
+       with ESMTP id TBdvxm5kBScu for <notmuch@notmuchmail.org>;
+       Thu, 26 Nov 2009 03:41:13 -0800 (PST)
+Received: from mail1.space2u.com (mail1.space2u.com [62.20.1.135])
+       by olra.theworths.org (Postfix) with ESMTP id 80538431FAE
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 03:41:13 -0800 (PST)
+Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com
+       [209.85.218.224]) (authenticated bits=0)
+       by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nAQBf0Ar018995
+       (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT)
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 12:41:01 +0100
+Received: by bwz24 with SMTP id 24so480173bwz.30
+       for <notmuch@notmuchmail.org>; Thu, 26 Nov 2009 03:41:11 -0800 (PST)
+MIME-Version: 1.0
+Received: by 10.204.153.3 with SMTP id i3mr2263267bkw.26.1259235670122; Thu, 
+       26 Nov 2009 03:41:10 -0800 (PST)
+In-Reply-To: <20091126110505.GI25119@ryngle.com>
+References: <1259223435-29656-1-git-send-email-stefan@datenfreihafen.org>
+       <20091126110505.GI25119@ryngle.com>
+Date: Thu, 26 Nov 2009 12:41:10 +0100
+Message-ID: <b8197bcb0911260341o480edc2bof8a30f0b724dd96@mail.gmail.com>
+From: Karl Wiberg <kha@treskal.com>
+To: Jan Janak <jan@ryngle.com>
+Content-Type: text/plain; charset=UTF-8
+Cc: notmuch@notmuchmail.org
+Subject: Re: [notmuch] [PATCH] Makefile: Enable backslash escapes for echo.
+X-BeenThere: notmuch@notmuchmail.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Use and development of the notmuch mail system."
+       <notmuch.notmuchmail.org>
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>
+List-Post: <mailto:notmuch@notmuchmail.org>
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
+X-List-Received-Date: Thu, 26 Nov 2009 11:41:18 -0000
+
+On Thu, Nov 26, 2009 at 12:05 PM, Jan Janak <jan@ryngle.com> wrote:
+
+> I sent exactly the same patch a couple of days ago and it was
+> rejected because it does not work everywhere, see:
+>
+> http://notmuchmail.org/pipermail/notmuch/2009/000370.html
+
+And as I said in that thread, I believe you should use printf instead.
+(http://www.in-ulm.de/~mascheck/various/echo+printf/ seems like a good
+reference in this matter.)
+
+-- 
+Karl Wiberg, kha@treskal.com
+   subrabbit.wordpress.com
+   www.treskal.com/kalle
+
diff --git a/test/corpora/lkml/cur/1382298587.001724:2, b/test/corpora/lkml/cur/1382298587.001724:2,
new file mode 100644 (file)
index 0000000..69c794c
--- /dev/null
@@ -0,0 +1,104 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Tue, 22 Jun 2010 20:55:09 +0530
+Lines: 66
+Message-ID: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:25:29 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5Ls-0004PS-BM
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:25:28 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1755015Ab0FVPZ1 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:25:27 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:48639 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1754070Ab0FVPZ1 (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:25:27 -0400
+X-Greylist: delayed 316 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jun 2010 11:25:26 EDT
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:25:11 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001750>
+
+Add a mount option 'fsc' to enable local caching on CIFS.
+
+As the cifs-utils (userspace) changes are not done yet, this patch enables
+'fsc' by default to assist testing.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/cifs_fs_sb.h |    1 +
+ fs/cifs/connect.c    |    8 ++++++++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
+index 246a167..9e77145 100644
+--- a/fs/cifs/cifs_fs_sb.h
++++ b/fs/cifs/cifs_fs_sb.h
+@@ -35,6 +35,7 @@
+ #define CIFS_MOUNT_DYNPERM      0x1000 /* allow in-memory only mode setting   */
+ #define CIFS_MOUNT_NOPOSIXBRL   0x2000 /* mandatory not posix byte range lock */
+ #define CIFS_MOUNT_NOSSYNC      0x4000 /* don't do slow SMBflush on every sync*/
++#define CIFS_MOUNT_FSCACHE    0x8000 /* local caching enabled */
+ struct cifs_sb_info {
+       struct cifsTconInfo *tcon;      /* primary mount */
+diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
+index 4844dbd..6c6ff3c 100644
+--- a/fs/cifs/connect.c
++++ b/fs/cifs/connect.c
+@@ -98,6 +98,7 @@ struct smb_vol {
+       bool noblocksnd:1;
+       bool noautotune:1;
+       bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
++      bool fsc:1;     /* enable fscache */
+       unsigned int rsize;
+       unsigned int wsize;
+       bool sockopt_tcp_nodelay:1;
+@@ -843,6 +844,9 @@ cifs_parse_mount_options(char *options, const char *devname,
+       /* default to using server inode numbers where available */
+       vol->server_ino = 1;
++      /* XXX: default to fsc for testing until mount.cifs pieces are done */
++      vol->fsc = 1;
++
+       if (!options)
+               return 1;
+@@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const char *devname,
+                       printk(KERN_WARNING "CIFS: Mount option noac not "
+                               "supported. Instead set "
+                               "/proc/fs/cifs/LookupCacheEnabled to 0\n");
++              } else if (strnicmp(data, "fsc", 3) == 0) {
++                      vol->fsc = true;
+               } else
+                       printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
+                                               data);
+@@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+       if (pvolume_info->dynperm)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
++      if (pvolume_info->fsc)
++              cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
+       if (pvolume_info->direct_io) {
+               cFYI(1, "mounting share using direct i/o");
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001730:2, b/test/corpora/lkml/cur/1382298587.001730:2,
new file mode 100644 (file)
index 0000000..840be2e
--- /dev/null
@@ -0,0 +1,103 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 00/10] cifs: local caching support using FS-Cache
+Date: Tue, 22 Jun 2010 20:50:05 +0530
+Lines: 66
+Message-ID: <1277220005-3322-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:40:38 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5aY-00055O-BD
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:40:38 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751889Ab0FVPkf (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:40:35 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:50040 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751554Ab0FVPkf (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:40:35 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:20:07 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001756>
+
+This patchset is a first stab at adding persistent, local caching facility for
+CIFS using the FS-Cache interface.
+
+The index hierarchy which is mainly used to locate a file object or discard
+a certain subset of the files cached, currently has three levels:
+       - Server
+       - Share 
+       - File
+
+The server index object is keyed by hostname of the server. The superblock
+index object is keyed by the sharename and the inode object is keyed by the
+UniqueId. The cache coherency is ensured by checking the 'LastWriteTime' and
+size of file.
+
+To use this, apply this patchset in order, mount the share with rsize=4096 and
+try copying a huge file (say few hundred MBs) from mount point to local
+filesystem. During the first time, the cache will be initialized. When you copy
+the second time, it should read from the local cache.
+
+To reduce the impact of page cache and see the local caching in action
+readily, try doing a sync and drop the caches by doing:
+       sync; echo 3 > /proc/sys/vm/drop_caches
+
+Known issues
+-------------
+       - the cache coherency check may not be reliable always as some
+         CIFS servers are known not to update mtime until the filehandle is
+         closed.
+       - not all the Servers under all circumstances provide a unique
+         'UniqueId'.
+
+Todo's
+-------
+       - improvements to avoid potential key collisions
+       - address the above known issues
+
+This set is lightly tested and all the bugs seen during my testing have been
+fixed. However, this can be considered as an RFC for now.
+
+Any Comments or Suggestions are welcome.
+
+Suresh Jayaraman (10)
+  cifs: add kernel config option for CIFS Client caching support
+  cifs: guard cifsglob.h against multiple inclusion
+  cifs: register CIFS for caching
+  cifs: define server-level cache index objects and register them with FS-Cache
+  cifs: define superblock-level cache index objects and register them
+  cifs: define inode-level cache object and register them
+  cifs: FS-Cache page management
+  cifs: store pages into local cache
+  cifs: read pages from FS-Cache
+  cifs: add mount option to enable local caching
+
+ Kconfig      |    9 ++
+ Makefile     |    2 
+ cache.c      |  251 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ cifs_fs_sb.h |    1 
+ cifsfs.c     |   15 +++
+ cifsglob.h   |   14 +++
+ connect.c    |   16 +++
+ file.c       |   51 +++++++++++
+ fscache.c    |  244 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fscache.h    |  135 +++++++++++++++++++++++++++++++
+ inode.c      |    4 
+ 11 files changed, 742 insertions(+)
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001731:2, b/test/corpora/lkml/cur/1382298587.001731:2,
new file mode 100644 (file)
index 0000000..d8b3168
--- /dev/null
@@ -0,0 +1,67 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 01/10] cifs: add kernel config option for CIFS Client caching support
+Date: Tue, 22 Jun 2010 20:52:38 +0530
+Lines: 30
+Message-ID: <1277220158-3405-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:43:27 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5dG-0007m9-Ij
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:43:26 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1751536Ab0FVPnS (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:18 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:51303 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1750800Ab0FVPnR (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:43:17 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:22:40 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001757>
+
+Add a kernel config option to enable local caching for CIFS.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/Kconfig |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
+index 80f3525..5739fd7 100644
+--- a/fs/cifs/Kconfig
++++ b/fs/cifs/Kconfig
+@@ -131,6 +131,15 @@ config CIFS_DFS_UPCALL
+           IP addresses) which is needed for implicit mounts of DFS junction
+           points. If unsure, say N.
++config CIFS_FSCACHE
++        bool "Provide CIFS client caching support (EXPERIMENTAL)"
++        depends on EXPERIMENTAL
++        depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
++        help
++          Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
++          to be cached locally on disk through the general filesystem cache
++          manager. If unsure, say N.
++
+ config CIFS_EXPERIMENTAL
+         bool "CIFS Experimental Features (EXPERIMENTAL)"
+         depends on CIFS && EXPERIMENTAL
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001732:2, b/test/corpora/lkml/cur/1382298587.001732:2,
new file mode 100644 (file)
index 0000000..8850953
--- /dev/null
@@ -0,0 +1,73 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 02/10] cifs: guard cifsglob.h against multiple inclusion
+Date: Tue, 22 Jun 2010 20:52:50 +0530
+Lines: 36
+Message-ID: <1277220170-3442-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-fsdevel-owner@vger.kernel.org Tue Jun 22 17:43:39 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OR5dT-0007sB-18
+       for lnx-linux-fsdevel@lo.gmane.org; Tue, 22 Jun 2010 17:43:39 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752441Ab0FVPn3 (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:29 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:41538 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751889Ab0FVPn2 (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:43:28 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:22:52 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001758>
+
+Add conditional compile macros to guard the header file against multiple
+inclusion.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cifsglob.h |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+index a88479c..6b2c39d 100644
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
+@@ -16,6 +16,9 @@
+  *   the GNU Lesser General Public License for more details.
+  *
+  */
++#ifndef _CIFS_GLOB_H
++#define _CIFS_GLOB_H
++
+ #include <linux/in.h>
+ #include <linux/in6.h>
+ #include <linux/slab.h>
+@@ -733,3 +736,5 @@ GLOBAL_EXTERN unsigned int cifs_min_small;  /* min size of small buf pool */
+ GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/
+ extern const struct slow_work_ops cifs_oplock_break_ops;
++
++#endif        /* _CIFS_GLOB_H */
+-- 
+1.6.4.2
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001733:2, b/test/corpora/lkml/cur/1382298587.001733:2,
new file mode 100644 (file)
index 0000000..d782f90
--- /dev/null
@@ -0,0 +1,211 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 03/10] cifs: register CIFS for caching
+Date: Tue, 22 Jun 2010 20:53:09 +0530
+Lines: 174
+Message-ID: <1277220189-3485-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:43:52 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5de-0007xC-Ov
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:43:51 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753125Ab0FVPnt (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:49 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:55866 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751261Ab0FVPnt (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:43:49 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:11 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001759>
+
+Define CIFS for FS-Cache and register for caching. Upon registration the
+top-level index object cookie will be stuck to the netfs definition by
+FS-Cache.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/Makefile  |    2 ++
+ fs/cifs/cache.c   |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsfs.c  |    8 ++++++++
+ fs/cifs/fscache.h |   40 ++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 103 insertions(+), 0 deletions(-)
+ create mode 100644 fs/cifs/cache.c
+ create mode 100644 fs/cifs/fscache.h
+
+diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
+index 9948c00..e2de709 100644
+--- a/fs/cifs/Makefile
++++ b/fs/cifs/Makefile
+@@ -11,3 +11,5 @@ cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \
+ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
+ cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
++
++cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
+diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
+new file mode 100644
+index 0000000..1080b96
+--- /dev/null
++++ b/fs/cifs/cache.c
+@@ -0,0 +1,53 @@
++/*
++ *   fs/cifs/cache.c - CIFS filesystem cache index structure definitions
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++
++#include "fscache.h"
++#include "cifsglob.h"
++#include "cifs_debug.h"
++
++/*
++ * CIFS filesystem definition for FS-Cache
++ */
++struct fscache_netfs cifs_fscache_netfs = {
++      .name = "cifs",
++      .version = 0,
++};
++
++/*
++ * Register CIFS for caching with FS-Cache
++ */
++int cifs_fscache_register(void)
++{
++      return fscache_register_netfs(&cifs_fscache_netfs);
++}
++
++/*
++ * Unregister CIFS for caching
++ */
++void cifs_fscache_unregister(void)
++{
++      fscache_unregister_netfs(&cifs_fscache_netfs);
++}
++
+diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
+index 484e52b..c2a7aa9 100644
+--- a/fs/cifs/cifsfs.c
++++ b/fs/cifs/cifsfs.c
+@@ -47,6 +47,7 @@
+ #include <linux/key-type.h>
+ #include "dns_resolve.h"
+ #include "cifs_spnego.h"
++#include "fscache.h"
+ #define CIFS_MAGIC_NUMBER 0xFF534D42  /* the first four bytes of SMB PDUs */
+ int cifsFYI = 0;
+@@ -902,6 +903,10 @@ init_cifs(void)
+               cFYI(1, "cifs_max_pending set to max of 256");
+       }
++      rc = cifs_fscache_register();
++      if (rc)
++              goto out;
++
+       rc = cifs_init_inodecache();
+       if (rc)
+               goto out_clean_proc;
+@@ -949,8 +954,10 @@ init_cifs(void)
+       cifs_destroy_mids();
+  out_destroy_inodecache:
+       cifs_destroy_inodecache();
++      cifs_fscache_unregister();
+  out_clean_proc:
+       cifs_proc_clean();
++ out:
+       return rc;
+ }
+@@ -959,6 +966,7 @@ exit_cifs(void)
+ {
+       cFYI(DBG2, "exit_cifs");
+       cifs_proc_clean();
++      cifs_fscache_unregister();
+ #ifdef CONFIG_CIFS_DFS_UPCALL
+       cifs_dfs_release_automount_timer();
+       unregister_key_type(&key_type_dns_resolver);
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+new file mode 100644
+index 0000000..cec9e2b
+--- /dev/null
++++ b/fs/cifs/fscache.h
+@@ -0,0 +1,40 @@
++/*
++ *   fs/cifs/fscache.h - CIFS filesystem cache interface definitions
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#ifndef _CIFS_FSCACHE_H
++#define _CIFS_FSCACHE_H
++
++#include <linux/fscache.h>
++#include "cifsglob.h"
++
++#ifdef CONFIG_CIFS_FSCACHE
++
++extern struct fscache_netfs cifs_fscache_netfs;
++
++extern int cifs_fscache_register(void);
++extern void cifs_fscache_unregister(void);
++
++#else /* CONFIG_CIFS_FSCACHE */
++static inline int cifs_fscache_register(void) { return 0; }
++static inline void cifs_fscache_unregister(void) {}
++
++#endif /* CONFIG_CIFS_FSCACHE */
++
++#endif /* _CIFS_FSCACHE_H */
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001734:2, b/test/corpora/lkml/cur/1382298587.001734:2,
new file mode 100644 (file)
index 0000000..4b64bc3
--- /dev/null
@@ -0,0 +1,223 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 04/10] cifs: define server-level cache index objects and register them with FS-Cache
+Date: Tue, 22 Jun 2010 20:53:18 +0530
+Lines: 186
+Message-ID: <1277220198-3522-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:44:26 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5eD-0008G7-KP
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:44:26 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753942Ab0FVPoC (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:02 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:58783 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751265Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:20 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001760>
+
+Define server-level cache index objects (as managed by TCP_ServerInfo structs).
+Each server object is created in the CIFS top-level index object and is itself
+an index into which superblock-level objects are inserted.
+
+Currently, the server objects are keyed by hostname.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/Makefile   |    2 +-
+ fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
+ fs/cifs/cifsglob.h |    3 +++
+ fs/cifs/connect.c  |    4 ++++
+ fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h  |   12 ++++++++++++
+ 6 files changed, 92 insertions(+), 1 deletion(-)
+ create mode 100644 fs/cifs/fscache.c
+
+Index: cifs-2.6/fs/cifs/Makefile
+===================================================================
+--- cifs-2.6.orig/fs/cifs/Makefile
++++ cifs-2.6/fs/cifs/Makefile
+@@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
+ cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
+-cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
++cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
+       fscache_unregister_netfs(&cifs_fscache_netfs);
+ }
++/*
++ * Server object currently keyed by hostname
++ */
++static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
++                                 void *buffer, uint16_t maxbuf)
++{
++      const struct TCP_Server_Info *server = cookie_netfs_data;
++      uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
++
++      if (len > maxbuf)
++              return 0;
++
++      memcpy(buffer, server->hostname, len);
++
++      return len;
++}
++
++/*
++ * Server object for FS-Cache
++ */
++const struct fscache_cookie_def cifs_fscache_server_index_def = {
++      .name = "CIFS.server",
++      .type = FSCACHE_COOKIE_TYPE_INDEX,
++      .get_key = cifs_server_get_key,
++};
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -193,6 +193,9 @@ struct TCP_Server_Info {
+       bool    sec_mskerberos;         /* supports legacy MS Kerberos */
+       bool    sec_kerberosu2u;        /* supports U2U Kerberos */
+       bool    sec_ntlmssp;            /* supports NTLMSSP */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie   *fscache; /* client index cache cookie */
++#endif
+ };
+ /*
+Index: cifs-2.6/fs/cifs/connect.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/connect.c
++++ cifs-2.6/fs/cifs/connect.c
+@@ -48,6 +48,7 @@
+ #include "nterr.h"
+ #include "rfc1002pdu.h"
+ #include "cn_cifs.h"
++#include "fscache.h"
+ #define CIFS_PORT 445
+ #define RFC1001_PORT 139
+@@ -1453,6 +1454,8 @@ cifs_put_tcp_session(struct TCP_Server_I
+               return;
+       }
++      cifs_fscache_release_client_cookie(server);
++
+       list_del_init(&server->tcp_ses_list);
+       write_unlock(&cifs_tcp_ses_lock);
+@@ -1572,6 +1575,7 @@ cifs_get_tcp_session(struct smb_vol *vol
+               goto out_err;
+       }
++      cifs_fscache_get_client_cookie(tcp_ses);
+       /* thread spawned, put it on the list */
+       write_lock(&cifs_tcp_ses_lock);
+       list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- /dev/null
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -0,0 +1,47 @@
++/*
++ *   fs/cifs/fscache.c - CIFS filesystem cache interface
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/in6.h>
++
++#include "fscache.h"
++#include "cifsglob.h"
++#include "cifs_debug.h"
++
++void cifs_fscache_get_client_cookie(struct TCP_Server_Info *server)
++{
++      server->fscache =
++              fscache_acquire_cookie(cifs_fscache_netfs.primary_index,
++                              &cifs_fscache_server_index_def, server);
++      cFYI(1, "CIFS: get client cookie (0x%p/0x%p)\n",
++                              server, server->fscache);
++}
++
++void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
++{
++      cFYI(1, "CIFS: release client cookie (0x%p/0x%p)\n",
++                              server, server->fscache);
++      fscache_relinquish_cookie(server->fscache, 0);
++      server->fscache = NULL;
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -27,14 +27,26 @@
+ #ifdef CONFIG_CIFS_FSCACHE
+ extern struct fscache_netfs cifs_fscache_netfs;
++extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
++/*
++ * fscache.c
++ */
++extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
++extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
++static inline void
++cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
++static inline void
++cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
++
+ #endif /* CONFIG_CIFS_FSCACHE */
+ #endif /* _CIFS_FSCACHE_H */
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001735:2, b/test/corpora/lkml/cur/1382298587.001735:2,
new file mode 100644 (file)
index 0000000..d76da35
--- /dev/null
@@ -0,0 +1,212 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 07/10] cifs: FS-Cache page management
+Date: Tue, 22 Jun 2010 20:53:48 +0530
+Lines: 175
+Message-ID: <1277220228-3635-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:44:27 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5eF-0008G7-BK
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:44:27 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754757Ab0FVPoS (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:18 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:54214 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752542Ab0FVPoB (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:01 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:50 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001761>
+
+Takes care of invalidation and release of FS-Cache marked pages and also
+invalidation of the FsCache page flag when the inode is removed.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cache.c   |   31 +++++++++++++++++++++++++++++++
+ fs/cifs/file.c    |   20 ++++++++++++++++++++
+ fs/cifs/fscache.c |   26 ++++++++++++++++++++++++++
+ fs/cifs/fscache.h |   16 ++++++++++++++++
+ 4 files changed, 93 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
+index b205424..3a733c1 100644
+--- a/fs/cifs/cache.c
++++ b/fs/cifs/cache.c
+@@ -210,6 +210,36 @@ fscache_checkaux cifs_fscache_inode_check_aux(void *cookie_netfs_data,
+       return FSCACHE_CHECKAUX_OKAY;
+ }
++static void cifs_fscache_inode_now_uncached(void *cookie_netfs_data)
++{
++      struct cifsInodeInfo *cifsi = cookie_netfs_data;
++      struct pagevec pvec;
++      pgoff_t first;
++      int loop, nr_pages;
++
++      pagevec_init(&pvec, 0);
++      first = 0;
++
++      cFYI(1, "cifs inode 0x%p now uncached\n", cifsi);
++
++      for (;;) {
++              nr_pages = pagevec_lookup(&pvec,
++                                        cifsi->vfs_inode.i_mapping, first,
++                                        PAGEVEC_SIZE - pagevec_count(&pvec));
++              if (!nr_pages)
++                      break;
++
++              for (loop = 0; loop < nr_pages; loop++)
++                      ClearPageFsCache(pvec.pages[loop]);
++
++              first = pvec.pages[nr_pages - 1]->index + 1;
++
++              pvec.nr = nr_pages;
++              pagevec_release(&pvec);
++              cond_resched();
++      }
++}
++
+ const struct fscache_cookie_def cifs_fscache_inode_object_def = {
+       .name           = "CIFS.uniqueid",
+       .type           = FSCACHE_COOKIE_TYPE_DATAFILE,
+@@ -217,4 +247,5 @@ const struct fscache_cookie_def cifs_fscache_inode_object_def = {
+       .get_attr       = cifs_fscache_inode_get_attr,
+       .get_aux        = cifs_fscache_inode_get_aux,
+       .check_aux      = cifs_fscache_inode_check_aux,
++      .now_uncached   = cifs_fscache_inode_now_uncached,
+ };
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 55ecb55..786ec04 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -2271,6 +2271,22 @@ out:
+       return rc;
+ }
++static int cifs_release_page(struct page *page, gfp_t gfp)
++{
++      if (PagePrivate(page))
++              return 0;
++
++      return cifs_fscache_release_page(page, gfp);
++}
++
++static void cifs_invalidate_page(struct page *page, unsigned long offset)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(page->mapping->host);
++
++      if (offset == 0)
++              cifs_fscache_invalidate_page(page, &cifsi->vfs_inode);
++}
++
+ static void
+ cifs_oplock_break(struct slow_work *work)
+ {
+@@ -2344,6 +2360,8 @@ const struct address_space_operations cifs_addr_ops = {
+       .write_begin = cifs_write_begin,
+       .write_end = cifs_write_end,
+       .set_page_dirty = __set_page_dirty_nobuffers,
++      .releasepage = cifs_release_page,
++      .invalidatepage = cifs_invalidate_page,
+       /* .sync_page = cifs_sync_page, */
+       /* .direct_IO = */
+ };
+@@ -2360,6 +2378,8 @@ const struct address_space_operations cifs_addr_ops_smallbuf = {
+       .write_begin = cifs_write_begin,
+       .write_end = cifs_write_end,
+       .set_page_dirty = __set_page_dirty_nobuffers,
++      .releasepage = cifs_release_page,
++      .invalidatepage = cifs_invalidate_page,
+       /* .sync_page = cifs_sync_page, */
+       /* .direct_IO = */
+ };
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index ddfd355..c09d3b8 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -130,3 +130,29 @@ void cifs_fscache_reset_inode_cookie(struct inode *inode)
+       }
+ }
++int cifs_fscache_release_page(struct page *page, gfp_t gfp)
++{
++      if (PageFsCache(page)) {
++              struct inode *inode = page->mapping->host;
++              struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++              cFYI(1, "CIFS: fscache release page (0x%p/0x%p)\n",
++                              cifsi->fscache, page);
++              if (!fscache_maybe_release_page(cifsi->fscache, page, gfp))
++                      return 0;
++      }
++
++      return 1;
++}
++
++void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct fscache_cookie *cookie = cifsi->fscache;
++
++      cFYI(1, "CIFS: fscache invalidatepage (0x%p/0x%p/0x%p)\n",
++                      cookie, page, cifsi);
++      fscache_wait_on_page_write(cookie, page);
++      fscache_uncache_page(cookie, page);
++}
++
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index 836bb02..127cb0a 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -47,6 +47,16 @@ extern void cifs_fscache_release_inode_cookie(struct inode *);
+ extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
+ extern void cifs_fscache_reset_inode_cookie(struct inode *);
++extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
++extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++
++static inline void cifs_fscache_invalidate_page(struct page *page,
++                                             struct inode *inode)
++{
++      if (PageFsCache(page))
++              __cifs_fscache_invalidate_page(page, inode);
++}
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -63,7 +73,13 @@ static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
+ static inline void cifs_fscache_set_inode_cookie(struct inode *inode,
+                       struct file *filp) {}
+ static inline void cifs_fscache_reset_inode_cookie(struct inode *inode) {}
++static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
++{
++      return 1; /* May release page */
++}
++static inline int cifs_fscache_invalidate_page(struct page *page,
++                      struct inode *) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001736:2, b/test/corpora/lkml/cur/1382298587.001736:2,
new file mode 100644 (file)
index 0000000..f972891
--- /dev/null
@@ -0,0 +1,256 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 09/10] cifs: read pages from FS-Cache
+Date: Tue, 22 Jun 2010 20:54:21 +0530
+Lines: 219
+Message-ID: <1277220261-3717-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:44:46 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5eX-0008O2-Q4
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:44:46 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752563Ab0FVPom (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:42 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:42741 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752542Ab0FVPok (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:40 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:24:22 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001762>
+
+Read pages from a FS-Cache data storage object into a CIFS inode.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/file.c    |   19 ++++++++++++++
+ fs/cifs/fscache.c |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h |   40 ++++++++++++++++++++++++++++-
+ 3 files changed, 131 insertions(+), 1 deletions(-)
+
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 39c1ce0..42d2f25 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -1978,6 +1978,16 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+       cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
+       pTcon = cifs_sb->tcon;
++      /*
++       * Reads as many pages as possible from fscache. Returns -ENOBUFS
++       * immediately if the cookie is negative
++       */
++      rc = cifs_readpages_from_fscache(mapping->host, mapping, page_list,
++                                       &num_pages);
++      cFYI(1, "CIFS: readpages_from_fscache returned %d\n", rc);
++      if (rc == 0)
++              goto read_complete;
++
+       cFYI(DBG2, "rpages: num pages %d", num_pages);
+       for (i = 0; i < num_pages; ) {
+               unsigned contig_pages;
+@@ -2090,6 +2100,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+               smb_read_data = NULL;
+       }
++read_complete:
+       FreeXid(xid);
+       return rc;
+ }
+@@ -2100,6 +2111,12 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+       char *read_data;
+       int rc;
++      /* Is the page cached? */
++      rc = cifs_readpage_from_fscache(file->f_path.dentry->d_inode, page);
++      cFYI(1, "CIFS: cifs_readpage_from_fscache returned %d\n", rc);
++      if (rc == 0)
++              goto read_complete;
++
+       page_cache_get(page);
+       read_data = kmap(page);
+       /* for reads over a certain size could initiate async read ahead */
+@@ -2128,6 +2145,8 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+ io_error:
+       kunmap(page);
+       page_cache_release(page);
++
++read_complete:
+       return rc;
+ }
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index 13e47d5..6813737 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -145,6 +145,79 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)
+       return 1;
+ }
++static void cifs_readpage_from_fscache_complete(struct page *page, void *ctx,
++                                              int error)
++{
++      cFYI(1, "CFS: readpage_from_fscache_complete (0x%p/%d)\n",
++                      page, error);
++      if (!error)
++              SetPageUptodate(page);
++      unlock_page(page);
++}
++
++/*
++ * Retrieve a page from FS-Cache
++ */
++int __cifs_readpage_from_fscache(struct inode *inode, struct page *page)
++{
++      int ret;
++
++      cFYI(1, "CIFS: readpage_from_fscache(fsc:%p, p:%p, i:0x%p\n",
++                      CIFS_I(inode)->fscache, page, inode);
++      ret = fscache_read_or_alloc_page(CIFS_I(inode)->fscache, page,
++                                       cifs_readpage_from_fscache_complete,
++                                       NULL,
++                                       GFP_KERNEL);
++      switch (ret) {
++
++      case 0: /* page found in fscache, read submitted */
++              cFYI(1, "CIFS: readpage_from_fscache: submitted\n");
++              return ret;
++      case -ENOBUFS:  /* page won't be cached */
++      case -ENODATA:  /* page not in cache */
++              cFYI(1, "CIFS: readpage_from_fscache %d\n", ret);
++              return 1;
++
++      default:
++              cFYI(1, "unknown error ret = %d", ret);
++      }
++      return ret;
++}
++
++/*
++ * Retrieve a set of pages from FS-Cache
++ */
++int __cifs_readpages_from_fscache(struct inode *inode,
++                              struct address_space *mapping,
++                              struct list_head *pages,
++                              unsigned *nr_pages)
++{
++      int ret;
++
++      cFYI(1, "CIFS: __cifs_readpages_from_fscache (0x%p/%u/0x%p)\n",
++                      CIFS_I(inode)->fscache, *nr_pages, inode);
++      ret = fscache_read_or_alloc_pages(CIFS_I(inode)->fscache, mapping,
++                                        pages, nr_pages,
++                                        cifs_readpage_from_fscache_complete,
++                                        NULL,
++                                        mapping_gfp_mask(mapping));
++      switch (ret) {
++      case 0: /* read submitted to the cache for all pages */
++              cFYI(1, "CIFS: readpages_from_fscache\n");
++              return ret;
++
++      case -ENOBUFS:  /* some pages are not cached and can't be */
++      case -ENODATA:  /* some pages are not cached */
++              cFYI(1, "CIFS: readpages_from_fscache: no page\n");
++              return 1;
++
++      default:
++              cFYI(1, "unknown error ret = %d", ret);
++      }
++
++      return ret;
++}
++
+ void __cifs_readpage_to_fscache(struct inode *inode, struct page *page)
+ {
+       int ret;
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index e34d8ab..03bd3fe 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -31,7 +31,6 @@ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_super_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_inode_object_def;
+-
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -49,6 +48,11 @@ extern void cifs_fscache_reset_inode_cookie(struct inode *);
+ extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
+ extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++extern int __cifs_readpage_from_fscache(struct inode *, struct page *);
++extern int __cifs_readpages_from_fscache(struct inode *,
++                                       struct address_space *,
++                                       struct list_head *,
++                                       unsigned *);
+ extern void __cifs_readpage_to_fscache(struct inode *, struct page *);
+@@ -59,6 +63,26 @@ static inline void cifs_fscache_invalidate_page(struct page *page,
+               __cifs_fscache_invalidate_page(page, inode);
+ }
++static inline int cifs_readpage_from_fscache(struct inode *inode,
++                                           struct page *page)
++{
++      if (CIFS_I(inode)->fscache)
++              return __cifs_readpage_from_fscache(inode, page);
++
++      return -ENOBUFS;
++}
++
++static inline int cifs_readpages_from_fscache(struct inode *inode,
++                                            struct address_space *mapping,
++                                            struct list_head *pages,
++                                            unsigned *nr_pages)
++{
++      if (CIFS_I(inode)->fscache)
++              return __cifs_readpages_from_fscache(inode, mapping, pages,
++                                                   nr_pages);
++      return -ENOBUFS;
++}
++
+ static inline void cifs_readpage_to_fscache(struct inode *inode,
+                                           struct page *page)
+ {
+@@ -89,6 +113,20 @@ static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
+ static inline int cifs_fscache_invalidate_page(struct page *page,
+                       struct inode *) {}
++static inline int
++cifs_readpage_from_fscache(struct inode *inode, struct page *page)
++{
++      return -ENOBUFS;
++}
++
++static inline int cifs_readpages_from_fscache(struct inode *inode,
++                                            struct address_space *mapping,
++                                            struct list_head *pages,
++                                            unsigned *nr_pages)
++{
++      return -ENOBUFS;
++}
++
+ static inline void cifs_readpage_to_fscache(struct inode *inode,
+                       struct page *page) {}
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001738:2, b/test/corpora/lkml/cur/1382298587.001738:2,
new file mode 100644 (file)
index 0000000..b1e0edf
--- /dev/null
@@ -0,0 +1,139 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 08/10] cifs: store pages into local cache
+Date: Tue, 22 Jun 2010 20:54:00 +0530
+Lines: 102
+Message-ID: <1277220240-3674-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-fsdevel-owner@vger.kernel.org Tue Jun 22 17:45:09 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OR5ev-00007O-6e
+       for lnx-linux-fsdevel@lo.gmane.org; Tue, 22 Jun 2010 17:45:09 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755015Ab0FVPon (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:43 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:58250 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751265Ab0FVPok (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:40 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:24:02 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001764>
+
+Store pages from an CIFS inode into the data storage object associated with
+that inode.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/file.c    |    6 ++++++
+ fs/cifs/fscache.c |   13 +++++++++++++
+ fs/cifs/fscache.h |   11 +++++++++++
+ 3 files changed, 30 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 786ec04..39c1ce0 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -2060,6 +2060,8 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+                                  we will hit it on next read */
+                               /* break; */
++                              /* send this page to FS-Cache */
++                              cifs_readpage_to_fscache(mapping->host, page);
+                       }
+               } else {
+                       cFYI(1, "No bytes read (%d) at offset %lld . "
+@@ -2117,6 +2119,10 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+       flush_dcache_page(page);
+       SetPageUptodate(page);
++
++      /* send this page to the cache */
++      cifs_readpage_to_fscache(file->f_path.dentry->d_inode, page);
++
+       rc = 0;
+ io_error:
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index c09d3b8..13e47d5 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -145,6 +145,19 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)
+       return 1;
+ }
++void __cifs_readpage_to_fscache(struct inode *inode, struct page *page)
++{
++      int ret;
++
++      cFYI(1, "CIFS: readpage_to_fscache(fsc: %p, p: %p, i: %p\n",
++                      CIFS_I(inode)->fscache, page, inode);
++      ret = fscache_write_page(CIFS_I(inode)->fscache, page, GFP_KERNEL);
++      cFYI(1, "CIFS: fscache_write_page returned %d\n", ret);
++
++      if (ret != 0)
++              fscache_uncache_page(CIFS_I(inode)->fscache, page);
++}
++
+ void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode)
+ {
+       struct cifsInodeInfo *cifsi = CIFS_I(inode);
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index 127cb0a..e34d8ab 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -50,6 +50,8 @@ extern void cifs_fscache_reset_inode_cookie(struct inode *);
+ extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
+ extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++extern void __cifs_readpage_to_fscache(struct inode *, struct page *);
++
+ static inline void cifs_fscache_invalidate_page(struct page *page,
+                                              struct inode *inode)
+ {
+@@ -57,6 +59,13 @@ static inline void cifs_fscache_invalidate_page(struct page *page,
+               __cifs_fscache_invalidate_page(page, inode);
+ }
++static inline void cifs_readpage_to_fscache(struct inode *inode,
++                                          struct page *page)
++{
++      if (PageFsCache(page))
++              __cifs_readpage_to_fscache(inode, page);
++}
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -80,6 +89,8 @@ static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
+ static inline int cifs_fscache_invalidate_page(struct page *page,
+                       struct inode *) {}
++static inline void cifs_readpage_to_fscache(struct inode *inode,
++                      struct page *page) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+-- 
+1.6.4.2
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001739:2, b/test/corpora/lkml/cur/1382298587.001739:2,
new file mode 100644 (file)
index 0000000..d0abda0
--- /dev/null
@@ -0,0 +1,355 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Tue, 22 Jun 2010 20:53:33 +0530
+Lines: 318
+Message-ID: <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:45:30 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5fF-0000Ka-Na
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:45:30 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755952Ab0FVPpP (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:45:15 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:59441 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751397Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:35 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001765>
+
+Define inode-level data storage objects (managed by cifsInodeInfo structs).
+Each inode-level object is created in a super-block level object and is itself
+a data storage object in to which pages from the inode are stored.
+
+The inode object is keyed by UniqueId. The coherency data being used is
+LastWriteTime and the file size.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cache.c    |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsfs.c   |    7 ++++
+ fs/cifs/cifsglob.h |    3 +
+ fs/cifs/file.c     |    6 +++
+ fs/cifs/fscache.c  |   68 +++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h  |   12 +++++++
+ fs/cifs/inode.c    |    4 ++
+ 7 files changed, 180 insertions(+)
+
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -138,3 +138,83 @@ const struct fscache_cookie_def cifs_fsc
+       .get_key = cifs_super_get_key,
+ };
++/*
++ * Auxiliary data attached to CIFS inode within the cache
++ */
++struct cifs_fscache_inode_auxdata {
++      struct timespec last_write_time;
++      loff_t          size;
++};
++
++static uint16_t cifs_fscache_inode_get_key(const void *cookie_netfs_data,
++                                         void *buffer, uint16_t maxbuf)
++{
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++      uint16_t keylen;
++
++      /* use the UniqueId as the key */
++      keylen = sizeof(cifsi->uniqueid);
++      if (keylen > maxbuf)
++              keylen = 0;
++      else
++              memcpy(buffer, &cifsi->uniqueid, keylen);
++
++      return keylen;
++}
++
++static void
++cifs_fscache_inode_get_attr(const void *cookie_netfs_data, uint64_t *size)
++{
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      *size = cifsi->vfs_inode.i_size;
++}
++
++static uint16_t
++cifs_fscache_inode_get_aux(const void *cookie_netfs_data, void *buffer,
++                         uint16_t maxbuf)
++{
++      struct cifs_fscache_inode_auxdata auxdata;
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      memset(&auxdata, 0, sizeof(auxdata));
++      auxdata.size = cifsi->vfs_inode.i_size;
++      auxdata.last_write_time = cifsi->vfs_inode.i_ctime;
++
++      if (maxbuf > sizeof(auxdata))
++              maxbuf = sizeof(auxdata);
++
++      memcpy(buffer, &auxdata, maxbuf);
++
++      return maxbuf;
++}
++
++static enum
++fscache_checkaux cifs_fscache_inode_check_aux(void *cookie_netfs_data,
++                                            const void *data,
++                                            uint16_t datalen)
++{
++      struct cifs_fscache_inode_auxdata auxdata;
++      struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      if (datalen != sizeof(auxdata))
++              return FSCACHE_CHECKAUX_OBSOLETE;
++
++      memset(&auxdata, 0, sizeof(auxdata));
++      auxdata.size = cifsi->vfs_inode.i_size;
++      auxdata.last_write_time = cifsi->vfs_inode.i_ctime;
++
++      if (memcmp(data, &auxdata, datalen) != 0)
++              return FSCACHE_CHECKAUX_OBSOLETE;
++
++      return FSCACHE_CHECKAUX_OKAY;
++}
++
++const struct fscache_cookie_def cifs_fscache_inode_object_def = {
++      .name           = "CIFS.uniqueid",
++      .type           = FSCACHE_COOKIE_TYPE_DATAFILE,
++      .get_key        = cifs_fscache_inode_get_key,
++      .get_attr       = cifs_fscache_inode_get_attr,
++      .get_aux        = cifs_fscache_inode_get_aux,
++      .check_aux      = cifs_fscache_inode_check_aux,
++};
+Index: cifs-2.6/fs/cifs/cifsfs.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsfs.c
++++ cifs-2.6/fs/cifs/cifsfs.c
+@@ -330,6 +330,12 @@ cifs_destroy_inode(struct inode *inode)
+ }
+ static void
++cifs_clear_inode(struct inode *inode)
++{
++      cifs_fscache_release_inode_cookie(inode);
++}
++
++static void
+ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
+ {
+       seq_printf(s, ",addr=");
+@@ -490,6 +496,7 @@ static const struct super_operations cif
+       .alloc_inode = cifs_alloc_inode,
+       .destroy_inode = cifs_destroy_inode,
+       .drop_inode     = cifs_drop_inode,
++      .clear_inode    = cifs_clear_inode,
+ /*    .delete_inode   = cifs_delete_inode,  */  /* Do not need above
+       function unless later we add lazy close of inodes or unless the
+       kernel forgets to call us with the same number of releases (closes)
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -407,6 +407,9 @@ struct cifsInodeInfo {
+       bool invalid_mapping:1;         /* pagecache is invalid */
+       u64  server_eof;                /* current file size on server */
+       u64  uniqueid;                  /* server inode number */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie *fscache;
++#endif
+       struct inode vfs_inode;
+ };
+Index: cifs-2.6/fs/cifs/file.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/file.c
++++ cifs-2.6/fs/cifs/file.c
+@@ -40,6 +40,7 @@
+ #include "cifs_unicode.h"
+ #include "cifs_debug.h"
+ #include "cifs_fs_sb.h"
++#include "fscache.h"
+ static inline int cifs_convert_flags(unsigned int flags)
+ {
+@@ -282,6 +283,9 @@ int cifs_open(struct inode *inode, struc
+                               CIFSSMBClose(xid, tcon, netfid);
+                               rc = -ENOMEM;
+                       }
++
++                      cifs_fscache_set_inode_cookie(inode, file);
++
+                       goto out;
+               } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
+                       if (tcon->ses->serverNOS)
+@@ -373,6 +377,8 @@ int cifs_open(struct inode *inode, struc
+               goto out;
+       }
++      cifs_fscache_set_inode_cookie(inode, file);
++
+       if (oplock & CIFS_CREATE_ACTION) {
+               /* time to set mode which we can not set earlier due to
+                  problems creating new read-only files */
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.c
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -62,3 +62,71 @@ void cifs_fscache_release_super_cookie(s
+       tcon->fscache = NULL;
+ }
++static void cifs_fscache_enable_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
++
++      if (cifsi->fscache)
++              return;
++
++      cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
++                              &cifs_fscache_inode_object_def,
++                              cifsi);
++      cFYI(1, "CIFS: got FH cookie (0x%p/0x%p/0x%p)\n",
++                      cifs_sb->tcon, cifsi, cifsi->fscache);
++}
++
++void cifs_fscache_release_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++      if (cifsi->fscache) {
++              cFYI(1, "CIFS releasing inode cookie (0x%p/0x%p)\n",
++                              cifsi, cifsi->fscache);
++              fscache_relinquish_cookie(cifsi->fscache, 0);
++              cifsi->fscache = NULL;
++      }
++}
++
++static void cifs_fscache_disable_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++      if (cifsi->fscache) {
++              cFYI(1, "CIFS disabling inode cookie (0x%p/0x%p)\n",
++                              cifsi, cifsi->fscache);
++              fscache_relinquish_cookie(cifsi->fscache, 1);
++              cifsi->fscache = NULL;
++      }
++}
++
++void cifs_fscache_set_inode_cookie(struct inode *inode, struct file *filp)
++{
++      /* BB: parallel opens - need locking? */
++      if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
++              cifs_fscache_disable_inode_cookie(inode);
++      else {
++              cifs_fscache_enable_inode_cookie(inode);
++              cFYI(1, "CIFS: fscache inode cookie set\n");
++      }
++}
++
++void cifs_fscache_reset_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
++      struct fscache_cookie *old = cifsi->fscache;
++
++      if (cifsi->fscache) {
++              /* retire the current fscache cache and get a new one */
++              fscache_relinquish_cookie(cifsi->fscache, 1);
++
++              cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
++                                      &cifs_fscache_inode_object_def,
++                                      cifsi);
++              cFYI(1, "CIFS: new cookie (0x%p/0x%p) oldcookie 0x%p\n",
++                              cifsi, cifsi->fscache, old);
++      }
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -29,6 +29,8 @@
+ extern struct fscache_netfs cifs_fscache_netfs;
+ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_super_index_def;
++extern const struct fscache_cookie_def cifs_fscache_inode_object_def;
++
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -41,6 +43,10 @@ extern void cifs_fscache_release_client_
+ extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *);
+ extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *);
++extern void cifs_fscache_release_inode_cookie(struct inode *);
++extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
++extern void cifs_fscache_reset_inode_cookie(struct inode *);
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -53,6 +59,12 @@ static inline void cifs_fscache_get_supe
+ static inline void
+ cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {}
++static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
++static inline void cifs_fscache_set_inode_cookie(struct inode *inode,
++                      struct file *filp) {}
++static inline void cifs_fscache_reset_inode_cookie(struct inode *inode) {}
++
++
+ #endif /* CONFIG_CIFS_FSCACHE */
+ #endif /* _CIFS_FSCACHE_H */
+Index: cifs-2.6/fs/cifs/inode.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/inode.c
++++ cifs-2.6/fs/cifs/inode.c
+@@ -29,6 +29,7 @@
+ #include "cifsproto.h"
+ #include "cifs_debug.h"
+ #include "cifs_fs_sb.h"
++#include "fscache.h"
+ static void cifs_set_ops(struct inode *inode, const bool is_dfs_referral)
+@@ -776,6 +777,8 @@ retry_iget5_locked:
+                       inode->i_flags |= S_NOATIME | S_NOCMTIME;
+               if (inode->i_state & I_NEW) {
+                       inode->i_ino = hash;
++                      /* initialize per-inode cache cookie pointer */
++                      CIFS_I(inode)->fscache = NULL;
+                       unlock_new_inode(inode);
+               }
+       }
+@@ -1568,6 +1571,7 @@ cifs_invalidate_mapping(struct inode *in
+                       cifs_i->write_behind_rc = rc;
+       }
+       invalidate_remote_inode(inode);
++      cifs_fscache_reset_inode_cookie(inode);
+ }
+ int cifs_revalidate_file(struct file *filp)
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001740:2, b/test/corpora/lkml/cur/1382298587.001740:2,
new file mode 100644 (file)
index 0000000..ef0f657
--- /dev/null
@@ -0,0 +1,214 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Tue, 22 Jun 2010 20:53:26 +0530
+Lines: 177
+Message-ID: <1277220206-3559-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:45:50 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5fZ-0000Vj-Mj
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:45:50 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752511Ab0FVPpJ (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:45:09 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:56189 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752441Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:29 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001766>
+
+Define superblock-level cache index objects (managed by cifsTconInfo structs).
+Each superblock object is created in a server-level index object and in itself
+an index into which inode-level objects are inserted.
+
+Currently, the superblock objects are keyed by sharename.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/cache.c    |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsglob.h |    3 ++
+ fs/cifs/connect.c  |    4 +++
+ fs/cifs/fscache.c  |   17 ++++++++++++++
+ fs/cifs/fscache.h  |    6 +++++
+ 5 files changed, 92 insertions(+)
+
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -76,3 +76,65 @@ const struct fscache_cookie_def cifs_fsc
+       .type = FSCACHE_COOKIE_TYPE_INDEX,
+       .get_key = cifs_server_get_key,
+ };
++
++static char *extract_sharename(const char *treename)
++{
++      const char *src;
++      char *delim, *dst;
++      int len;
++
++      /* skip double chars at the beginning */
++      src = treename + 2;
++
++      /* share name is always preceded by '\\' now */
++      delim = strchr(src, '\\');
++      if (!delim)
++              return ERR_PTR(-EINVAL);
++      delim++;
++      len = strlen(delim);
++
++      /* caller has to free the memory */
++      dst = kstrndup(delim, len, GFP_KERNEL);
++      if (!dst)
++              return ERR_PTR(-ENOMEM);
++
++      return dst;
++}
++
++/*
++ * Superblock object currently keyed by share name
++ */
++static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,
++                                 uint16_t maxbuf)
++{
++      const struct cifsTconInfo *tcon = cookie_netfs_data;
++      char *sharename;
++      uint16_t len;
++
++      sharename = extract_sharename(tcon->treeName);
++      if (IS_ERR(sharename)) {
++              cFYI(1, "CIFS: couldn't extract sharename\n");
++              sharename = NULL;
++              return 0;
++      }
++
++      len = strlen(sharename);
++      if (len > maxbuf)
++              return 0;
++
++      memcpy(buffer, sharename, len);
++
++      kfree(sharename);
++
++      return len;
++}
++
++/*
++ * Superblock object for FS-Cache
++ */
++const struct fscache_cookie_def cifs_fscache_super_index_def = {
++      .name = "CIFS.super",
++      .type = FSCACHE_COOKIE_TYPE_INDEX,
++      .get_key = cifs_super_get_key,
++};
++
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -317,6 +317,9 @@ struct cifsTconInfo {
+       bool local_lease:1; /* check leases (only) on local system not remote */
+       bool broken_posix_open; /* e.g. Samba server versions < 3.3.2, 3.2.9 */
+       bool need_reconnect:1; /* connection reset, tid now invalid */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie *fscache; /* cookie for share */
++#endif
+       /* BB add field for back pointer to sb struct(s)? */
+ };
+Index: cifs-2.6/fs/cifs/connect.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/connect.c
++++ cifs-2.6/fs/cifs/connect.c
+@@ -1773,6 +1773,8 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
+       list_del_init(&tcon->tcon_list);
+       write_unlock(&cifs_tcp_ses_lock);
++      cifs_fscache_release_super_cookie(tcon);
++
+       xid = GetXid();
+       CIFSSMBTDis(xid, tcon);
+       _FreeXid(xid);
+@@ -1843,6 +1845,8 @@ cifs_get_tcon(struct cifsSesInfo *ses, s
+       tcon->nocase = volume_info->nocase;
+       tcon->local_lease = volume_info->local_lease;
++      cifs_fscache_get_super_cookie(tcon);
++
+       write_lock(&cifs_tcp_ses_lock);
+       list_add(&tcon->tcon_list, &ses->tcon_list);
+       write_unlock(&cifs_tcp_ses_lock);
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.c
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -45,3 +45,20 @@ void cifs_fscache_release_client_cookie(
+       server->fscache = NULL;
+ }
++void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
++{
++      tcon->fscache =
++              fscache_acquire_cookie(tcon->ses->server->fscache,
++                              &cifs_fscache_super_index_def, tcon);
++      cFYI(1, "CIFS: get superblock cookie (0x%p/0x%p)\n",
++                              tcon, tcon->fscache);
++}
++
++void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon)
++{
++      cFYI(1, "CIFS: releasing superblock cookie (0x%p/0x%p)\n",
++                      tcon, tcon->fscache);
++      fscache_relinquish_cookie(tcon->fscache, 0);
++      tcon->fscache = NULL;
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -28,6 +28,7 @@
+ extern struct fscache_netfs cifs_fscache_netfs;
+ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
++extern const struct fscache_cookie_def cifs_fscache_super_index_def;
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -37,6 +38,8 @@ extern void cifs_fscache_unregister(void
+  */
+ extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
+ extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
++extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *);
++extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *);
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+@@ -46,6 +49,9 @@ static inline void
+ cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
+ static inline void
+ cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
++static inline void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) {}
++static inline void
++cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001887:2, b/test/corpora/lkml/cur/1382298587.001887:2,
new file mode 100644 (file)
index 0000000..8129048
--- /dev/null
@@ -0,0 +1,85 @@
+From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+Subject: Re: [RFC][PATCH 02/10] cifs: guard cifsglob.h against multiple
+ inclusion
+Date: Tue, 22 Jun 2010 17:37:42 -0400
+Lines: 35
+Message-ID: <20100622173742.448e1e94@corrin.poochiereds.net>
+References: <yes>
+       <1277220170-3442-1-git-send-email-sjayaraman@suse.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 23:36:08 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORB8Z-00027v-R8
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 23:36:08 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751663Ab0FVVfq (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 17:35:46 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:46190 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751933Ab0FVVfo (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Tue, 22 Jun 2010 17:35:44 -0400
+X-Authority-Analysis: v=1.0 c=1 a=Y4kVDsoNLLAA:10 a=yQWWgrYGNuUA:10 a=kj9zAlcOel0A:10 a=hGzw-44bAAAA:8 a=6UT2YofcClCzWf3PPoQA:9 a=Ipo6nwFRv7ENfF13HvmH_iG48b8A:4 a=CjuIK1q_8ugA:10 a=0kPLrQdw3YYA:10 a=dowx1zmaLagA:10
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:49036] helo=mail.poochiereds.net)
+       by cdptpa-oedge01.mail.rr.com (envelope-from <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id 29/22-24471-DAC212C4; Tue, 22 Jun 2010 21:35:42 +0000
+Received: from corrin.poochiereds.net (unknown [65.88.2.5])
+       by mail.poochiereds.net (Postfix) with ESMTPSA id 1C5A1580F4;
+       Tue, 22 Jun 2010 17:35:41 -0400 (EDT)
+In-Reply-To: <1277220170-3442-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001913>
+
+On Tue, 22 Jun 2010 20:52:50 +0530
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Add conditional compile macros to guard the header file against multiple
+> inclusion.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> ---
+>  fs/cifs/cifsglob.h |    5 +++++
+>  1 files changed, 5 insertions(+), 0 deletions(-)
+> 
+> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+> index a88479c..6b2c39d 100644
+> --- a/fs/cifs/cifsglob.h
+> +++ b/fs/cifs/cifsglob.h
+> @@ -16,6 +16,9 @@
+>   *   the GNU Lesser General Public License for more details.
+>   *
+>   */
+> +#ifndef _CIFS_GLOB_H
+> +#define _CIFS_GLOB_H
+> +
+>  #include <linux/in.h>
+>  #include <linux/in6.h>
+>  #include <linux/slab.h>
+> @@ -733,3 +736,5 @@ GLOBAL_EXTERN unsigned int cifs_min_small;  /* min size of small buf pool */
+>  GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/
+>  
+>  extern const struct slow_work_ops cifs_oplock_break_ops;
+> +
+> +#endif      /* _CIFS_GLOB_H */
+
+Strong ACK
+
+Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001892:2, b/test/corpora/lkml/cur/1382298587.001892:2,
new file mode 100644 (file)
index 0000000..82603bf
--- /dev/null
@@ -0,0 +1,254 @@
+From: Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
+Subject: Re: [RFC][PATCH 04/10] cifs: define server-level cache index
+ objects and register them with FS-Cache
+Date: Tue, 22 Jun 2010 17:52:14 -0400
+Lines: 204
+Message-ID: <20100622175214.4c56234f@corrin.poochiereds.net>
+References: <yes>
+       <1277220198-3522-1-git-send-email-sjayaraman@suse.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 23:50:23 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORBMJ-0005WJ-Lj
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 23:50:20 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1750777Ab0FVVuS (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 17:50:18 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:55670 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1750749Ab0FVVuR (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Tue, 22 Jun 2010 17:50:17 -0400
+X-Authority-Analysis: v=1.1 cv=8MuG1bpxLlSbaYWWtODGdBCK7StbFcRsMXhWm1NVx/I= c=1 sm=0 a=wpY4Lvx3kJcA:10 a=UBIxAjGgU1YA:10 a=kj9zAlcOel0A:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=VwQbUJbxAAAA:8 a=qYub2k57AAAA:8 a=uYIlwBZcjrF9BUCsR4kA:9 a=OO1ZLbZb6q4TPdC5pcAA:7 a=jFshslHAf8hJVDYUYRlYN4n-w5YA:4 a=CjuIK1q_8ugA:10 a=x8gzFH9gYPwA:10 a=0kPLrQdw3YYA:10 a=jBoGP612-tUA:10 a=t5DF_bUGhurCx8LQ:21 a=W6P_Gh1y2IibdbqZ:21 a=ld/erqUjW76FpBUqCqkKeA==:117
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:59154] helo=mail.poochiereds.net)
+       by cdptpa-oedge03.mail.rr.com (envelope-from <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id AC/10-00502-710312C4; Tue, 22 Jun 2010 21:50:16 +0000
+Received: from corrin.poochiereds.net (unknown [65.88.2.5])
+       by mail.poochiereds.net (Postfix) with ESMTPSA id 03B11580F4;
+       Tue, 22 Jun 2010 17:50:14 -0400 (EDT)
+In-Reply-To: <1277220198-3522-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001918>
+
+On Tue, 22 Jun 2010 20:53:18 +0530
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define server-level cache index objects (as managed by TCP_ServerInfo structs).
+> Each server object is created in the CIFS top-level index object and is itself
+> an index into which superblock-level objects are inserted.
+> 
+> Currently, the server objects are keyed by hostname.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> ---
+>  fs/cifs/Makefile   |    2 +-
+>  fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
+>  fs/cifs/cifsglob.h |    3 +++
+>  fs/cifs/connect.c  |    4 ++++
+>  fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+>  fs/cifs/fscache.h  |   12 ++++++++++++
+>  6 files changed, 92 insertions(+), 1 deletion(-)
+>  create mode 100644 fs/cifs/fscache.c
+> 
+> Index: cifs-2.6/fs/cifs/Makefile
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/Makefile
+> +++ cifs-2.6/fs/cifs/Makefile
+> @@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
+>  
+>  cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
+>  
+> -cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
+> +cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
+> Index: cifs-2.6/fs/cifs/cache.c
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/cache.c
+> +++ cifs-2.6/fs/cifs/cache.c
+> @@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
+>      fscache_unregister_netfs(&cifs_fscache_netfs);
+>  }
+>  
+> +/*
+> + * Server object currently keyed by hostname
+> + */
+> +static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
+> +                               void *buffer, uint16_t maxbuf)
+> +{
+> +    const struct TCP_Server_Info *server = cookie_netfs_data;
+> +    uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
+> +
+
+Would a tuple of address/family/port be a better choice here? Imagine I
+mount "foo" and then later mount "foor.bar.baz". If they are the same
+address and only the UNC differs, then you won't get the benefit of
+the cache, right?
+
+> +    if (len > maxbuf)
+> +            return 0;
+> +
+> +    memcpy(buffer, server->hostname, len);
+> +
+> +    return len;
+> +}
+> +
+> +/*
+> + * Server object for FS-Cache
+> + */
+> +const struct fscache_cookie_def cifs_fscache_server_index_def = {
+> +    .name = "CIFS.server",
+> +    .type = FSCACHE_COOKIE_TYPE_INDEX,
+> +    .get_key = cifs_server_get_key,
+> +};
+> Index: cifs-2.6/fs/cifs/cifsglob.h
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/cifsglob.h
+> +++ cifs-2.6/fs/cifs/cifsglob.h
+> @@ -193,6 +193,9 @@ struct TCP_Server_Info {
+>      bool    sec_mskerberos;         /* supports legacy MS Kerberos */
+>      bool    sec_kerberosu2u;        /* supports U2U Kerberos */
+>      bool    sec_ntlmssp;            /* supports NTLMSSP */
+> +#ifdef CONFIG_CIFS_FSCACHE
+> +    struct fscache_cookie   *fscache; /* client index cache cookie */
+> +#endif
+>  };
+>  
+>  /*
+> Index: cifs-2.6/fs/cifs/connect.c
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/connect.c
+> +++ cifs-2.6/fs/cifs/connect.c
+> @@ -48,6 +48,7 @@
+>  #include "nterr.h"
+>  #include "rfc1002pdu.h"
+>  #include "cn_cifs.h"
+> +#include "fscache.h"
+>  
+>  #define CIFS_PORT 445
+>  #define RFC1001_PORT 139
+> @@ -1453,6 +1454,8 @@ cifs_put_tcp_session(struct TCP_Server_I
+>              return;
+>      }
+>  
+> +    cifs_fscache_release_client_cookie(server);
+> +
+>      list_del_init(&server->tcp_ses_list);
+>      write_unlock(&cifs_tcp_ses_lock);
+>  
+> @@ -1572,6 +1575,7 @@ cifs_get_tcp_session(struct smb_vol *vol
+>              goto out_err;
+>      }
+>  
+> +    cifs_fscache_get_client_cookie(tcp_ses);
+>      /* thread spawned, put it on the list */
+>      write_lock(&cifs_tcp_ses_lock);
+>      list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
+> Index: cifs-2.6/fs/cifs/fscache.c
+> ===================================================================
+> --- /dev/null
+> +++ cifs-2.6/fs/cifs/fscache.c
+> @@ -0,0 +1,47 @@
+> +/*
+> + *   fs/cifs/fscache.c - CIFS filesystem cache interface
+> + *
+> + *   Copyright (c) 2010 Novell, Inc.
+> + *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> + *
+> + *   This library is free software; you can redistribute it and/or modify
+> + *   it under the terms of the GNU Lesser General Public License as published
+> + *   by the Free Software Foundation; either version 2.1 of the License, or
+> + *   (at your option) any later version.
+> + *
+> + *   This library is distributed in the hope that it will be useful,
+> + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+> + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+> + *   the GNU Lesser General Public License for more details.
+> + *
+> + *   You should have received a copy of the GNU Lesser General Public License
+> + *   along with this library; if not, write to the Free Software
+> + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+> + */
+> +#include <linux/init.h>
+> +#include <linux/kernel.h>
+> +#include <linux/sched.h>
+> +#include <linux/mm.h>
+> +#include <linux/in6.h>
+> +
+> +#include "fscache.h"
+> +#include "cifsglob.h"
+> +#include "cifs_debug.h"
+> +
+> +void cifs_fscache_get_client_cookie(struct TCP_Server_Info *server)
+> +{
+> +    server->fscache =
+> +            fscache_acquire_cookie(cifs_fscache_netfs.primary_index,
+> +                            &cifs_fscache_server_index_def, server);
+> +    cFYI(1, "CIFS: get client cookie (0x%p/0x%p)\n",
+> +                            server, server->fscache);
+> +}
+> +
+> +void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
+> +{
+> +    cFYI(1, "CIFS: release client cookie (0x%p/0x%p)\n",
+> +                            server, server->fscache);
+> +    fscache_relinquish_cookie(server->fscache, 0);
+> +    server->fscache = NULL;
+> +}
+> +
+> Index: cifs-2.6/fs/cifs/fscache.h
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/fscache.h
+> +++ cifs-2.6/fs/cifs/fscache.h
+> @@ -27,14 +27,26 @@
+>  #ifdef CONFIG_CIFS_FSCACHE
+>  
+>  extern struct fscache_netfs cifs_fscache_netfs;
+> +extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+>  
+>  extern int cifs_fscache_register(void);
+>  extern void cifs_fscache_unregister(void);
+>  
+> +/*
+> + * fscache.c
+> + */
+> +extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
+> +extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
+> +
+>  #else /* CONFIG_CIFS_FSCACHE */
+>  static inline int cifs_fscache_register(void) { return 0; }
+>  static inline void cifs_fscache_unregister(void) {}
+>  
+> +static inline void
+> +cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
+> +static inline void
+> +cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
+> +
+>  #endif /* CONFIG_CIFS_FSCACHE */
+>  
+>  #endif /* _CIFS_FSCACHE_H */
+> --
+> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
+> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+> More majordomo info at  http://vger.kernel.org/majordomo-info.html
+> 
+
+
+-- 
+Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298587.001970:2, b/test/corpora/lkml/cur/1382298587.001970:2,
new file mode 100644 (file)
index 0000000..707d0ad
--- /dev/null
@@ -0,0 +1,103 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 04/10] cifs: define server-level cache index objects
+ and register them with FS-Cache
+Date: Wed, 23 Jun 2010 11:04:39 +0530
+Lines: 61
+Message-ID: <4C219CEF.5000003@suse.de>
+References: <yes>      <1277220198-3522-1-git-send-email-sjayaraman@suse.de> <20100622175214.4c56234f@corrin.poochiereds.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 07:34:50 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORIbp-0002v4-3W
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 07:34:49 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1750954Ab0FWFes (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 01:34:48 -0400
+Received: from cantor2.suse.de ([195.135.220.15]:58263 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1750809Ab0FWFes (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 01:34:48 -0400
+Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id 8C18386A2E;
+       Wed, 23 Jun 2010 07:34:46 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <20100622175214.4c56234f-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001998>
+
+On 06/23/2010 03:22 AM, Jeff Layton wrote:
+> On Tue, 22 Jun 2010 20:53:18 +0530
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+>> Define server-level cache index objects (as managed by TCP_ServerInfo structs).
+>> Each server object is created in the CIFS top-level index object and is itself
+>> an index into which superblock-level objects are inserted.
+>>
+>> Currently, the server objects are keyed by hostname.
+>>
+>> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+>> ---
+>>  fs/cifs/Makefile   |    2 +-
+>>  fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
+>>  fs/cifs/cifsglob.h |    3 +++
+>>  fs/cifs/connect.c  |    4 ++++
+>>  fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+>>  fs/cifs/fscache.h  |   12 ++++++++++++
+>>  6 files changed, 92 insertions(+), 1 deletion(-)
+>>  create mode 100644 fs/cifs/fscache.c
+>>
+>> Index: cifs-2.6/fs/cifs/Makefile
+>> ===================================================================
+>> --- cifs-2.6.orig/fs/cifs/Makefile
+>> +++ cifs-2.6/fs/cifs/Makefile
+>> @@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
+>>  
+>>  cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
+>>  
+>> -cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
+>> +cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
+>> Index: cifs-2.6/fs/cifs/cache.c
+>> ===================================================================
+>> --- cifs-2.6.orig/fs/cifs/cache.c
+>> +++ cifs-2.6/fs/cifs/cache.c
+>> @@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
+>>     fscache_unregister_netfs(&cifs_fscache_netfs);
+>>  }
+>>  
+>> +/*
+>> + * Server object currently keyed by hostname
+>> + */
+>> +static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
+>> +                              void *buffer, uint16_t maxbuf)
+>> +{
+>> +   const struct TCP_Server_Info *server = cookie_netfs_data;
+>> +   uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
+>> +
+> 
+> Would a tuple of address/family/port be a better choice here? Imagine I
+> mount "foo" and then later mount "foor.bar.baz". If they are the same
+> address and only the UNC differs, then you won't get the benefit of
+> the cache, right?
+> 
+
+Good point. I'll fix it up when I do a respin.
+
+Thanks,
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002189:2, b/test/corpora/lkml/cur/1382298587.002189:2,
new file mode 100644 (file)
index 0000000..3cfc62e
--- /dev/null
@@ -0,0 +1,66 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 03/10] cifs: register CIFS for caching
+Date: Wed, 23 Jun 2010 17:51:17 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 20
+Message-ID: <9603.1277311877@redhat.com>
+References: <1277220189-3485-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 18:51:32 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTAg-0008Bt-CT
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 18:51:30 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751915Ab0FWQv3 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 12:51:29 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50923 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751520Ab0FWQv3 (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 12:51:29 -0400
+Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGpLFc028550
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 12:51:21 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGpHIG010890;
+       Wed, 23 Jun 2010 12:51:18 -0400
+In-Reply-To: <1277220189-3485-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002219>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> +    rc = cifs_fscache_register();
+> +    if (rc)
+> +            goto out;
+> +
+>      rc = cifs_init_inodecache();
+>      if (rc)
+>              goto out_clean_proc;
+> @@ -949,8 +954,10 @@ init_cifs(void)
+>      cifs_destroy_mids();
+>   out_destroy_inodecache:
+>      cifs_destroy_inodecache();
+> +    cifs_fscache_unregister();
+>   out_clean_proc:
+
+This is incorrect.  You need to call cifs_fscache_unregister() if
+cifs_init_inodecache() fails.
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002193:2, b/test/corpora/lkml/cur/1382298587.002193:2,
new file mode 100644 (file)
index 0000000..e2ea626
--- /dev/null
@@ -0,0 +1,59 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Wed, 23 Jun 2010 17:58:10 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <9720.1277312290@redhat.com>
+References: <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 18:58:19 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTHG-0003Az-Ge
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 18:58:18 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751520Ab0FWQ6R (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 12:58:17 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:62343 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751372Ab0FWQ6R (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 12:58:17 -0400
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGwDC2031683
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 12:58:13 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGwAfq021298;
+       Wed, 23 Jun 2010 12:58:11 -0400
+In-Reply-To: <1277220206-3559-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002223>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define superblock-level cache index objects (managed by cifsTconInfo
+> structs).  Each superblock object is created in a server-level index object
+> and in itself an index into which inode-level objects are inserted.
+> 
+> Currently, the superblock objects are keyed by sharename.
+
+Seems reasonable.  Is there any way you can check that the share you are
+looking at on a server is the same as the last time you looked?  Can you
+validate the root directory of the share in some way?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002194:2, b/test/corpora/lkml/cur/1382298587.002194:2,
new file mode 100644 (file)
index 0000000..d2d1efd
--- /dev/null
@@ -0,0 +1,61 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Wed, 23 Jun 2010 18:02:53 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 15
+Message-ID: <9822.1277312573@redhat.com>
+References: <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:03:04 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTLr-0007Bh-Cs
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:03:03 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752063Ab0FWRDB (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:03:01 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:30823 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRDA (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:03:00 -0400
+Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH2v0J030982
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:02:57 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH2r9N014323;
+       Wed, 23 Jun 2010 13:02:54 -0400
+In-Reply-To: <1277220214-3597-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002224>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define inode-level data storage objects (managed by cifsInodeInfo structs).
+> Each inode-level object is created in a super-block level object and is
+> itself a data storage object in to which pages from the inode are stored.
+> 
+> The inode object is keyed by UniqueId. The coherency data being used is
+> LastWriteTime and the file size.
+
+Isn't there a file creation time too?
+
+I take it you don't support caching on files that are open for writing at this
+time?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002195:2, b/test/corpora/lkml/cur/1382298587.002195:2,
new file mode 100644 (file)
index 0000000..ec54a81
--- /dev/null
@@ -0,0 +1,59 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 07/10] cifs: FS-Cache page management
+Date: Wed, 23 Jun 2010 18:05:01 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <9866.1277312701@redhat.com>
+References: <1277220228-3635-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Wed Jun 23 19:05:19 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1ORTNz-0008Oj-Ho
+       for lnx-linux-fsdevel@lo.gmane.org; Wed, 23 Jun 2010 19:05:15 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752145Ab0FWRFO (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Wed, 23 Jun 2010 13:05:14 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:1689 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRFN (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Wed, 23 Jun 2010 13:05:13 -0400
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH59sl011966
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:05:09 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH52Jl022163;
+       Wed, 23 Jun 2010 13:05:03 -0400
+In-Reply-To: <1277220228-3635-1-git-send-email-sjayaraman@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002225>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Takes care of invalidation and release of FS-Cache marked pages and also
+> invalidation of the FsCache page flag when the inode is removed.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+
+Acked-by: David Howells <dhowells@redhat.com>
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002196:2, b/test/corpora/lkml/cur/1382298587.002196:2,
new file mode 100644 (file)
index 0000000..63838dc
--- /dev/null
@@ -0,0 +1,54 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 08/10] cifs: store pages into local cache
+Date: Wed, 23 Jun 2010 18:06:12 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 8
+Message-ID: <9890.1277312772@redhat.com>
+References: <1277220240-3674-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:06:21 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTP3-0000fp-01
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:06:21 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752403Ab0FWRGU (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:06:20 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:63621 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRGT (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:06:19 -0400
+Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH6FCB012081
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:06:15 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH6CKG013414;
+       Wed, 23 Jun 2010 13:06:13 -0400
+In-Reply-To: <1277220240-3674-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002226>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Store pages from an CIFS inode into the data storage object associated with
+> that inode.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+
+Acked-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002197:2, b/test/corpora/lkml/cur/1382298587.002197:2,
new file mode 100644 (file)
index 0000000..765c399
--- /dev/null
@@ -0,0 +1,53 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 09/10] cifs: read pages from FS-Cache
+Date: Wed, 23 Jun 2010 18:07:40 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 7
+Message-ID: <9918.1277312860@redhat.com>
+References: <1277220261-3717-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:07:51 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTQR-0000nv-JF
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:07:47 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751708Ab0FWRHr (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:07:47 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:34413 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1750954Ab0FWRHq (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:07:46 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH7h3Y005904
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:07:43 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH7efR020683;
+       Wed, 23 Jun 2010 13:07:41 -0400
+In-Reply-To: <1277220261-3717-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002227>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Read pages from a FS-Cache data storage object into a CIFS inode.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+
+Acked-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002201:2, b/test/corpora/lkml/cur/1382298587.002201:2,
new file mode 100644 (file)
index 0000000..bae1eef
--- /dev/null
@@ -0,0 +1,58 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Wed, 23 Jun 2010 18:08:34 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 12
+Message-ID: <9942.1277312914@redhat.com>
+References: <1277220309-3757-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 23 19:09:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1ORTRv-0002J8-2s
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 23 Jun 2010 19:09:19 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753275Ab0FWRIt (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 23 Jun 2010 13:08:49 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:6156 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753203Ab0FWRIr (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 23 Jun 2010 13:08:47 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH8dax006028
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:08:39 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH8YmA020846;
+       Wed, 23 Jun 2010 13:08:36 -0400
+In-Reply-To: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002231>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Add a mount option 'fsc' to enable local caching on CIFS.
+> 
+> As the cifs-utils (userspace) changes are not done yet, this patch enables
+> 'fsc' by default to assist testing.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+
+Acked-by: David Howells <dhowells@redhat.com>
+
+(Give or take the debugging bit)
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002228:2, b/test/corpora/lkml/cur/1382298587.002228:2,
new file mode 100644 (file)
index 0000000..b401ae3
--- /dev/null
@@ -0,0 +1,100 @@
+From: Scott Lovenberg <scott.lovenberg@gmail.com>
+Subject: Re: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Wed, 23 Jun 2010 14:32:24 -0400
+Lines: 37
+Message-ID: <4C225338.9010807@gmail.com>
+References: <yes> <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench@gmail.com>, linux-cifs@vger.kernel.org,
+       linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
+       David Howells <dhowells@redhat.com>
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 23 20:32:44 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1ORUke-00020X-7B
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 23 Jun 2010 20:32:44 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753205Ab0FWScd (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 23 Jun 2010 14:32:33 -0400
+Received: from mail-gx0-f174.google.com ([209.85.161.174]:50118 "EHLO
+       mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752380Ab0FWScb (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 23 Jun 2010 14:32:31 -0400
+Received: by gxk28 with SMTP id 28so317656gxk.19
+        for <multiple recipients>; Wed, 23 Jun 2010 11:32:31 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:received:message-id:date:from
+         :user-agent:mime-version:to:cc:subject:references:in-reply-to
+         :content-type:content-transfer-encoding;
+        bh=iTBSrajJefJVTimpUcvJQmptYefXJDrz9ZyZgxnMvzA=;
+        b=DOZLux9YGwNIWknqofz5rMltvopOT+kRgPsHIYw8Z7Uhh9gR5YAD4V6kKmv1SIaWoo
+         uXjNwY+IPIiD4f4OwwlpwJTd4B7PkBCDIlOkwVcvvS3F6qr6WbXBd0nRuRiFGMwONU3E
+         MqTAWDDwIXLVURr1t+n3MFrKwKj5b7pZT5fHw=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=message-id:date:from:user-agent:mime-version:to:cc:subject
+         :references:in-reply-to:content-type:content-transfer-encoding;
+        b=pTsfPMlTDpE3Oi2w9V3eE2ohOeBEloXhgElmCwGEenBegF7ZhIyoga6tyRJqQ922ws
+         oyxLXSORpOuPJRoIBRXfzae3KXkgKT0eLDjxQNTdS7Jbe+vcJ604sANFcnxBsJ51fThT
+         R/wXt7LiG/T6H4DUpcN7aUjtzlq9JgC2JQ/ws=
+Received: by 10.224.43.197 with SMTP id x5mr5243425qae.127.1277317950764;
+        Wed, 23 Jun 2010 11:32:30 -0700 (PDT)
+Received: from [192.168.0.2] ([64.9.41.61])
+        by mx.google.com with ESMTPS id 15sm3010007qcg.2.2010.06.23.11.32.25
+        (version=TLSv1/SSLv3 cipher=RC4-MD5);
+        Wed, 23 Jun 2010 11:32:26 -0700 (PDT)
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.10) Gecko/20100512 Lightning/1.0b1 Thunderbird/3.0.5 ThunderBrowse/3.2.8.1
+In-Reply-To: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002258>
+
+On 6/22/2010 11:25 AM, Suresh Jayaraman wrote:
+> Add a mount option 'fsc' to enable local caching on CIFS.
+>
+> As the cifs-utils (userspace) changes are not done yet, this patch enables
+> 'fsc' by default to assist testing.
+>    
+[...]
+> @@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const char *devname,
+>                      printk(KERN_WARNING "CIFS: Mount option noac not "
+>                              "supported. Instead set "
+>                              "/proc/fs/cifs/LookupCacheEnabled to 0\n");
+> +            } else if (strnicmp(data, "fsc", 3) == 0) {
+> +                    vol->fsc = true;
+>              } else
+>                      printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
+>                                              data);
+> @@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
+>              cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+>      if (pvolume_info->dynperm)
+>              cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
+> +    if (pvolume_info->fsc)
+> +            cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
+>      if (pvolume_info->direct_io) {
+>              cFYI(1, "mounting share using direct i/o");
+>              cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+>    
+I reworked the CIFS mount option parsing a while back; I'm not sure 
+whether that patch was going to be in the 2.6.35 tree or not (the window 
+just opened, didn't it?).
+
+Jeff, Steve, can you confirm if that patch is going to be in 2.6.35?
+
+Patch refs: http://patchwork.ozlabs.org/patch/53059/  and 
+http://patchwork.ozlabs.org/patch/53674/
+
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002878:2, b/test/corpora/lkml/cur/1382298587.002878:2,
new file mode 100644 (file)
index 0000000..66a3e22
--- /dev/null
@@ -0,0 +1,90 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Fri, 25 Jun 2010 16:18:12 +0530
+Lines: 47
+Message-ID: <4C24896C.4000903@suse.de>
+References: <yes> <1277220309-3757-1-git-send-email-sjayaraman@suse.de> <4C225338.9010807@gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Scott Lovenberg <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 12:48:27 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS6SO-0003QF-NW
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 12:48:25 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753965Ab0FYKsX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 06:48:23 -0400
+Received: from cantor.suse.de ([195.135.220.2]:46395 "EHLO mx1.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752612Ab0FYKsW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 06:48:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by mx1.suse.de (Postfix) with ESMTP id 60CED6CB00;
+       Fri, 25 Jun 2010 12:48:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <4C225338.9010807-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002912>
+
+On 06/24/2010 12:02 AM, Scott Lovenberg wrote:
+> On 6/22/2010 11:25 AM, Suresh Jayaraman wrote:
+>> Add a mount option 'fsc' to enable local caching on CIFS.
+>>
+>> As the cifs-utils (userspace) changes are not done yet, this patch
+>> enables
+>> 'fsc' by default to assist testing.
+>>    
+> [...]
+>> @@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const
+>> char *devname,
+>>               printk(KERN_WARNING "CIFS: Mount option noac not "
+>>                   "supported. Instead set "
+>>                   "/proc/fs/cifs/LookupCacheEnabled to 0\n");
+>> +        } else if (strnicmp(data, "fsc", 3) == 0) {
+>> +            vol->fsc = true;
+>>           } else
+>>               printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
+>>                           data);
+>> @@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol
+>> *pvolume_info,
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+>>       if (pvolume_info->dynperm)
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
+>> +    if (pvolume_info->fsc)
+>> +        cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
+>>       if (pvolume_info->direct_io) {
+>>           cFYI(1, "mounting share using direct i/o");
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+>>    
+> I reworked the CIFS mount option parsing a while back; I'm not sure
+> whether that patch was going to be in the 2.6.35 tree or not (the window
+> just opened, didn't it?).
+
+Not a problem, I could redo this patch alone when the reworked option
+parsing patches get in.
+
+> Jeff, Steve, can you confirm if that patch is going to be in 2.6.35?
+> 
+> Patch refs: http://patchwork.ozlabs.org/patch/53059/  and
+> http://patchwork.ozlabs.org/patch/53674/
+> 
+
+Thanks,
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002912:2, b/test/corpora/lkml/cur/1382298587.002912:2,
new file mode 100644 (file)
index 0000000..d9c761d
--- /dev/null
@@ -0,0 +1,65 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Fri, 25 Jun 2010 18:20:14 +0530
+Lines: 24
+Message-ID: <4C24A606.5040001@suse.de>
+References: <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 14:50:26 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8MR-0007EU-OS
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 14:50:24 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754607Ab0FYMuX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 08:50:23 -0400
+Received: from cantor2.suse.de ([195.135.220.15]:38716 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753675Ab0FYMuW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 08:50:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id B05E686A2E;
+       Fri, 25 Jun 2010 14:50:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <9822.1277312573-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002946>
+
+On 06/23/2010 10:32 PM, David Howells wrote:
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+>> Define inode-level data storage objects (managed by cifsInodeInfo structs).
+>> Each inode-level object is created in a super-block level object and is
+>> itself a data storage object in to which pages from the inode are stored.
+>>
+>> The inode object is keyed by UniqueId. The coherency data being used is
+>> LastWriteTime and the file size.
+> 
+> Isn't there a file creation time too?
+
+I think the creation time is currently being ignored as we won't be able
+to accomodate in POSIX stat struct.
+
+> I take it you don't support caching on files that are open for writing at this
+> time?
+> 
+
+Yes.
+
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002915:2, b/test/corpora/lkml/cur/1382298587.002915:2,
new file mode 100644 (file)
index 0000000..e43c909
--- /dev/null
@@ -0,0 +1,58 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Fri, 25 Jun 2010 13:55:49 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 12
+Message-ID: <22697.1277470549@redhat.com>
+References: <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 14:56:04 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8Rw-0002tq-3k
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 14:56:04 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753622Ab0FYM4B (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 08:56:01 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50162 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752535Ab0FYM4B (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 08:56:01 -0400
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCtqOd018091
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 08:55:52 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCtn4G016466;
+       Fri, 25 Jun 2010 08:55:51 -0400
+In-Reply-To: <4C24A606.5040001-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002949>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> I think the creation time is currently being ignored as we won't be able
+> to accomodate in POSIX stat struct.
+
+The FS-Cache interface doesn't use the POSIX stat struct, but it could be
+really useful to save it and use it for cache coherency inside the kernel.
+
+Out of interest, what does Samba do when it comes to generating a creation time
+for UNIX where one does not exist?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002917:2, b/test/corpora/lkml/cur/1382298587.002917:2,
new file mode 100644 (file)
index 0000000..f7047f8
--- /dev/null
@@ -0,0 +1,67 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Fri, 25 Jun 2010 13:58:33 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 21
+Message-ID: <22746.1277470713@redhat.com>
+References: <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Fri Jun 25 15:02:20 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with smtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OS8Xz-000628-FG
+       for lnx-linux-fsdevel@lo.gmane.org; Fri, 25 Jun 2010 15:02:19 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755357Ab0FYM6k (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Fri, 25 Jun 2010 08:58:40 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50417 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754086Ab0FYM6j (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Fri, 25 Jun 2010 08:58:39 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCwa7Z005113
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 08:58:36 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCwXVB011094;
+       Fri, 25 Jun 2010 08:58:34 -0400
+In-Reply-To: <4C24A4A0.90408@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002951>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Also, considering the UNC name of the resource (//server/share) may not
+> be a good idea too as the cache will not be used when for e.g. IPaddress
+> is used to mount.
+
+You could convert the UNC name to an IP address, and just use that as your
+key.
+
+> > validate the root directory of the share in some way?
+>
+> I don't know if there is a way to do this.
+
+Is there an inode number or something?  Even the creation time might do.
+
+David
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.002997:2, b/test/corpora/lkml/cur/1382298587.002997:2,
new file mode 100644 (file)
index 0000000..b78073c
--- /dev/null
@@ -0,0 +1,90 @@
+From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Fri, 25 Jun 2010 12:53:06 -0400
+Lines: 36
+Message-ID: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+References: <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+       <yes>
+       <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>,
+       Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 18:53:12 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSC9P-0005Eb-SU
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 18:53:12 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S932199Ab0FYQxK (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 12:53:10 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.122]:53512 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S932187Ab0FYQxJ (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Fri, 25 Jun 2010 12:53:09 -0400
+X-Authority-Analysis: v=1.0 c=1 a=iVNVO0OCT3kA:10 a=yQWWgrYGNuUA:10 a=kj9zAlcOel0A:10 a=20KFwNOVAAAA:8 a=hGzw-44bAAAA:8 a=f0L6POiToRdS6aViIA4A:9 a=tdNtT7bw1iHNm6ggrCkIte35EhAA:4 a=CjuIK1q_8ugA:10 a=jEp0ucaQiEUA:10 a=0kPLrQdw3YYA:10 a=dowx1zmaLagA:10 a=00U40p1LBqVLw4jT:21 a=gh7LVOPznGai4vo_:21
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:42266] helo=mail.poochiereds.net)
+       by cdptpa-oedge01.mail.rr.com (envelope-from <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id 2D/E0-24471-3FED42C4; Fri, 25 Jun 2010 16:53:08 +0000
+Received: from tlielax.poochiereds.net (tlielax.poochiereds.net [192.168.1.3])
+       by mail.poochiereds.net (Postfix) with ESMTPS id E9B19580FA;
+       Fri, 25 Jun 2010 12:53:06 -0400 (EDT)
+In-Reply-To: <22697.1277470549-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003033>
+
+On Fri, 25 Jun 2010 13:55:49 +0100
+David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
+
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+> > I think the creation time is currently being ignored as we won't be able
+> > to accomodate in POSIX stat struct.
+> 
+> The FS-Cache interface doesn't use the POSIX stat struct, but it could be
+> really useful to save it and use it for cache coherency inside the kernel.
+> 
+> Out of interest, what does Samba do when it comes to generating a creation time
+> for UNIX where one does not exist?
+> 
+
+(cc'ing samba-technical since we're talking about the create time)
+
+Looks like it mostly uses the ctime. IMO, the mtime would be a better
+choice since it changes less frequently, but I don't guess that it
+matters very much.
+
+I have a few patches that make the cifs_iget code do more stringent
+checks. One of those makes it use the create time like an i_generation
+field to guard against matching inodes that have the same number but
+that have undergone a delete/create cycle. They need a bit more testing
+but I'm planning to post them in time for 2.6.36.
+
+Because of how samba generates this number, it could be somewhat
+problematic to do this. What may save us though is that Linux<->Samba
+mostly uses unix extensions unless someone has specifically disabled
+them on either end. The unix extension calls don't generally send any
+sort of create time field, so we can't rely on it in those codepaths
+anyway.
+
+-- 
+Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003106:2, b/test/corpora/lkml/cur/1382298587.003106:2,
new file mode 100644 (file)
index 0000000..19ea381
--- /dev/null
@@ -0,0 +1,60 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Fri, 25 Jun 2010 22:46:38 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <18628.1277502398@redhat.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com>
+Cc: dhowells@redhat.com, Suresh Jayaraman <sjayaraman@suse.de>,
+       Steve French <smfrench@gmail.com>, linux-cifs@vger.kernel.org,
+       linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
+       samba-technical@lists.samba.org
+To: Jeff Layton <jlayton@samba.org>
+X-From: linux-kernel-owner@vger.kernel.org Fri Jun 25 23:47:07 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSGjo-0006q8-ME
+       for glk-linux-kernel-3@lo.gmane.org; Fri, 25 Jun 2010 23:47:05 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932250Ab0FYVqv (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Fri, 25 Jun 2010 17:46:51 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:55406 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932088Ab0FYVqs (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Fri, 25 Jun 2010 17:46:48 -0400
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PLkhIG005974
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 17:46:43 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PLkd77017768;
+       Fri, 25 Jun 2010 17:46:40 -0400
+In-Reply-To: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003142>
+
+Jeff Layton <jlayton@samba.org> wrote:
+
+> Looks like it mostly uses the ctime. IMO, the mtime would be a better
+> choice since it changes less frequently, but I don't guess that it
+> matters very much.
+
+I'd've thought mtime changes more frequently since that's altered when data is
+written.  ctime is changed when attributes are changed.
+
+Note that Ext4 appears to have a file creation time field in its inode
+(struct ext4_inode::i_crtime[_extra]).  Can Samba be made to use that?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003112:2, b/test/corpora/lkml/cur/1382298587.003112:2,
new file mode 100644 (file)
index 0000000..e74a864
--- /dev/null
@@ -0,0 +1,105 @@
+From: Jeff Layton <jlayton@samba.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+       register them
+Date: Fri, 25 Jun 2010 18:26:51 -0400
+Lines: 30
+Message-ID: <20100625182651.36800d06@tlielax.poochiereds.net>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+       <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes>
+       <9822.1277312573@redhat.com> <22697.1277470549@redhat.com>
+       <18628.1277502398@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
+       linux-kernel@vger.kernel.org, Steve French <smfrench@gmail.com>,
+       linux-fsdevel@vger.kernel.org
+To: David Howells <dhowells@redhat.com>
+X-From: samba-technical-bounces@lists.samba.org Sat Jun 26 00:27:01 2010
+Return-path: <samba-technical-bounces@lists.samba.org>
+Envelope-to: gnsi-samba-technical@m.gmane.org
+Received: from fn.samba.org ([216.83.154.106] helo=lists.samba.org)
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <samba-technical-bounces@lists.samba.org>)
+       id 1OSHMS-0003Yl-G8
+       for gnsi-samba-technical@m.gmane.org; Sat, 26 Jun 2010 00:27:01 +0200
+Received: from fn.samba.org (localhost [127.0.0.1])
+       by lists.samba.org (Postfix) with ESMTP id 8919DAD2B8;
+       Fri, 25 Jun 2010 16:26:57 -0600 (MDT)
+X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.7 required=3.8 tests=AWL,BAYES_00,SPF_NEUTRAL
+       autolearn=no version=3.2.5
+X-Original-To: samba-technical@lists.samba.org
+Delivered-To: samba-technical@lists.samba.org
+Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com
+       [75.180.132.122])
+       by lists.samba.org (Postfix) with ESMTP id ECB66AD220
+       for <samba-technical@lists.samba.org>;
+       Fri, 25 Jun 2010 16:26:51 -0600 (MDT)
+X-Authority-Analysis: v=1.0 c=1 a=iVNVO0OCT3kA:10 a=yQWWgrYGNuUA:10
+       a=kj9zAlcOel0A:10 a=20KFwNOVAAAA:8 a=hGzw-44bAAAA:8
+       a=AraS79FXNJ3kHilSTm4A:9 a=3STw0N-n4mJG0pydffwA:7
+       a=0uwppTlTaQ5HiYOalIavAxwTlvEA:4 a=CjuIK1q_8ugA:10
+       a=jEp0ucaQiEUA:10 a=dowx1zmaLagA:10
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:55553] helo=mail.poochiereds.net)
+       by cdptpa-oedge01.mail.rr.com (envelope-from <jlayton@samba.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id 78/FA-24471-C2D252C4; Fri, 25 Jun 2010 22:26:53 +0000
+Received: from tlielax.poochiereds.net (tlielax.poochiereds.net [192.168.1.3])
+       by mail.poochiereds.net (Postfix) with ESMTPS id 68F07580FA;
+       Fri, 25 Jun 2010 18:26:52 -0400 (EDT)
+In-Reply-To: <18628.1277502398@redhat.com>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+X-BeenThere: samba-technical@lists.samba.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Discussions on Samba internals. For general questions please
+       subscribe to the list samba@samba.org"
+       <samba-technical.lists.samba.org>
+List-Unsubscribe: <https://lists.samba.org/mailman/options/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=unsubscribe>
+List-Archive: <http://lists.samba.org/pipermail/samba-technical>
+List-Post: <mailto:samba-technical@lists.samba.org>
+List-Help: <mailto:samba-technical-request@lists.samba.org?subject=help>
+List-Subscribe: <https://lists.samba.org/mailman/listinfo/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=subscribe>
+Sender: samba-technical-bounces@lists.samba.org
+Errors-To: samba-technical-bounces@lists.samba.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003148>
+
+On Fri, 25 Jun 2010 22:46:38 +0100
+David Howells <dhowells@redhat.com> wrote:
+
+> Jeff Layton <jlayton@samba.org> wrote:
+> 
+> > Looks like it mostly uses the ctime. IMO, the mtime would be a better
+> > choice since it changes less frequently, but I don't guess that it
+> > matters very much.
+> 
+> I'd've thought mtime changes more frequently since that's altered when data is
+> written.  ctime is changed when attributes are changed.
+> 
+
+IIUC, updating mtime for a write is also an attribute change, and that
+affects ctime. According to the stat(2) manpage:
+
+       The field st_ctime is changed by writing or by setting  inode  informa-
+       tion (i.e., owner, group, link count, mode, etc.).
+
+> Note that Ext4 appears to have a file creation time field in its inode
+> (struct ext4_inode::i_crtime[_extra]).  Can Samba be made to use that?
+> 
+
+Is it exposed to userspace in any (standard) way? It would be handy to
+have that. While we're wishing...it might also be nice to have a
+standard way to get at the i_generation from userspace too.
+
+-- 
+Jeff Layton <jlayton@samba.org>
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003117:2, b/test/corpora/lkml/cur/1382298587.003117:2,
new file mode 100644 (file)
index 0000000..7f53e34
--- /dev/null
@@ -0,0 +1,65 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Sat, 26 Jun 2010 00:04:28 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 18
+Message-ID: <20123.1277507068@redhat.com>
+References: <20100625182651.36800d06@tlielax.poochiereds.net> <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com> <18628.1277502398@redhat.com>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>,
+       Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
+To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Sat Jun 26 01:04:45 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSHww-0006Jk-NV
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Sat, 26 Jun 2010 01:04:43 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751807Ab0FYXEl (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 19:04:41 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:62977 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752149Ab0FYXEl (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 19:04:41 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PN4X40004498
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 19:04:34 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PN4Sld008220;
+       Fri, 25 Jun 2010 19:04:30 -0400
+In-Reply-To: <20100625182651.36800d06-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003153>
+
+Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
+
+> IIUC, updating mtime for a write is also an attribute change, and that
+> affects ctime. According to the stat(2) manpage:
+
+You're right.  Okay, ctime is the more frequently changed.
+
+> > Note that Ext4 appears to have a file creation time field in its inode
+> > (struct ext4_inode::i_crtime[_extra]).  Can Samba be made to use that?
+> 
+> Is it exposed to userspace in any (standard) way? It would be handy to
+> have that. While we're wishing...it might also be nice to have a
+> standard way to get at the i_generation from userspace too.
+
+Not at present, but it's something that could be exported by ioctl() or
+getxattr().
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003118:2, b/test/corpora/lkml/cur/1382298587.003118:2,
new file mode 100644 (file)
index 0000000..a1ec438
--- /dev/null
@@ -0,0 +1,122 @@
+From: Steve French <smfrench@gmail.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and 
+       register them
+Date: Fri, 25 Jun 2010 18:05:30 -0500
+Lines: 51
+Message-ID: <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+       <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+       <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>
+       <18628.1277502398@redhat.com>
+       <20100625182651.36800d06@tlielax.poochiereds.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: David Howells <dhowells@redhat.com>,
+       Suresh Jayaraman <sjayaraman@suse.de>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, samba-technical@lists.samba.org,
+       Jeff Layton <jlayton@redhat.com>
+To: Jeff Layton <jlayton@samba.org>,
+       "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
+       Mingming Cao <mcao@us.ibm.com>
+X-From: linux-kernel-owner@vger.kernel.org Sat Jun 26 01:05:41 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSHxs-0006a8-BA
+       for glk-linux-kernel-3@lo.gmane.org; Sat, 26 Jun 2010 01:05:40 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756188Ab0FYXFd convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Fri, 25 Jun 2010 19:05:33 -0400
+Received: from mail-qw0-f46.google.com ([209.85.216.46]:51369 "EHLO
+       mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751575Ab0FYXFb convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Fri, 25 Jun 2010 19:05:31 -0400
+Received: by qwi4 with SMTP id 4so742644qwi.19
+        for <multiple recipients>; Fri, 25 Jun 2010 16:05:30 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:mime-version:received:received:in-reply-to
+         :references:date:message-id:subject:from:to:cc:content-type
+         :content-transfer-encoding;
+        bh=6wKQkGOEeUGN4oPR3Nm4SRxtJr/EBwN8ENmpLnfdCDU=;
+        b=X7L6W0MtpQeW/4iBuj+oDlcP2yCJ3qwUs9lHBq1fRW6WdYblHXjmaN8o++3GDPLAg5
+         0MD07zxbYTGXRSrgCjCrGVm0tT88/6hY2a/rB8g68h/Qso2sIHa7B1iIN8JRR4pPWle0
+         sVjp9Xy/bQn2e0uE481Ii1TLHuWYA/QDXZreU=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
+         :cc:content-type:content-transfer-encoding;
+        b=B+7qQvdOpN5a/KCRrDbssKZX8D3SnP73VMHd9RpkqP9nCHCmSLAgbeH03+/m6CLVAo
+         G+NKWqWtknwPBkYqT/bdP2XEak1yr+0rjOqjUaNvaT7AhzsyHEJBkaNnsbS3qaRy39OP
+         S7OkAyHfmgdeNAHkKnKRF73hfpvgAqR9X4bn8=
+Received: by 10.224.59.223 with SMTP id m31mr1130670qah.63.1277507130411; Fri, 
+       25 Jun 2010 16:05:30 -0700 (PDT)
+Received: by 10.229.46.136 with HTTP; Fri, 25 Jun 2010 16:05:30 -0700 (PDT)
+In-Reply-To: <20100625182651.36800d06@tlielax.poochiereds.net>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003154>
+
+On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wrote:
+>
+> On Fri, 25 Jun 2010 22:46:38 +0100
+> David Howells <dhowells@redhat.com> wrote:
+>
+> > Jeff Layton <jlayton@samba.org> wrote:
+> >
+> > > Looks like it mostly uses the ctime. IMO, the mtime would be a be=
+tter
+> > > choice since it changes less frequently, but I don't guess that i=
+t
+> > > matters very much.
+> >
+> > I'd've thought mtime changes more frequently since that's altered w=
+hen data is
+> > written. =A0ctime is changed when attributes are changed.
+> >
+>
+> IIUC, updating mtime for a write is also an attribute change, and tha=
+t
+> affects ctime. According to the stat(2) manpage:
+>
+> =A0 =A0 =A0 The field st_ctime is changed by writing or by setting =A0=
+inode =A0informa-
+> =A0 =A0 =A0 tion (i.e., owner, group, link count, mode, etc.).
+>
+> > Note that Ext4 appears to have a file creation time field in its in=
+ode
+> > (struct ext4_inode::i_crtime[_extra]). =A0Can Samba be made to use =
+that?
+> >
+>
+> Is it exposed to userspace in any (standard) way? It would be handy t=
+o
+> have that. While we're wishing...it might also be nice to have a
+> standard way to get at the i_generation from userspace too.
+>
+
+Yes - I have talked with MingMing and Aneesh about those (NFS may
+someday be able to use those too).=A0 An obstacle in the past had been
+that samba server stores its own fake creation time in an ndr encoded
+xattr which complicates things.
+
+MingMing/Annesh -
+Xattr or other way to get at birth time?
+
+
+--
+Thanks,
+
+Steve
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003171:2, b/test/corpora/lkml/cur/1382298587.003171:2,
new file mode 100644 (file)
index 0000000..66e425e
--- /dev/null
@@ -0,0 +1,174 @@
+From: Mingming Cao <mcao@us.ibm.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+       register them
+Date: Fri, 25 Jun 2010 17:52:24 -0700
+Lines: 92
+Message-ID: <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>  <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>   <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>   <18628.1277502398@redhat.com>   <20100625182651.36800d06@tlielax.poochiereds.net>
+       <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: quoted-printable
+Cc: linux-cifs@vger.kernel.org, Jeff Layton <jlayton@redhat.com>,
+       samba-technical@lists.samba.org, linux-kernel@vger.kernel.org,
+       David Howells <dhowells@redhat.com>, linux-fsdevel@vger.kernel.org,
+       "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
+To: Steve French <smfrench@gmail.com>
+X-From: samba-technical-bounces@lists.samba.org Sat Jun 26 13:36:56 2010
+Return-path: <samba-technical-bounces@lists.samba.org>
+Envelope-to: gnsi-samba-technical@m.gmane.org
+Received: from fn.samba.org ([216.83.154.106] helo=lists.samba.org)
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <samba-technical-bounces@lists.samba.org>)
+       id 1OSTgu-00025d-6P
+       for gnsi-samba-technical@m.gmane.org; Sat, 26 Jun 2010 13:36:56 +0200
+Received: from fn.samba.org (localhost [127.0.0.1])
+       by lists.samba.org (Postfix) with ESMTP id 1ED11AD2C4;
+       Sat, 26 Jun 2010 05:36:45 -0600 (MDT)
+X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-6.6 required=3.8 tests=BAYES_00,HTML_MESSAGE,
+       RCVD_IN_DNSWL_MED,SPF_PASS autolearn=ham version=3.2.5
+X-Original-To: samba-technical@lists.samba.org
+Delivered-To: samba-technical@lists.samba.org
+Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152])
+       by lists.samba.org (Postfix) with ESMTP id 30F90AD282
+       for <samba-technical@lists.samba.org>;
+       Fri, 25 Jun 2010 18:52:24 -0600 (MDT)
+Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com
+       [9.17.195.226])
+       by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5Q0iN1h017083
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:44:23 -0600
+Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167])
+       by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id
+       o5Q0qQTN175324
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:52:26 -0600
+Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1])
+       by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP
+       id o5Q0qPCF006767
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:52:26 -0600
+Received: from d03nm128.boulder.ibm.com (d03nm128.boulder.ibm.com
+       [9.17.195.32])
+       by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id
+       o5Q0qPrh006760; Fri, 25 Jun 2010 18:52:25 -0600
+In-Reply-To: <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+X-KeepSent: B55E8EC7:E8DD23D5-8725774E:0004921E;
+ type=4; name=$KeepSent
+X-Mailer: Lotus Notes Build V852_M2_03302010 March 30, 2010
+X-MIMETrack: Serialize by Router on D03NM128/03/M/IBM(Release 8.0.1|February
+       07, 2008) at 06/25/2010 18:52:25
+X-Mailman-Approved-At: Sat, 26 Jun 2010 05:36:42 -0600
+X-Content-Filtered-By: Mailman/MimeDel 2.1.12
+X-BeenThere: samba-technical@lists.samba.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Discussions on Samba internals. For general questions please
+       subscribe to the list samba@samba.org"
+       <samba-technical.lists.samba.org>
+List-Unsubscribe: <https://lists.samba.org/mailman/options/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=unsubscribe>
+List-Archive: <http://lists.samba.org/pipermail/samba-technical>
+List-Post: <mailto:samba-technical@lists.samba.org>
+List-Help: <mailto:samba-technical-request@lists.samba.org?subject=help>
+List-Subscribe: <https://lists.samba.org/mailman/listinfo/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=subscribe>
+Sender: samba-technical-bounces@lists.samba.org
+Errors-To: samba-technical-bounces@lists.samba.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003208>
+
+
+
+Steve French <smfrench@gmail.com> wrote on 06/25/2010 04:05:30 PM:
+
+> Steve French <smfrench@gmail.com>
+> 06/25/2010 04:05 PM
+>
+> To
+>
+> Jeff Layton <jlayton@samba.org>, "Aneesh Kumar K.V"
+> <aneesh.kumar@linux.vnet.ibm.com>, Mingming Cao/Beaverton/IBM@IBMUS
+>
+> cc
+>
+> David Howells <dhowells@redhat.com>, Suresh Jayaraman
+> <sjayaraman@suse.de>, linux-cifs@vger.kernel.org, linux-
+> fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba-
+> technical@lists.samba.org, Jeff Layton <jlayton@redhat.com>
+>
+> Subject
+>
+> Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+> register them
+>
+> On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wrot=
+e:
+> >
+> > On Fri, 25 Jun 2010 22:46:38 +0100
+> > David Howells <dhowells@redhat.com> wrote:
+> >
+> > > Jeff Layton <jlayton@samba.org> wrote:
+> > >
+> > > > Looks like it mostly uses the ctime. IMO, the mtime would be a
+better
+> > > > choice since it changes less frequently, but I don't guess that=
+ it
+> > > > matters very much.
+> > >
+> > > I'd've thought mtime changes more frequently since that's
+> altered when data is
+> > > written. =A0ctime is changed when attributes are changed.
+> > >
+> >
+> > IIUC, updating mtime for a write is also an attribute change, and t=
+hat
+> > affects ctime. According to the stat(2) manpage:
+> >
+> > =A0 =A0 =A0 The field st_ctime is changed by writing or by setting
+> =A0inode =A0informa-
+> > =A0 =A0 =A0 tion (i.e., owner, group, link count, mode, etc.).
+> >
+> > > Note that Ext4 appears to have a file creation time field in its
+inode
+> > > (struct ext4_inode::i_crtime[_extra]). =A0Can Samba be made to us=
+e
+that?
+> > >
+> >
+> > Is it exposed to userspace in any (standard) way? It would be handy=
+ to
+> > have that. While we're wishing...it might also be nice to have a
+> > standard way to get at the i_generation from userspace too.
+> >
+>
+> Yes - I have talked with MingMing and Aneesh about those (NFS may
+> someday be able to use those too).=A0 An obstacle in the past had bee=
+n
+> that samba server stores its own fake creation time in an ndr encoded=
+
+> xattr which complicates things.
+>
+> MingMing/Annesh -
+> Xattr or other way to get at birth time?
+>
+>
+
+Not yet,
+ The ext4 file creation time only accesable from the kernel at the mome=
+nt.
+There were discussion
+to make this information avaliable via xattr before, but was rejected,
+since most people
+agree that making this info avalibele via stat() is more standard. Howe=
+ver
+modifying stat() would imply
+big interface change. thus no action has been taken yet.
+
+> --
+> Thanks,
+>
+> Steve=
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003317:2, b/test/corpora/lkml/cur/1382298587.003317:2,
new file mode 100644 (file)
index 0000000..6fce518
--- /dev/null
@@ -0,0 +1,156 @@
+From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Sun, 27 Jun 2010 23:47:21 +0530
+Lines: 100
+Message-ID: <871vbscpce.fsf@linux.vnet.ibm.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com> <18628.1277502398@redhat.com> <20100625182651.36800d06@tlielax.poochiereds.net> <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com> <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: David Howells <dhowells@redhat.com>,
+       Jeff Layton <jlayton@redhat.com>,
+       Jeff Layton <jlayton@samba.org>, linux-cifs@vger.kernel.org,
+       linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
+       samba-technical@lists.samba.org,
+       Suresh Jayaraman <sjayaraman@suse.de>
+To: Mingming Cao <mcao@us.ibm.com>, Steve French <smfrench@gmail.com>,
+       "DENIEL Philippe" <philippe.deniel@cea.fr>
+X-From: linux-kernel-owner@vger.kernel.org Sun Jun 27 20:18:00 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSwQZ-0003Kh-Vu
+       for glk-linux-kernel-3@lo.gmane.org; Sun, 27 Jun 2010 20:18:00 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754631Ab0F0SRq convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 27 Jun 2010 14:17:46 -0400
+Received: from e23smtp07.au.ibm.com ([202.81.31.140]:52430 "EHLO
+       e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753837Ab0F0SRl convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 27 Jun 2010 14:17:41 -0400
+Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247])
+       by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id o5RIHbfJ012483;
+       Mon, 28 Jun 2010 04:17:37 +1000
+Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97])
+       by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5RIHW9f1130634;
+       Mon, 28 Jun 2010 04:17:32 +1000
+Received: from d23av03.au.ibm.com (loopback [127.0.0.1])
+       by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5RIHVcR027534;
+       Mon, 28 Jun 2010 04:17:32 +1000
+Received: from skywalker.linux.vnet.ibm.com ([9.77.196.78])
+       by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5RIHMFl027485;
+       Mon, 28 Jun 2010 04:17:24 +1000
+In-Reply-To: <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+User-Agent: Notmuch/ (http://notmuchmail.org) Emacs/24.0.50.1 (i686-pc-linux-gnu)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003357>
+
+On Fri, 25 Jun 2010 17:52:24 -0700, Mingming Cao <mcao@us.ibm.com> wrot=
+e:
+>=20
+>=20
+> Steve French <smfrench@gmail.com> wrote on 06/25/2010 04:05:30 PM:
+>=20
+> > Steve French <smfrench@gmail.com>
+> > 06/25/2010 04:05 PM
+> >
+> > To
+> >
+> > Jeff Layton <jlayton@samba.org>, "Aneesh Kumar K.V"
+> > <aneesh.kumar@linux.vnet.ibm.com>, Mingming Cao/Beaverton/IBM@IBMUS
+> >
+> > cc
+> >
+> > David Howells <dhowells@redhat.com>, Suresh Jayaraman
+> > <sjayaraman@suse.de>, linux-cifs@vger.kernel.org, linux-
+> > fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba-
+> > technical@lists.samba.org, Jeff Layton <jlayton@redhat.com>
+> >
+> > Subject
+> >
+> > Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+> > register them
+> >
+> > On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wr=
+ote:
+> > >
+> > > On Fri, 25 Jun 2010 22:46:38 +0100
+> > > David Howells <dhowells@redhat.com> wrote:
+> > >
+> > > > Jeff Layton <jlayton@samba.org> wrote:
+> > > >
+> > > > > Looks like it mostly uses the ctime. IMO, the mtime would be =
+a
+> better
+> > > > > choice since it changes less frequently, but I don't guess th=
+at it
+> > > > > matters very much.
+> > > >
+> > > > I'd've thought mtime changes more frequently since that's
+> > altered when data is
+> > > > written. =C2=A0ctime is changed when attributes are changed.
+> > > >
+> > >
+> > > IIUC, updating mtime for a write is also an attribute change, and=
+ that
+> > > affects ctime. According to the stat(2) manpage:
+> > >
+> > > =C2=A0 =C2=A0 =C2=A0 The field st_ctime is changed by writing or =
+by setting
+> > =C2=A0inode =C2=A0informa-
+> > > =C2=A0 =C2=A0 =C2=A0 tion (i.e., owner, group, link count, mode, =
+etc.).
+> > >
+> > > > Note that Ext4 appears to have a file creation time field in it=
+s
+> inode
+> > > > (struct ext4_inode::i_crtime[_extra]). =C2=A0Can Samba be made =
+to use
+> that?
+> > > >
+> > >
+> > > Is it exposed to userspace in any (standard) way? It would be han=
+dy to
+> > > have that. While we're wishing...it might also be nice to have a
+> > > standard way to get at the i_generation from userspace too.
+> > >
+> >
+> > Yes - I have talked with MingMing and Aneesh about those (NFS may
+> > someday be able to use those too).=C2=A0 An obstacle in the past ha=
+d been
+> > that samba server stores its own fake creation time in an ndr encod=
+ed
+> > xattr which complicates things.
+> >
+> > MingMing/Annesh -
+> > Xattr or other way to get at birth time?
+> >
+> >
+>=20
+> Not yet,
+>  The ext4 file creation time only accesable from the kernel at the mo=
+ment.
+> There were discussion
+> to make this information avaliable via xattr before, but was rejected=
+,
+> since most people
+> agree that making this info avalibele via stat() is more standard. Ho=
+wever
+> modifying stat() would imply
+> big interface change. thus no action has been taken yet.
+
+NFS ganesha pNFS also had a requirement for getting i_generation and
+inode number in userspace. So may be we should now look at updating
+stat or add a variant syscall that include i_generation and create time
+in the return value
+
+-aneesh
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003318:2, b/test/corpora/lkml/cur/1382298587.003318:2,
new file mode 100644 (file)
index 0000000..058d147
--- /dev/null
@@ -0,0 +1,66 @@
+From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Sun, 27 Jun 2010 14:22:29 -0400
+Lines: 9
+Message-ID: <20100627182229.GA492@infradead.org>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+ <4C24A606.5040001@suse.de>
+ <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+ <9822.1277312573@redhat.com>
+ <22697.1277470549@redhat.com>
+ <18628.1277502398@redhat.com>
+ <20100625182651.36800d06@tlielax.poochiereds.net>
+ <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+ <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+ <871vbscpce.fsf@linux.vnet.ibm.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Mingming Cao <mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       DENIEL Philippe <philippe.deniel-KCE40YydGKI@public.gmane.org>,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
+       Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
+       Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
+       Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+To: "Aneesh Kumar K. V" <aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Sun Jun 27 20:22:46 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSwVB-0005TI-SG
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Sun, 27 Jun 2010 20:22:46 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752811Ab0F0SWo (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Sun, 27 Jun 2010 14:22:44 -0400
+Received: from bombadil.infradead.org ([18.85.46.34]:55433 "EHLO
+       bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752728Ab0F0SWn (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Sun, 27 Jun 2010 14:22:43 -0400
+Received: from hch by bombadil.infradead.org with local (Exim 4.72 #1 (Red Hat Linux))
+       id 1OSwUv-00009z-9N; Sun, 27 Jun 2010 18:22:29 +0000
+Content-Disposition: inline
+In-Reply-To: <871vbscpce.fsf-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+X-SRS-Rewrite: SMTP reverse-path rewritten from <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> by bombadil.infradead.org
+       See http://www.infradead.org/rpr.html
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003358>
+
+On Sun, Jun 27, 2010 at 11:47:21PM +0530, Aneesh Kumar K. V wrote:
+> NFS ganesha pNFS also had a requirement for getting i_generation and
+> inode number in userspace. So may be we should now look at updating
+> stat or add a variant syscall that include i_generation and create time
+> in the return value
+
+What's missing in knfsd that you feel the sudden urge to move backwards
+to a userspace nfsd (one with a horribly crappy codebase, too).
+
+
+
diff --git a/test/corpora/lkml/cur/1382298587.003486:2, b/test/corpora/lkml/cur/1382298587.003486:2,
new file mode 100644 (file)
index 0000000..8831b45
--- /dev/null
@@ -0,0 +1,89 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index
+ objects and register them
+Date: Mon, 28 Jun 2010 18:23:13 +0530
+Lines: 48
+Message-ID: <4C289B39.4060901@suse.de>
+References: <22746.1277470713@redhat.com> <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com> <23204.1277472412@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Jun 28 14:53:24 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OTDq0-00054Q-At
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 28 Jun 2010 14:53:24 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754503Ab0F1MxX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Mon, 28 Jun 2010 08:53:23 -0400
+Received: from cantor2.suse.de ([195.135.220.15]:48374 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754456Ab0F1MxW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Mon, 28 Jun 2010 08:53:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id 7BDC18672B;
+       Mon, 28 Jun 2010 14:53:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <23204.1277472412-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003530>
+
+On 06/25/2010 06:56 PM, David Howells wrote:
+> David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
+> 
+>>>> validate the root directory of the share in some way?
+>>>
+>>> I don't know if there is a way to do this.
+>>
+>> Is there an inode number or something?  Even the creation time might do.
+> 
+> Looking in cifspdu.h, there are a number of things that it might be possible
+> to use.
+> 
+>  (1) FILE_ALL_INFO: CreationTime, IndexNumber, IndexNumber1, FileName
+>      (assuming this isn't flattened to '\' or something for the root of a
+>      share.
+> 
+>  (2) FILE_UNIX_BASIC_INFO: DevMajor, DevMinor, UniqueId.
+> 
+>  (3) FILE_INFO_STANDARD: CreationDate, CreationTime.
+> 
+>  (4) FILE_INFO_BASIC: CreationTime.
+> 
+>  (5) FILE_DIRECTORY_INFO: FileIndex, CreationTime, FileName.
+> 
+>  (6) SEARCH_ID_FULL_DIR_INFO: FileIndex, CreationTime, UniqueId, FileName.
+> 
+>  (7) FILE_BOTH_DIRECTORY_INFO: FileIndex, CreationTime, ShortName, FileName.
+> 
+>  (8) OPEN_RSP_EXT: Fid, CreationTime, VolumeGUID, FileId.
+> 
+> You may have to choose different sets of things, depending on what the server
+> has on offer.  Also, don't forget, if you can't work out whether a share is
+
+Did you mean we need to validate differently for different servers?
+
+I just did some testing and it looks like we could rely on CreationTime,
+IndexNumber for validating with Windows servers (FileName is relative to
+the mapped drive) and UniqueId for validating with Samba servers. I did
+not test all possibilities (there could be more).
+
+> coherent or not from the above, you can always use LastWriteTime, ChangeTime
+> and EndOfFile and just discard the whole subtree if they differ.
+> 
+
+Thanks,
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298587.004581:2, b/test/corpora/lkml/cur/1382298587.004581:2,
new file mode 100644 (file)
index 0000000..732bfa0
--- /dev/null
@@ -0,0 +1,92 @@
+From: Timur Tabi <timur.tabi@gmail.com>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Wed, 30 Jun 2010 15:55:58 -0500
+Lines: 33
+Message-ID: <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+References: <20100308191005.GE4324@amak.tundra.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: mporter@kernel.crashing.org, linux-kernel@vger.kernel.org,
+       linuxppc-dev@lists.ozlabs.org, thomas.moll@sysgo.com
+To: Alexandre Bounine <abounine@tundra.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 30 22:56:40 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OU4Kl-0005Kf-V4
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 30 Jun 2010 22:56:40 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756668Ab0F3U4b convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 30 Jun 2010 16:56:31 -0400
+Received: from mail-vw0-f46.google.com ([209.85.212.46]:41333 "EHLO
+       mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753416Ab0F3U43 convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 30 Jun 2010 16:56:29 -0400
+Received: by vws5 with SMTP id 5so1449398vws.19
+        for <linux-kernel@vger.kernel.org>; Wed, 30 Jun 2010 13:56:28 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:mime-version:received:in-reply-to
+         :references:from:date:message-id:subject:to:cc:content-type
+         :content-transfer-encoding;
+        bh=FTlit9cHTz/9rLGcvA5/pEZlzxAQ5x20v8HE5XYFwYM=;
+        b=NFbjnxZ4KwcjTy4tFh+BnhWPEGeYTw6z918yIouRaMmbEDph56xq26K9aTBokuYHqe
+         UgFjBn7XWcxvqJPyCetfsDRG+F3M2XwCq/DSCswSPtXSLsy8WKm7cMXVS3hjiO8sMZ97
+         mRMGZkYBJHjWP+ulkBXiq6q7/OQuE8Dkl+rWM=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
+         :cc:content-type:content-transfer-encoding;
+        b=r0N6AOAg+TSvY2kPQPahldj4iRU9oUoSLtHA7JXG2QU4CR9O5GBhxAtr2aY99qUPZd
+         tFS0ZWRAb9cmOgiZhTpNxsBjCJ/e/DQ1ccP5rZ/U40q1SJ1KwN92hqpOoppZ0tkqSB7/
+         UlQtsvPSK7a0bYqufEmscfAi98w1+mfZIbK6U=
+Received: by 10.220.161.203 with SMTP id s11mr5093041vcx.195.1277931388141; 
+       Wed, 30 Jun 2010 13:56:28 -0700 (PDT)
+Received: by 10.220.161.137 with HTTP; Wed, 30 Jun 2010 13:55:58 -0700 (PDT)
+In-Reply-To: <20100308191005.GE4324@amak.tundra.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1004632>
+
+On Mon, Mar 8, 2010 at 2:10 PM, Alexandre Bounine <abounine@tundra.com>=
+ wrote:
+>
+> From: Alexandre Bounine <alexandre.bounine@idt.com>
+>
+> Add Machine Check exception handling into RapidIO port driver
+> for Freescale SoCs (MPC85xx).
+>
+> Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
+> Tested-by: Thomas Moll <thomas.moll@sysgo.com>
+=2E..
+
+> +static int fsl_rio_mcheck_exception(struct pt_regs *regs)
+> +{
+> + =A0 =A0 =A0 const struct exception_table_entry *entry =3D NULL;
+> + =A0 =A0 =A0 unsigned long reason =3D (mfspr(SPRN_MCSR) & MCSR_MASK)=
+;
+
+MCSR_MASK is not defined anywhere, so when I compile this code, I get t=
+his:
+
+  CC      arch/powerpc/sysdev/fsl_rio.o
+arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
+arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+(first use in this function)
+arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+is reported only once
+arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears =
+in.)
+
+--=20
+Timur Tabi
+Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298587.004582:2, b/test/corpora/lkml/cur/1382298587.004582:2,
new file mode 100644 (file)
index 0000000..d149b72
--- /dev/null
@@ -0,0 +1,68 @@
+From: Timur Tabi <timur.tabi@gmail.com>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Wed, 30 Jun 2010 16:00:56 -0500
+Lines: 12
+Message-ID: <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Cc: mporter@kernel.crashing.org, linux-kernel@vger.kernel.org,
+       linuxppc-dev@lists.ozlabs.org, thomas.moll@sysgo.com
+To: Alexandre Bounine <abounine@tundra.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 30 23:01:37 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OU4PZ-0000HS-0T
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 30 Jun 2010 23:01:37 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755703Ab0F3VB2 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 30 Jun 2010 17:01:28 -0400
+Received: from mail-vw0-f46.google.com ([209.85.212.46]:53141 "EHLO
+       mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751784Ab0F3VB1 (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 30 Jun 2010 17:01:27 -0400
+Received: by vws5 with SMTP id 5so1454517vws.19
+        for <linux-kernel@vger.kernel.org>; Wed, 30 Jun 2010 14:01:26 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:mime-version:received:in-reply-to
+         :references:from:date:message-id:subject:to:cc:content-type;
+        bh=+BUKti+Oa03CrnVvRyT591FhcoxqR7S2rzZHtD6WSuY=;
+        b=O/b04HLJrmTE0aIq2mNCRznQrXxAAGHSMarHR5mrgYptmr68froM6UgmDqTZFLhNiH
+         BcT8g+AziiqSV1k/ckXjRyVR0s9Jdv4g2phMNtp8NStbPfOPpLDkUKTQadphOTonCfeK
+         e+ZrLBwh+FCoYNAOjvFioBKj6CxN2Oi5xIhPc=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
+         :cc:content-type;
+        b=UcKGhJIXCTTcSvBWwGwLUefPONGygVPsUnTt4nDSl4udB8JKMyi0EghzzgNXUyq4Dz
+         UCxzZAyxzjvjgsgPS3kzPhSsWG2PRG66pC1OA68RJ5YVOjt55/yOz/yfTqXBVvRSq2fV
+         QNcKACYHSjkIZ7Uq7ZEW9bEGI5tTKdz++N2UA=
+Received: by 10.220.124.73 with SMTP id t9mr5099129vcr.37.1277931686462; Wed, 
+       30 Jun 2010 14:01:26 -0700 (PDT)
+Received: by 10.220.161.137 with HTTP; Wed, 30 Jun 2010 14:00:56 -0700 (PDT)
+In-Reply-To: <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1004633>
+
+On Wed, Jun 30, 2010 at 3:55 PM, Timur Tabi <timur.tabi@gmail.com> wrote:
+
+> MCSR_MASK is not defined anywhere, so when I compile this code, I get this:
+
+Never mind.  I see that it's been fixed already, and that the patch
+that removed MCSR_MASK was posted around the same time that this patch
+was posted.
+
+
+-- 
+Timur Tabi
+Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001724:2, b/test/corpora/lkml/cur/1382298770.001724:2,
new file mode 100644 (file)
index 0000000..69c794c
--- /dev/null
@@ -0,0 +1,104 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Tue, 22 Jun 2010 20:55:09 +0530
+Lines: 66
+Message-ID: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:25:29 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5Ls-0004PS-BM
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:25:28 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1755015Ab0FVPZ1 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:25:27 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:48639 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1754070Ab0FVPZ1 (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:25:27 -0400
+X-Greylist: delayed 316 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jun 2010 11:25:26 EDT
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:25:11 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001750>
+
+Add a mount option 'fsc' to enable local caching on CIFS.
+
+As the cifs-utils (userspace) changes are not done yet, this patch enables
+'fsc' by default to assist testing.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/cifs_fs_sb.h |    1 +
+ fs/cifs/connect.c    |    8 ++++++++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
+index 246a167..9e77145 100644
+--- a/fs/cifs/cifs_fs_sb.h
++++ b/fs/cifs/cifs_fs_sb.h
+@@ -35,6 +35,7 @@
+ #define CIFS_MOUNT_DYNPERM      0x1000 /* allow in-memory only mode setting   */
+ #define CIFS_MOUNT_NOPOSIXBRL   0x2000 /* mandatory not posix byte range lock */
+ #define CIFS_MOUNT_NOSSYNC      0x4000 /* don't do slow SMBflush on every sync*/
++#define CIFS_MOUNT_FSCACHE    0x8000 /* local caching enabled */
+ struct cifs_sb_info {
+       struct cifsTconInfo *tcon;      /* primary mount */
+diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
+index 4844dbd..6c6ff3c 100644
+--- a/fs/cifs/connect.c
++++ b/fs/cifs/connect.c
+@@ -98,6 +98,7 @@ struct smb_vol {
+       bool noblocksnd:1;
+       bool noautotune:1;
+       bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
++      bool fsc:1;     /* enable fscache */
+       unsigned int rsize;
+       unsigned int wsize;
+       bool sockopt_tcp_nodelay:1;
+@@ -843,6 +844,9 @@ cifs_parse_mount_options(char *options, const char *devname,
+       /* default to using server inode numbers where available */
+       vol->server_ino = 1;
++      /* XXX: default to fsc for testing until mount.cifs pieces are done */
++      vol->fsc = 1;
++
+       if (!options)
+               return 1;
+@@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const char *devname,
+                       printk(KERN_WARNING "CIFS: Mount option noac not "
+                               "supported. Instead set "
+                               "/proc/fs/cifs/LookupCacheEnabled to 0\n");
++              } else if (strnicmp(data, "fsc", 3) == 0) {
++                      vol->fsc = true;
+               } else
+                       printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
+                                               data);
+@@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+       if (pvolume_info->dynperm)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
++      if (pvolume_info->fsc)
++              cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
+       if (pvolume_info->direct_io) {
+               cFYI(1, "mounting share using direct i/o");
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001730:2, b/test/corpora/lkml/cur/1382298770.001730:2,
new file mode 100644 (file)
index 0000000..840be2e
--- /dev/null
@@ -0,0 +1,103 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 00/10] cifs: local caching support using FS-Cache
+Date: Tue, 22 Jun 2010 20:50:05 +0530
+Lines: 66
+Message-ID: <1277220005-3322-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:40:38 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5aY-00055O-BD
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:40:38 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751889Ab0FVPkf (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:40:35 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:50040 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751554Ab0FVPkf (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:40:35 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:20:07 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001756>
+
+This patchset is a first stab at adding persistent, local caching facility for
+CIFS using the FS-Cache interface.
+
+The index hierarchy which is mainly used to locate a file object or discard
+a certain subset of the files cached, currently has three levels:
+       - Server
+       - Share 
+       - File
+
+The server index object is keyed by hostname of the server. The superblock
+index object is keyed by the sharename and the inode object is keyed by the
+UniqueId. The cache coherency is ensured by checking the 'LastWriteTime' and
+size of file.
+
+To use this, apply this patchset in order, mount the share with rsize=4096 and
+try copying a huge file (say few hundred MBs) from mount point to local
+filesystem. During the first time, the cache will be initialized. When you copy
+the second time, it should read from the local cache.
+
+To reduce the impact of page cache and see the local caching in action
+readily, try doing a sync and drop the caches by doing:
+       sync; echo 3 > /proc/sys/vm/drop_caches
+
+Known issues
+-------------
+       - the cache coherency check may not be reliable always as some
+         CIFS servers are known not to update mtime until the filehandle is
+         closed.
+       - not all the Servers under all circumstances provide a unique
+         'UniqueId'.
+
+Todo's
+-------
+       - improvements to avoid potential key collisions
+       - address the above known issues
+
+This set is lightly tested and all the bugs seen during my testing have been
+fixed. However, this can be considered as an RFC for now.
+
+Any Comments or Suggestions are welcome.
+
+Suresh Jayaraman (10)
+  cifs: add kernel config option for CIFS Client caching support
+  cifs: guard cifsglob.h against multiple inclusion
+  cifs: register CIFS for caching
+  cifs: define server-level cache index objects and register them with FS-Cache
+  cifs: define superblock-level cache index objects and register them
+  cifs: define inode-level cache object and register them
+  cifs: FS-Cache page management
+  cifs: store pages into local cache
+  cifs: read pages from FS-Cache
+  cifs: add mount option to enable local caching
+
+ Kconfig      |    9 ++
+ Makefile     |    2 
+ cache.c      |  251 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ cifs_fs_sb.h |    1 
+ cifsfs.c     |   15 +++
+ cifsglob.h   |   14 +++
+ connect.c    |   16 +++
+ file.c       |   51 +++++++++++
+ fscache.c    |  244 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fscache.h    |  135 +++++++++++++++++++++++++++++++
+ inode.c      |    4 
+ 11 files changed, 742 insertions(+)
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001731:2, b/test/corpora/lkml/cur/1382298770.001731:2,
new file mode 100644 (file)
index 0000000..d8b3168
--- /dev/null
@@ -0,0 +1,67 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 01/10] cifs: add kernel config option for CIFS Client caching support
+Date: Tue, 22 Jun 2010 20:52:38 +0530
+Lines: 30
+Message-ID: <1277220158-3405-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:43:27 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5dG-0007m9-Ij
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:43:26 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1751536Ab0FVPnS (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:18 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:51303 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1750800Ab0FVPnR (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:43:17 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:22:40 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001757>
+
+Add a kernel config option to enable local caching for CIFS.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/Kconfig |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
+index 80f3525..5739fd7 100644
+--- a/fs/cifs/Kconfig
++++ b/fs/cifs/Kconfig
+@@ -131,6 +131,15 @@ config CIFS_DFS_UPCALL
+           IP addresses) which is needed for implicit mounts of DFS junction
+           points. If unsure, say N.
++config CIFS_FSCACHE
++        bool "Provide CIFS client caching support (EXPERIMENTAL)"
++        depends on EXPERIMENTAL
++        depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
++        help
++          Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
++          to be cached locally on disk through the general filesystem cache
++          manager. If unsure, say N.
++
+ config CIFS_EXPERIMENTAL
+         bool "CIFS Experimental Features (EXPERIMENTAL)"
+         depends on CIFS && EXPERIMENTAL
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001732:2, b/test/corpora/lkml/cur/1382298770.001732:2,
new file mode 100644 (file)
index 0000000..8850953
--- /dev/null
@@ -0,0 +1,73 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 02/10] cifs: guard cifsglob.h against multiple inclusion
+Date: Tue, 22 Jun 2010 20:52:50 +0530
+Lines: 36
+Message-ID: <1277220170-3442-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-fsdevel-owner@vger.kernel.org Tue Jun 22 17:43:39 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OR5dT-0007sB-18
+       for lnx-linux-fsdevel@lo.gmane.org; Tue, 22 Jun 2010 17:43:39 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752441Ab0FVPn3 (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:29 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:41538 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751889Ab0FVPn2 (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:43:28 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:22:52 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001758>
+
+Add conditional compile macros to guard the header file against multiple
+inclusion.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cifsglob.h |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+index a88479c..6b2c39d 100644
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
+@@ -16,6 +16,9 @@
+  *   the GNU Lesser General Public License for more details.
+  *
+  */
++#ifndef _CIFS_GLOB_H
++#define _CIFS_GLOB_H
++
+ #include <linux/in.h>
+ #include <linux/in6.h>
+ #include <linux/slab.h>
+@@ -733,3 +736,5 @@ GLOBAL_EXTERN unsigned int cifs_min_small;  /* min size of small buf pool */
+ GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/
+ extern const struct slow_work_ops cifs_oplock_break_ops;
++
++#endif        /* _CIFS_GLOB_H */
+-- 
+1.6.4.2
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001733:2, b/test/corpora/lkml/cur/1382298770.001733:2,
new file mode 100644 (file)
index 0000000..d782f90
--- /dev/null
@@ -0,0 +1,211 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 03/10] cifs: register CIFS for caching
+Date: Tue, 22 Jun 2010 20:53:09 +0530
+Lines: 174
+Message-ID: <1277220189-3485-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:43:52 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5de-0007xC-Ov
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:43:51 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753125Ab0FVPnt (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:43:49 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:55866 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751261Ab0FVPnt (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:43:49 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:11 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001759>
+
+Define CIFS for FS-Cache and register for caching. Upon registration the
+top-level index object cookie will be stuck to the netfs definition by
+FS-Cache.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/Makefile  |    2 ++
+ fs/cifs/cache.c   |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsfs.c  |    8 ++++++++
+ fs/cifs/fscache.h |   40 ++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 103 insertions(+), 0 deletions(-)
+ create mode 100644 fs/cifs/cache.c
+ create mode 100644 fs/cifs/fscache.h
+
+diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
+index 9948c00..e2de709 100644
+--- a/fs/cifs/Makefile
++++ b/fs/cifs/Makefile
+@@ -11,3 +11,5 @@ cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \
+ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
+ cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
++
++cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
+diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
+new file mode 100644
+index 0000000..1080b96
+--- /dev/null
++++ b/fs/cifs/cache.c
+@@ -0,0 +1,53 @@
++/*
++ *   fs/cifs/cache.c - CIFS filesystem cache index structure definitions
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++
++#include "fscache.h"
++#include "cifsglob.h"
++#include "cifs_debug.h"
++
++/*
++ * CIFS filesystem definition for FS-Cache
++ */
++struct fscache_netfs cifs_fscache_netfs = {
++      .name = "cifs",
++      .version = 0,
++};
++
++/*
++ * Register CIFS for caching with FS-Cache
++ */
++int cifs_fscache_register(void)
++{
++      return fscache_register_netfs(&cifs_fscache_netfs);
++}
++
++/*
++ * Unregister CIFS for caching
++ */
++void cifs_fscache_unregister(void)
++{
++      fscache_unregister_netfs(&cifs_fscache_netfs);
++}
++
+diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
+index 484e52b..c2a7aa9 100644
+--- a/fs/cifs/cifsfs.c
++++ b/fs/cifs/cifsfs.c
+@@ -47,6 +47,7 @@
+ #include <linux/key-type.h>
+ #include "dns_resolve.h"
+ #include "cifs_spnego.h"
++#include "fscache.h"
+ #define CIFS_MAGIC_NUMBER 0xFF534D42  /* the first four bytes of SMB PDUs */
+ int cifsFYI = 0;
+@@ -902,6 +903,10 @@ init_cifs(void)
+               cFYI(1, "cifs_max_pending set to max of 256");
+       }
++      rc = cifs_fscache_register();
++      if (rc)
++              goto out;
++
+       rc = cifs_init_inodecache();
+       if (rc)
+               goto out_clean_proc;
+@@ -949,8 +954,10 @@ init_cifs(void)
+       cifs_destroy_mids();
+  out_destroy_inodecache:
+       cifs_destroy_inodecache();
++      cifs_fscache_unregister();
+  out_clean_proc:
+       cifs_proc_clean();
++ out:
+       return rc;
+ }
+@@ -959,6 +966,7 @@ exit_cifs(void)
+ {
+       cFYI(DBG2, "exit_cifs");
+       cifs_proc_clean();
++      cifs_fscache_unregister();
+ #ifdef CONFIG_CIFS_DFS_UPCALL
+       cifs_dfs_release_automount_timer();
+       unregister_key_type(&key_type_dns_resolver);
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+new file mode 100644
+index 0000000..cec9e2b
+--- /dev/null
++++ b/fs/cifs/fscache.h
+@@ -0,0 +1,40 @@
++/*
++ *   fs/cifs/fscache.h - CIFS filesystem cache interface definitions
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#ifndef _CIFS_FSCACHE_H
++#define _CIFS_FSCACHE_H
++
++#include <linux/fscache.h>
++#include "cifsglob.h"
++
++#ifdef CONFIG_CIFS_FSCACHE
++
++extern struct fscache_netfs cifs_fscache_netfs;
++
++extern int cifs_fscache_register(void);
++extern void cifs_fscache_unregister(void);
++
++#else /* CONFIG_CIFS_FSCACHE */
++static inline int cifs_fscache_register(void) { return 0; }
++static inline void cifs_fscache_unregister(void) {}
++
++#endif /* CONFIG_CIFS_FSCACHE */
++
++#endif /* _CIFS_FSCACHE_H */
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001734:2, b/test/corpora/lkml/cur/1382298770.001734:2,
new file mode 100644 (file)
index 0000000..4b64bc3
--- /dev/null
@@ -0,0 +1,223 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 04/10] cifs: define server-level cache index objects and register them with FS-Cache
+Date: Tue, 22 Jun 2010 20:53:18 +0530
+Lines: 186
+Message-ID: <1277220198-3522-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:44:26 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5eD-0008G7-KP
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:44:26 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753942Ab0FVPoC (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:02 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:58783 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751265Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:20 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001760>
+
+Define server-level cache index objects (as managed by TCP_ServerInfo structs).
+Each server object is created in the CIFS top-level index object and is itself
+an index into which superblock-level objects are inserted.
+
+Currently, the server objects are keyed by hostname.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/Makefile   |    2 +-
+ fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
+ fs/cifs/cifsglob.h |    3 +++
+ fs/cifs/connect.c  |    4 ++++
+ fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h  |   12 ++++++++++++
+ 6 files changed, 92 insertions(+), 1 deletion(-)
+ create mode 100644 fs/cifs/fscache.c
+
+Index: cifs-2.6/fs/cifs/Makefile
+===================================================================
+--- cifs-2.6.orig/fs/cifs/Makefile
++++ cifs-2.6/fs/cifs/Makefile
+@@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
+ cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
+-cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
++cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
+       fscache_unregister_netfs(&cifs_fscache_netfs);
+ }
++/*
++ * Server object currently keyed by hostname
++ */
++static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
++                                 void *buffer, uint16_t maxbuf)
++{
++      const struct TCP_Server_Info *server = cookie_netfs_data;
++      uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
++
++      if (len > maxbuf)
++              return 0;
++
++      memcpy(buffer, server->hostname, len);
++
++      return len;
++}
++
++/*
++ * Server object for FS-Cache
++ */
++const struct fscache_cookie_def cifs_fscache_server_index_def = {
++      .name = "CIFS.server",
++      .type = FSCACHE_COOKIE_TYPE_INDEX,
++      .get_key = cifs_server_get_key,
++};
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -193,6 +193,9 @@ struct TCP_Server_Info {
+       bool    sec_mskerberos;         /* supports legacy MS Kerberos */
+       bool    sec_kerberosu2u;        /* supports U2U Kerberos */
+       bool    sec_ntlmssp;            /* supports NTLMSSP */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie   *fscache; /* client index cache cookie */
++#endif
+ };
+ /*
+Index: cifs-2.6/fs/cifs/connect.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/connect.c
++++ cifs-2.6/fs/cifs/connect.c
+@@ -48,6 +48,7 @@
+ #include "nterr.h"
+ #include "rfc1002pdu.h"
+ #include "cn_cifs.h"
++#include "fscache.h"
+ #define CIFS_PORT 445
+ #define RFC1001_PORT 139
+@@ -1453,6 +1454,8 @@ cifs_put_tcp_session(struct TCP_Server_I
+               return;
+       }
++      cifs_fscache_release_client_cookie(server);
++
+       list_del_init(&server->tcp_ses_list);
+       write_unlock(&cifs_tcp_ses_lock);
+@@ -1572,6 +1575,7 @@ cifs_get_tcp_session(struct smb_vol *vol
+               goto out_err;
+       }
++      cifs_fscache_get_client_cookie(tcp_ses);
+       /* thread spawned, put it on the list */
+       write_lock(&cifs_tcp_ses_lock);
+       list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- /dev/null
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -0,0 +1,47 @@
++/*
++ *   fs/cifs/fscache.c - CIFS filesystem cache interface
++ *
++ *   Copyright (c) 2010 Novell, Inc.
++ *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
++ *
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as published
++ *   by the Free Software Foundation; either version 2.1 of the License, or
++ *   (at your option) any later version.
++ *
++ *   This library is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++ *   the GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public License
++ *   along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/mm.h>
++#include <linux/in6.h>
++
++#include "fscache.h"
++#include "cifsglob.h"
++#include "cifs_debug.h"
++
++void cifs_fscache_get_client_cookie(struct TCP_Server_Info *server)
++{
++      server->fscache =
++              fscache_acquire_cookie(cifs_fscache_netfs.primary_index,
++                              &cifs_fscache_server_index_def, server);
++      cFYI(1, "CIFS: get client cookie (0x%p/0x%p)\n",
++                              server, server->fscache);
++}
++
++void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
++{
++      cFYI(1, "CIFS: release client cookie (0x%p/0x%p)\n",
++                              server, server->fscache);
++      fscache_relinquish_cookie(server->fscache, 0);
++      server->fscache = NULL;
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -27,14 +27,26 @@
+ #ifdef CONFIG_CIFS_FSCACHE
+ extern struct fscache_netfs cifs_fscache_netfs;
++extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
++/*
++ * fscache.c
++ */
++extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
++extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
++static inline void
++cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
++static inline void
++cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
++
+ #endif /* CONFIG_CIFS_FSCACHE */
+ #endif /* _CIFS_FSCACHE_H */
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001735:2, b/test/corpora/lkml/cur/1382298770.001735:2,
new file mode 100644 (file)
index 0000000..d76da35
--- /dev/null
@@ -0,0 +1,212 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 07/10] cifs: FS-Cache page management
+Date: Tue, 22 Jun 2010 20:53:48 +0530
+Lines: 175
+Message-ID: <1277220228-3635-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:44:27 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5eF-0008G7-BK
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:44:27 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754757Ab0FVPoS (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:18 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:54214 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752542Ab0FVPoB (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:01 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:50 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001761>
+
+Takes care of invalidation and release of FS-Cache marked pages and also
+invalidation of the FsCache page flag when the inode is removed.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cache.c   |   31 +++++++++++++++++++++++++++++++
+ fs/cifs/file.c    |   20 ++++++++++++++++++++
+ fs/cifs/fscache.c |   26 ++++++++++++++++++++++++++
+ fs/cifs/fscache.h |   16 ++++++++++++++++
+ 4 files changed, 93 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
+index b205424..3a733c1 100644
+--- a/fs/cifs/cache.c
++++ b/fs/cifs/cache.c
+@@ -210,6 +210,36 @@ fscache_checkaux cifs_fscache_inode_check_aux(void *cookie_netfs_data,
+       return FSCACHE_CHECKAUX_OKAY;
+ }
++static void cifs_fscache_inode_now_uncached(void *cookie_netfs_data)
++{
++      struct cifsInodeInfo *cifsi = cookie_netfs_data;
++      struct pagevec pvec;
++      pgoff_t first;
++      int loop, nr_pages;
++
++      pagevec_init(&pvec, 0);
++      first = 0;
++
++      cFYI(1, "cifs inode 0x%p now uncached\n", cifsi);
++
++      for (;;) {
++              nr_pages = pagevec_lookup(&pvec,
++                                        cifsi->vfs_inode.i_mapping, first,
++                                        PAGEVEC_SIZE - pagevec_count(&pvec));
++              if (!nr_pages)
++                      break;
++
++              for (loop = 0; loop < nr_pages; loop++)
++                      ClearPageFsCache(pvec.pages[loop]);
++
++              first = pvec.pages[nr_pages - 1]->index + 1;
++
++              pvec.nr = nr_pages;
++              pagevec_release(&pvec);
++              cond_resched();
++      }
++}
++
+ const struct fscache_cookie_def cifs_fscache_inode_object_def = {
+       .name           = "CIFS.uniqueid",
+       .type           = FSCACHE_COOKIE_TYPE_DATAFILE,
+@@ -217,4 +247,5 @@ const struct fscache_cookie_def cifs_fscache_inode_object_def = {
+       .get_attr       = cifs_fscache_inode_get_attr,
+       .get_aux        = cifs_fscache_inode_get_aux,
+       .check_aux      = cifs_fscache_inode_check_aux,
++      .now_uncached   = cifs_fscache_inode_now_uncached,
+ };
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 55ecb55..786ec04 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -2271,6 +2271,22 @@ out:
+       return rc;
+ }
++static int cifs_release_page(struct page *page, gfp_t gfp)
++{
++      if (PagePrivate(page))
++              return 0;
++
++      return cifs_fscache_release_page(page, gfp);
++}
++
++static void cifs_invalidate_page(struct page *page, unsigned long offset)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(page->mapping->host);
++
++      if (offset == 0)
++              cifs_fscache_invalidate_page(page, &cifsi->vfs_inode);
++}
++
+ static void
+ cifs_oplock_break(struct slow_work *work)
+ {
+@@ -2344,6 +2360,8 @@ const struct address_space_operations cifs_addr_ops = {
+       .write_begin = cifs_write_begin,
+       .write_end = cifs_write_end,
+       .set_page_dirty = __set_page_dirty_nobuffers,
++      .releasepage = cifs_release_page,
++      .invalidatepage = cifs_invalidate_page,
+       /* .sync_page = cifs_sync_page, */
+       /* .direct_IO = */
+ };
+@@ -2360,6 +2378,8 @@ const struct address_space_operations cifs_addr_ops_smallbuf = {
+       .write_begin = cifs_write_begin,
+       .write_end = cifs_write_end,
+       .set_page_dirty = __set_page_dirty_nobuffers,
++      .releasepage = cifs_release_page,
++      .invalidatepage = cifs_invalidate_page,
+       /* .sync_page = cifs_sync_page, */
+       /* .direct_IO = */
+ };
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index ddfd355..c09d3b8 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -130,3 +130,29 @@ void cifs_fscache_reset_inode_cookie(struct inode *inode)
+       }
+ }
++int cifs_fscache_release_page(struct page *page, gfp_t gfp)
++{
++      if (PageFsCache(page)) {
++              struct inode *inode = page->mapping->host;
++              struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++              cFYI(1, "CIFS: fscache release page (0x%p/0x%p)\n",
++                              cifsi->fscache, page);
++              if (!fscache_maybe_release_page(cifsi->fscache, page, gfp))
++                      return 0;
++      }
++
++      return 1;
++}
++
++void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct fscache_cookie *cookie = cifsi->fscache;
++
++      cFYI(1, "CIFS: fscache invalidatepage (0x%p/0x%p/0x%p)\n",
++                      cookie, page, cifsi);
++      fscache_wait_on_page_write(cookie, page);
++      fscache_uncache_page(cookie, page);
++}
++
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index 836bb02..127cb0a 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -47,6 +47,16 @@ extern void cifs_fscache_release_inode_cookie(struct inode *);
+ extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
+ extern void cifs_fscache_reset_inode_cookie(struct inode *);
++extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
++extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++
++static inline void cifs_fscache_invalidate_page(struct page *page,
++                                             struct inode *inode)
++{
++      if (PageFsCache(page))
++              __cifs_fscache_invalidate_page(page, inode);
++}
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -63,7 +73,13 @@ static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
+ static inline void cifs_fscache_set_inode_cookie(struct inode *inode,
+                       struct file *filp) {}
+ static inline void cifs_fscache_reset_inode_cookie(struct inode *inode) {}
++static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
++{
++      return 1; /* May release page */
++}
++static inline int cifs_fscache_invalidate_page(struct page *page,
++                      struct inode *) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001736:2, b/test/corpora/lkml/cur/1382298770.001736:2,
new file mode 100644 (file)
index 0000000..f972891
--- /dev/null
@@ -0,0 +1,256 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 09/10] cifs: read pages from FS-Cache
+Date: Tue, 22 Jun 2010 20:54:21 +0530
+Lines: 219
+Message-ID: <1277220261-3717-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:44:46 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5eX-0008O2-Q4
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:44:46 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752563Ab0FVPom (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:42 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:42741 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752542Ab0FVPok (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:40 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:24:22 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001762>
+
+Read pages from a FS-Cache data storage object into a CIFS inode.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/file.c    |   19 ++++++++++++++
+ fs/cifs/fscache.c |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h |   40 ++++++++++++++++++++++++++++-
+ 3 files changed, 131 insertions(+), 1 deletions(-)
+
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 39c1ce0..42d2f25 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -1978,6 +1978,16 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+       cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
+       pTcon = cifs_sb->tcon;
++      /*
++       * Reads as many pages as possible from fscache. Returns -ENOBUFS
++       * immediately if the cookie is negative
++       */
++      rc = cifs_readpages_from_fscache(mapping->host, mapping, page_list,
++                                       &num_pages);
++      cFYI(1, "CIFS: readpages_from_fscache returned %d\n", rc);
++      if (rc == 0)
++              goto read_complete;
++
+       cFYI(DBG2, "rpages: num pages %d", num_pages);
+       for (i = 0; i < num_pages; ) {
+               unsigned contig_pages;
+@@ -2090,6 +2100,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+               smb_read_data = NULL;
+       }
++read_complete:
+       FreeXid(xid);
+       return rc;
+ }
+@@ -2100,6 +2111,12 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+       char *read_data;
+       int rc;
++      /* Is the page cached? */
++      rc = cifs_readpage_from_fscache(file->f_path.dentry->d_inode, page);
++      cFYI(1, "CIFS: cifs_readpage_from_fscache returned %d\n", rc);
++      if (rc == 0)
++              goto read_complete;
++
+       page_cache_get(page);
+       read_data = kmap(page);
+       /* for reads over a certain size could initiate async read ahead */
+@@ -2128,6 +2145,8 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+ io_error:
+       kunmap(page);
+       page_cache_release(page);
++
++read_complete:
+       return rc;
+ }
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index 13e47d5..6813737 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -145,6 +145,79 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)
+       return 1;
+ }
++static void cifs_readpage_from_fscache_complete(struct page *page, void *ctx,
++                                              int error)
++{
++      cFYI(1, "CFS: readpage_from_fscache_complete (0x%p/%d)\n",
++                      page, error);
++      if (!error)
++              SetPageUptodate(page);
++      unlock_page(page);
++}
++
++/*
++ * Retrieve a page from FS-Cache
++ */
++int __cifs_readpage_from_fscache(struct inode *inode, struct page *page)
++{
++      int ret;
++
++      cFYI(1, "CIFS: readpage_from_fscache(fsc:%p, p:%p, i:0x%p\n",
++                      CIFS_I(inode)->fscache, page, inode);
++      ret = fscache_read_or_alloc_page(CIFS_I(inode)->fscache, page,
++                                       cifs_readpage_from_fscache_complete,
++                                       NULL,
++                                       GFP_KERNEL);
++      switch (ret) {
++
++      case 0: /* page found in fscache, read submitted */
++              cFYI(1, "CIFS: readpage_from_fscache: submitted\n");
++              return ret;
++      case -ENOBUFS:  /* page won't be cached */
++      case -ENODATA:  /* page not in cache */
++              cFYI(1, "CIFS: readpage_from_fscache %d\n", ret);
++              return 1;
++
++      default:
++              cFYI(1, "unknown error ret = %d", ret);
++      }
++      return ret;
++}
++
++/*
++ * Retrieve a set of pages from FS-Cache
++ */
++int __cifs_readpages_from_fscache(struct inode *inode,
++                              struct address_space *mapping,
++                              struct list_head *pages,
++                              unsigned *nr_pages)
++{
++      int ret;
++
++      cFYI(1, "CIFS: __cifs_readpages_from_fscache (0x%p/%u/0x%p)\n",
++                      CIFS_I(inode)->fscache, *nr_pages, inode);
++      ret = fscache_read_or_alloc_pages(CIFS_I(inode)->fscache, mapping,
++                                        pages, nr_pages,
++                                        cifs_readpage_from_fscache_complete,
++                                        NULL,
++                                        mapping_gfp_mask(mapping));
++      switch (ret) {
++      case 0: /* read submitted to the cache for all pages */
++              cFYI(1, "CIFS: readpages_from_fscache\n");
++              return ret;
++
++      case -ENOBUFS:  /* some pages are not cached and can't be */
++      case -ENODATA:  /* some pages are not cached */
++              cFYI(1, "CIFS: readpages_from_fscache: no page\n");
++              return 1;
++
++      default:
++              cFYI(1, "unknown error ret = %d", ret);
++      }
++
++      return ret;
++}
++
+ void __cifs_readpage_to_fscache(struct inode *inode, struct page *page)
+ {
+       int ret;
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index e34d8ab..03bd3fe 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -31,7 +31,6 @@ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_super_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_inode_object_def;
+-
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -49,6 +48,11 @@ extern void cifs_fscache_reset_inode_cookie(struct inode *);
+ extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
+ extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++extern int __cifs_readpage_from_fscache(struct inode *, struct page *);
++extern int __cifs_readpages_from_fscache(struct inode *,
++                                       struct address_space *,
++                                       struct list_head *,
++                                       unsigned *);
+ extern void __cifs_readpage_to_fscache(struct inode *, struct page *);
+@@ -59,6 +63,26 @@ static inline void cifs_fscache_invalidate_page(struct page *page,
+               __cifs_fscache_invalidate_page(page, inode);
+ }
++static inline int cifs_readpage_from_fscache(struct inode *inode,
++                                           struct page *page)
++{
++      if (CIFS_I(inode)->fscache)
++              return __cifs_readpage_from_fscache(inode, page);
++
++      return -ENOBUFS;
++}
++
++static inline int cifs_readpages_from_fscache(struct inode *inode,
++                                            struct address_space *mapping,
++                                            struct list_head *pages,
++                                            unsigned *nr_pages)
++{
++      if (CIFS_I(inode)->fscache)
++              return __cifs_readpages_from_fscache(inode, mapping, pages,
++                                                   nr_pages);
++      return -ENOBUFS;
++}
++
+ static inline void cifs_readpage_to_fscache(struct inode *inode,
+                                           struct page *page)
+ {
+@@ -89,6 +113,20 @@ static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
+ static inline int cifs_fscache_invalidate_page(struct page *page,
+                       struct inode *) {}
++static inline int
++cifs_readpage_from_fscache(struct inode *inode, struct page *page)
++{
++      return -ENOBUFS;
++}
++
++static inline int cifs_readpages_from_fscache(struct inode *inode,
++                                            struct address_space *mapping,
++                                            struct list_head *pages,
++                                            unsigned *nr_pages)
++{
++      return -ENOBUFS;
++}
++
+ static inline void cifs_readpage_to_fscache(struct inode *inode,
+                       struct page *page) {}
+-- 
+1.6.4.2
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001738:2, b/test/corpora/lkml/cur/1382298770.001738:2,
new file mode 100644 (file)
index 0000000..b1e0edf
--- /dev/null
@@ -0,0 +1,139 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 08/10] cifs: store pages into local cache
+Date: Tue, 22 Jun 2010 20:54:00 +0530
+Lines: 102
+Message-ID: <1277220240-3674-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-fsdevel-owner@vger.kernel.org Tue Jun 22 17:45:09 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OR5ev-00007O-6e
+       for lnx-linux-fsdevel@lo.gmane.org; Tue, 22 Jun 2010 17:45:09 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755015Ab0FVPon (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Tue, 22 Jun 2010 11:44:43 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:58250 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751265Ab0FVPok (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:40 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:24:02 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001764>
+
+Store pages from an CIFS inode into the data storage object associated with
+that inode.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/file.c    |    6 ++++++
+ fs/cifs/fscache.c |   13 +++++++++++++
+ fs/cifs/fscache.h |   11 +++++++++++
+ 3 files changed, 30 insertions(+), 0 deletions(-)
+
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 786ec04..39c1ce0 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -2060,6 +2060,8 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
+                                  we will hit it on next read */
+                               /* break; */
++                              /* send this page to FS-Cache */
++                              cifs_readpage_to_fscache(mapping->host, page);
+                       }
+               } else {
+                       cFYI(1, "No bytes read (%d) at offset %lld . "
+@@ -2117,6 +2119,10 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
+       flush_dcache_page(page);
+       SetPageUptodate(page);
++
++      /* send this page to the cache */
++      cifs_readpage_to_fscache(file->f_path.dentry->d_inode, page);
++
+       rc = 0;
+ io_error:
+diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
+index c09d3b8..13e47d5 100644
+--- a/fs/cifs/fscache.c
++++ b/fs/cifs/fscache.c
+@@ -145,6 +145,19 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)
+       return 1;
+ }
++void __cifs_readpage_to_fscache(struct inode *inode, struct page *page)
++{
++      int ret;
++
++      cFYI(1, "CIFS: readpage_to_fscache(fsc: %p, p: %p, i: %p\n",
++                      CIFS_I(inode)->fscache, page, inode);
++      ret = fscache_write_page(CIFS_I(inode)->fscache, page, GFP_KERNEL);
++      cFYI(1, "CIFS: fscache_write_page returned %d\n", ret);
++
++      if (ret != 0)
++              fscache_uncache_page(CIFS_I(inode)->fscache, page);
++}
++
+ void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode)
+ {
+       struct cifsInodeInfo *cifsi = CIFS_I(inode);
+diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
+index 127cb0a..e34d8ab 100644
+--- a/fs/cifs/fscache.h
++++ b/fs/cifs/fscache.h
+@@ -50,6 +50,8 @@ extern void cifs_fscache_reset_inode_cookie(struct inode *);
+ extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
+ extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
++extern void __cifs_readpage_to_fscache(struct inode *, struct page *);
++
+ static inline void cifs_fscache_invalidate_page(struct page *page,
+                                              struct inode *inode)
+ {
+@@ -57,6 +59,13 @@ static inline void cifs_fscache_invalidate_page(struct page *page,
+               __cifs_fscache_invalidate_page(page, inode);
+ }
++static inline void cifs_readpage_to_fscache(struct inode *inode,
++                                          struct page *page)
++{
++      if (PageFsCache(page))
++              __cifs_readpage_to_fscache(inode, page);
++}
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -80,6 +89,8 @@ static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
+ static inline int cifs_fscache_invalidate_page(struct page *page,
+                       struct inode *) {}
++static inline void cifs_readpage_to_fscache(struct inode *inode,
++                      struct page *page) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+-- 
+1.6.4.2
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001739:2, b/test/corpora/lkml/cur/1382298770.001739:2,
new file mode 100644 (file)
index 0000000..d0abda0
--- /dev/null
@@ -0,0 +1,355 @@
+From: Suresh Jayaraman <sjayaraman@suse.de>
+Subject: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Tue, 22 Jun 2010 20:53:33 +0530
+Lines: 318
+Message-ID: <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
+To: Steve French <smfrench@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Jun 22 17:45:30 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OR5fF-0000Ka-Na
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 22 Jun 2010 17:45:30 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755952Ab0FVPpP (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 22 Jun 2010 11:45:15 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:59441 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751397Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman@novell.com:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:35 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001765>
+
+Define inode-level data storage objects (managed by cifsInodeInfo structs).
+Each inode-level object is created in a super-block level object and is itself
+a data storage object in to which pages from the inode are stored.
+
+The inode object is keyed by UniqueId. The coherency data being used is
+LastWriteTime and the file size.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+---
+ fs/cifs/cache.c    |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsfs.c   |    7 ++++
+ fs/cifs/cifsglob.h |    3 +
+ fs/cifs/file.c     |    6 +++
+ fs/cifs/fscache.c  |   68 +++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/fscache.h  |   12 +++++++
+ fs/cifs/inode.c    |    4 ++
+ 7 files changed, 180 insertions(+)
+
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -138,3 +138,83 @@ const struct fscache_cookie_def cifs_fsc
+       .get_key = cifs_super_get_key,
+ };
++/*
++ * Auxiliary data attached to CIFS inode within the cache
++ */
++struct cifs_fscache_inode_auxdata {
++      struct timespec last_write_time;
++      loff_t          size;
++};
++
++static uint16_t cifs_fscache_inode_get_key(const void *cookie_netfs_data,
++                                         void *buffer, uint16_t maxbuf)
++{
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++      uint16_t keylen;
++
++      /* use the UniqueId as the key */
++      keylen = sizeof(cifsi->uniqueid);
++      if (keylen > maxbuf)
++              keylen = 0;
++      else
++              memcpy(buffer, &cifsi->uniqueid, keylen);
++
++      return keylen;
++}
++
++static void
++cifs_fscache_inode_get_attr(const void *cookie_netfs_data, uint64_t *size)
++{
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      *size = cifsi->vfs_inode.i_size;
++}
++
++static uint16_t
++cifs_fscache_inode_get_aux(const void *cookie_netfs_data, void *buffer,
++                         uint16_t maxbuf)
++{
++      struct cifs_fscache_inode_auxdata auxdata;
++      const struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      memset(&auxdata, 0, sizeof(auxdata));
++      auxdata.size = cifsi->vfs_inode.i_size;
++      auxdata.last_write_time = cifsi->vfs_inode.i_ctime;
++
++      if (maxbuf > sizeof(auxdata))
++              maxbuf = sizeof(auxdata);
++
++      memcpy(buffer, &auxdata, maxbuf);
++
++      return maxbuf;
++}
++
++static enum
++fscache_checkaux cifs_fscache_inode_check_aux(void *cookie_netfs_data,
++                                            const void *data,
++                                            uint16_t datalen)
++{
++      struct cifs_fscache_inode_auxdata auxdata;
++      struct cifsInodeInfo *cifsi = cookie_netfs_data;
++
++      if (datalen != sizeof(auxdata))
++              return FSCACHE_CHECKAUX_OBSOLETE;
++
++      memset(&auxdata, 0, sizeof(auxdata));
++      auxdata.size = cifsi->vfs_inode.i_size;
++      auxdata.last_write_time = cifsi->vfs_inode.i_ctime;
++
++      if (memcmp(data, &auxdata, datalen) != 0)
++              return FSCACHE_CHECKAUX_OBSOLETE;
++
++      return FSCACHE_CHECKAUX_OKAY;
++}
++
++const struct fscache_cookie_def cifs_fscache_inode_object_def = {
++      .name           = "CIFS.uniqueid",
++      .type           = FSCACHE_COOKIE_TYPE_DATAFILE,
++      .get_key        = cifs_fscache_inode_get_key,
++      .get_attr       = cifs_fscache_inode_get_attr,
++      .get_aux        = cifs_fscache_inode_get_aux,
++      .check_aux      = cifs_fscache_inode_check_aux,
++};
+Index: cifs-2.6/fs/cifs/cifsfs.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsfs.c
++++ cifs-2.6/fs/cifs/cifsfs.c
+@@ -330,6 +330,12 @@ cifs_destroy_inode(struct inode *inode)
+ }
+ static void
++cifs_clear_inode(struct inode *inode)
++{
++      cifs_fscache_release_inode_cookie(inode);
++}
++
++static void
+ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
+ {
+       seq_printf(s, ",addr=");
+@@ -490,6 +496,7 @@ static const struct super_operations cif
+       .alloc_inode = cifs_alloc_inode,
+       .destroy_inode = cifs_destroy_inode,
+       .drop_inode     = cifs_drop_inode,
++      .clear_inode    = cifs_clear_inode,
+ /*    .delete_inode   = cifs_delete_inode,  */  /* Do not need above
+       function unless later we add lazy close of inodes or unless the
+       kernel forgets to call us with the same number of releases (closes)
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -407,6 +407,9 @@ struct cifsInodeInfo {
+       bool invalid_mapping:1;         /* pagecache is invalid */
+       u64  server_eof;                /* current file size on server */
+       u64  uniqueid;                  /* server inode number */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie *fscache;
++#endif
+       struct inode vfs_inode;
+ };
+Index: cifs-2.6/fs/cifs/file.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/file.c
++++ cifs-2.6/fs/cifs/file.c
+@@ -40,6 +40,7 @@
+ #include "cifs_unicode.h"
+ #include "cifs_debug.h"
+ #include "cifs_fs_sb.h"
++#include "fscache.h"
+ static inline int cifs_convert_flags(unsigned int flags)
+ {
+@@ -282,6 +283,9 @@ int cifs_open(struct inode *inode, struc
+                               CIFSSMBClose(xid, tcon, netfid);
+                               rc = -ENOMEM;
+                       }
++
++                      cifs_fscache_set_inode_cookie(inode, file);
++
+                       goto out;
+               } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
+                       if (tcon->ses->serverNOS)
+@@ -373,6 +377,8 @@ int cifs_open(struct inode *inode, struc
+               goto out;
+       }
++      cifs_fscache_set_inode_cookie(inode, file);
++
+       if (oplock & CIFS_CREATE_ACTION) {
+               /* time to set mode which we can not set earlier due to
+                  problems creating new read-only files */
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.c
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -62,3 +62,71 @@ void cifs_fscache_release_super_cookie(s
+       tcon->fscache = NULL;
+ }
++static void cifs_fscache_enable_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
++
++      if (cifsi->fscache)
++              return;
++
++      cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
++                              &cifs_fscache_inode_object_def,
++                              cifsi);
++      cFYI(1, "CIFS: got FH cookie (0x%p/0x%p/0x%p)\n",
++                      cifs_sb->tcon, cifsi, cifsi->fscache);
++}
++
++void cifs_fscache_release_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++      if (cifsi->fscache) {
++              cFYI(1, "CIFS releasing inode cookie (0x%p/0x%p)\n",
++                              cifsi, cifsi->fscache);
++              fscache_relinquish_cookie(cifsi->fscache, 0);
++              cifsi->fscache = NULL;
++      }
++}
++
++static void cifs_fscache_disable_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++
++      if (cifsi->fscache) {
++              cFYI(1, "CIFS disabling inode cookie (0x%p/0x%p)\n",
++                              cifsi, cifsi->fscache);
++              fscache_relinquish_cookie(cifsi->fscache, 1);
++              cifsi->fscache = NULL;
++      }
++}
++
++void cifs_fscache_set_inode_cookie(struct inode *inode, struct file *filp)
++{
++      /* BB: parallel opens - need locking? */
++      if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
++              cifs_fscache_disable_inode_cookie(inode);
++      else {
++              cifs_fscache_enable_inode_cookie(inode);
++              cFYI(1, "CIFS: fscache inode cookie set\n");
++      }
++}
++
++void cifs_fscache_reset_inode_cookie(struct inode *inode)
++{
++      struct cifsInodeInfo *cifsi = CIFS_I(inode);
++      struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
++      struct fscache_cookie *old = cifsi->fscache;
++
++      if (cifsi->fscache) {
++              /* retire the current fscache cache and get a new one */
++              fscache_relinquish_cookie(cifsi->fscache, 1);
++
++              cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
++                                      &cifs_fscache_inode_object_def,
++                                      cifsi);
++              cFYI(1, "CIFS: new cookie (0x%p/0x%p) oldcookie 0x%p\n",
++                              cifsi, cifsi->fscache, old);
++      }
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -29,6 +29,8 @@
+ extern struct fscache_netfs cifs_fscache_netfs;
+ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+ extern const struct fscache_cookie_def cifs_fscache_super_index_def;
++extern const struct fscache_cookie_def cifs_fscache_inode_object_def;
++
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -41,6 +43,10 @@ extern void cifs_fscache_release_client_
+ extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *);
+ extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *);
++extern void cifs_fscache_release_inode_cookie(struct inode *);
++extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
++extern void cifs_fscache_reset_inode_cookie(struct inode *);
++
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+ static inline void cifs_fscache_unregister(void) {}
+@@ -53,6 +59,12 @@ static inline void cifs_fscache_get_supe
+ static inline void
+ cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {}
++static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
++static inline void cifs_fscache_set_inode_cookie(struct inode *inode,
++                      struct file *filp) {}
++static inline void cifs_fscache_reset_inode_cookie(struct inode *inode) {}
++
++
+ #endif /* CONFIG_CIFS_FSCACHE */
+ #endif /* _CIFS_FSCACHE_H */
+Index: cifs-2.6/fs/cifs/inode.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/inode.c
++++ cifs-2.6/fs/cifs/inode.c
+@@ -29,6 +29,7 @@
+ #include "cifsproto.h"
+ #include "cifs_debug.h"
+ #include "cifs_fs_sb.h"
++#include "fscache.h"
+ static void cifs_set_ops(struct inode *inode, const bool is_dfs_referral)
+@@ -776,6 +777,8 @@ retry_iget5_locked:
+                       inode->i_flags |= S_NOATIME | S_NOCMTIME;
+               if (inode->i_state & I_NEW) {
+                       inode->i_ino = hash;
++                      /* initialize per-inode cache cookie pointer */
++                      CIFS_I(inode)->fscache = NULL;
+                       unlock_new_inode(inode);
+               }
+       }
+@@ -1568,6 +1571,7 @@ cifs_invalidate_mapping(struct inode *in
+                       cifs_i->write_behind_rc = rc;
+       }
+       invalidate_remote_inode(inode);
++      cifs_fscache_reset_inode_cookie(inode);
+ }
+ int cifs_revalidate_file(struct file *filp)
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001740:2, b/test/corpora/lkml/cur/1382298770.001740:2,
new file mode 100644 (file)
index 0000000..ef0f657
--- /dev/null
@@ -0,0 +1,214 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Tue, 22 Jun 2010 20:53:26 +0530
+Lines: 177
+Message-ID: <1277220206-3559-1-git-send-email-sjayaraman@suse.de>
+References: <yes>
+Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:45:50 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OR5fZ-0000Vj-Mj
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:45:50 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752511Ab0FVPpJ (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 11:45:09 -0400
+Received: from victor.provo.novell.com ([137.65.250.26]:56189 "EHLO
+       victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752441Ab0FVPoA (ORCPT
+       <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
+       Tue, 22 Jun 2010 11:44:00 -0400
+Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
+       by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:23:29 -0600
+X-Mailer: git-send-email 1.6.4.2
+In-Reply-To: <yes>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001766>
+
+Define superblock-level cache index objects (managed by cifsTconInfo structs).
+Each superblock object is created in a server-level index object and in itself
+an index into which inode-level objects are inserted.
+
+Currently, the superblock objects are keyed by sharename.
+
+Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+---
+ fs/cifs/cache.c    |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ fs/cifs/cifsglob.h |    3 ++
+ fs/cifs/connect.c  |    4 +++
+ fs/cifs/fscache.c  |   17 ++++++++++++++
+ fs/cifs/fscache.h  |    6 +++++
+ 5 files changed, 92 insertions(+)
+
+Index: cifs-2.6/fs/cifs/cache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cache.c
++++ cifs-2.6/fs/cifs/cache.c
+@@ -76,3 +76,65 @@ const struct fscache_cookie_def cifs_fsc
+       .type = FSCACHE_COOKIE_TYPE_INDEX,
+       .get_key = cifs_server_get_key,
+ };
++
++static char *extract_sharename(const char *treename)
++{
++      const char *src;
++      char *delim, *dst;
++      int len;
++
++      /* skip double chars at the beginning */
++      src = treename + 2;
++
++      /* share name is always preceded by '\\' now */
++      delim = strchr(src, '\\');
++      if (!delim)
++              return ERR_PTR(-EINVAL);
++      delim++;
++      len = strlen(delim);
++
++      /* caller has to free the memory */
++      dst = kstrndup(delim, len, GFP_KERNEL);
++      if (!dst)
++              return ERR_PTR(-ENOMEM);
++
++      return dst;
++}
++
++/*
++ * Superblock object currently keyed by share name
++ */
++static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,
++                                 uint16_t maxbuf)
++{
++      const struct cifsTconInfo *tcon = cookie_netfs_data;
++      char *sharename;
++      uint16_t len;
++
++      sharename = extract_sharename(tcon->treeName);
++      if (IS_ERR(sharename)) {
++              cFYI(1, "CIFS: couldn't extract sharename\n");
++              sharename = NULL;
++              return 0;
++      }
++
++      len = strlen(sharename);
++      if (len > maxbuf)
++              return 0;
++
++      memcpy(buffer, sharename, len);
++
++      kfree(sharename);
++
++      return len;
++}
++
++/*
++ * Superblock object for FS-Cache
++ */
++const struct fscache_cookie_def cifs_fscache_super_index_def = {
++      .name = "CIFS.super",
++      .type = FSCACHE_COOKIE_TYPE_INDEX,
++      .get_key = cifs_super_get_key,
++};
++
+Index: cifs-2.6/fs/cifs/cifsglob.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/cifsglob.h
++++ cifs-2.6/fs/cifs/cifsglob.h
+@@ -317,6 +317,9 @@ struct cifsTconInfo {
+       bool local_lease:1; /* check leases (only) on local system not remote */
+       bool broken_posix_open; /* e.g. Samba server versions < 3.3.2, 3.2.9 */
+       bool need_reconnect:1; /* connection reset, tid now invalid */
++#ifdef CONFIG_CIFS_FSCACHE
++      struct fscache_cookie *fscache; /* cookie for share */
++#endif
+       /* BB add field for back pointer to sb struct(s)? */
+ };
+Index: cifs-2.6/fs/cifs/connect.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/connect.c
++++ cifs-2.6/fs/cifs/connect.c
+@@ -1773,6 +1773,8 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
+       list_del_init(&tcon->tcon_list);
+       write_unlock(&cifs_tcp_ses_lock);
++      cifs_fscache_release_super_cookie(tcon);
++
+       xid = GetXid();
+       CIFSSMBTDis(xid, tcon);
+       _FreeXid(xid);
+@@ -1843,6 +1845,8 @@ cifs_get_tcon(struct cifsSesInfo *ses, s
+       tcon->nocase = volume_info->nocase;
+       tcon->local_lease = volume_info->local_lease;
++      cifs_fscache_get_super_cookie(tcon);
++
+       write_lock(&cifs_tcp_ses_lock);
+       list_add(&tcon->tcon_list, &ses->tcon_list);
+       write_unlock(&cifs_tcp_ses_lock);
+Index: cifs-2.6/fs/cifs/fscache.c
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.c
++++ cifs-2.6/fs/cifs/fscache.c
+@@ -45,3 +45,20 @@ void cifs_fscache_release_client_cookie(
+       server->fscache = NULL;
+ }
++void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
++{
++      tcon->fscache =
++              fscache_acquire_cookie(tcon->ses->server->fscache,
++                              &cifs_fscache_super_index_def, tcon);
++      cFYI(1, "CIFS: get superblock cookie (0x%p/0x%p)\n",
++                              tcon, tcon->fscache);
++}
++
++void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon)
++{
++      cFYI(1, "CIFS: releasing superblock cookie (0x%p/0x%p)\n",
++                      tcon, tcon->fscache);
++      fscache_relinquish_cookie(tcon->fscache, 0);
++      tcon->fscache = NULL;
++}
++
+Index: cifs-2.6/fs/cifs/fscache.h
+===================================================================
+--- cifs-2.6.orig/fs/cifs/fscache.h
++++ cifs-2.6/fs/cifs/fscache.h
+@@ -28,6 +28,7 @@
+ extern struct fscache_netfs cifs_fscache_netfs;
+ extern const struct fscache_cookie_def cifs_fscache_server_index_def;
++extern const struct fscache_cookie_def cifs_fscache_super_index_def;
+ extern int cifs_fscache_register(void);
+ extern void cifs_fscache_unregister(void);
+@@ -37,6 +38,8 @@ extern void cifs_fscache_unregister(void
+  */
+ extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
+ extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
++extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *);
++extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *);
+ #else /* CONFIG_CIFS_FSCACHE */
+ static inline int cifs_fscache_register(void) { return 0; }
+@@ -46,6 +49,9 @@ static inline void
+ cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
+ static inline void
+ cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
++static inline void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) {}
++static inline void
++cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {}
+ #endif /* CONFIG_CIFS_FSCACHE */
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001887:2, b/test/corpora/lkml/cur/1382298770.001887:2,
new file mode 100644 (file)
index 0000000..8129048
--- /dev/null
@@ -0,0 +1,85 @@
+From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+Subject: Re: [RFC][PATCH 02/10] cifs: guard cifsglob.h against multiple
+ inclusion
+Date: Tue, 22 Jun 2010 17:37:42 -0400
+Lines: 35
+Message-ID: <20100622173742.448e1e94@corrin.poochiereds.net>
+References: <yes>
+       <1277220170-3442-1-git-send-email-sjayaraman@suse.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 23:36:08 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORB8Z-00027v-R8
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 23:36:08 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751663Ab0FVVfq (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 17:35:46 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:46190 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751933Ab0FVVfo (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Tue, 22 Jun 2010 17:35:44 -0400
+X-Authority-Analysis: v=1.0 c=1 a=Y4kVDsoNLLAA:10 a=yQWWgrYGNuUA:10 a=kj9zAlcOel0A:10 a=hGzw-44bAAAA:8 a=6UT2YofcClCzWf3PPoQA:9 a=Ipo6nwFRv7ENfF13HvmH_iG48b8A:4 a=CjuIK1q_8ugA:10 a=0kPLrQdw3YYA:10 a=dowx1zmaLagA:10
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:49036] helo=mail.poochiereds.net)
+       by cdptpa-oedge01.mail.rr.com (envelope-from <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id 29/22-24471-DAC212C4; Tue, 22 Jun 2010 21:35:42 +0000
+Received: from corrin.poochiereds.net (unknown [65.88.2.5])
+       by mail.poochiereds.net (Postfix) with ESMTPSA id 1C5A1580F4;
+       Tue, 22 Jun 2010 17:35:41 -0400 (EDT)
+In-Reply-To: <1277220170-3442-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001913>
+
+On Tue, 22 Jun 2010 20:52:50 +0530
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Add conditional compile macros to guard the header file against multiple
+> inclusion.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> ---
+>  fs/cifs/cifsglob.h |    5 +++++
+>  1 files changed, 5 insertions(+), 0 deletions(-)
+> 
+> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+> index a88479c..6b2c39d 100644
+> --- a/fs/cifs/cifsglob.h
+> +++ b/fs/cifs/cifsglob.h
+> @@ -16,6 +16,9 @@
+>   *   the GNU Lesser General Public License for more details.
+>   *
+>   */
+> +#ifndef _CIFS_GLOB_H
+> +#define _CIFS_GLOB_H
+> +
+>  #include <linux/in.h>
+>  #include <linux/in6.h>
+>  #include <linux/slab.h>
+> @@ -733,3 +736,5 @@ GLOBAL_EXTERN unsigned int cifs_min_small;  /* min size of small buf pool */
+>  GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/
+>  
+>  extern const struct slow_work_ops cifs_oplock_break_ops;
+> +
+> +#endif      /* _CIFS_GLOB_H */
+
+Strong ACK
+
+Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298770.001892:2, b/test/corpora/lkml/cur/1382298770.001892:2,
new file mode 100644 (file)
index 0000000..82603bf
--- /dev/null
@@ -0,0 +1,254 @@
+From: Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
+Subject: Re: [RFC][PATCH 04/10] cifs: define server-level cache index
+ objects and register them with FS-Cache
+Date: Tue, 22 Jun 2010 17:52:14 -0400
+Lines: 204
+Message-ID: <20100622175214.4c56234f@corrin.poochiereds.net>
+References: <yes>
+       <1277220198-3522-1-git-send-email-sjayaraman@suse.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 23:50:23 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORBMJ-0005WJ-Lj
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 23:50:20 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1750777Ab0FVVuS (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Tue, 22 Jun 2010 17:50:18 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:55670 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1750749Ab0FVVuR (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Tue, 22 Jun 2010 17:50:17 -0400
+X-Authority-Analysis: v=1.1 cv=8MuG1bpxLlSbaYWWtODGdBCK7StbFcRsMXhWm1NVx/I= c=1 sm=0 a=wpY4Lvx3kJcA:10 a=UBIxAjGgU1YA:10 a=kj9zAlcOel0A:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=VwQbUJbxAAAA:8 a=qYub2k57AAAA:8 a=uYIlwBZcjrF9BUCsR4kA:9 a=OO1ZLbZb6q4TPdC5pcAA:7 a=jFshslHAf8hJVDYUYRlYN4n-w5YA:4 a=CjuIK1q_8ugA:10 a=x8gzFH9gYPwA:10 a=0kPLrQdw3YYA:10 a=jBoGP612-tUA:10 a=t5DF_bUGhurCx8LQ:21 a=W6P_Gh1y2IibdbqZ:21 a=ld/erqUjW76FpBUqCqkKeA==:117
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:59154] helo=mail.poochiereds.net)
+       by cdptpa-oedge03.mail.rr.com (envelope-from <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id AC/10-00502-710312C4; Tue, 22 Jun 2010 21:50:16 +0000
+Received: from corrin.poochiereds.net (unknown [65.88.2.5])
+       by mail.poochiereds.net (Postfix) with ESMTPSA id 03B11580F4;
+       Tue, 22 Jun 2010 17:50:14 -0400 (EDT)
+In-Reply-To: <1277220198-3522-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001918>
+
+On Tue, 22 Jun 2010 20:53:18 +0530
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define server-level cache index objects (as managed by TCP_ServerInfo structs).
+> Each server object is created in the CIFS top-level index object and is itself
+> an index into which superblock-level objects are inserted.
+> 
+> Currently, the server objects are keyed by hostname.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> ---
+>  fs/cifs/Makefile   |    2 +-
+>  fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
+>  fs/cifs/cifsglob.h |    3 +++
+>  fs/cifs/connect.c  |    4 ++++
+>  fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+>  fs/cifs/fscache.h  |   12 ++++++++++++
+>  6 files changed, 92 insertions(+), 1 deletion(-)
+>  create mode 100644 fs/cifs/fscache.c
+> 
+> Index: cifs-2.6/fs/cifs/Makefile
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/Makefile
+> +++ cifs-2.6/fs/cifs/Makefile
+> @@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
+>  
+>  cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
+>  
+> -cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
+> +cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
+> Index: cifs-2.6/fs/cifs/cache.c
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/cache.c
+> +++ cifs-2.6/fs/cifs/cache.c
+> @@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
+>      fscache_unregister_netfs(&cifs_fscache_netfs);
+>  }
+>  
+> +/*
+> + * Server object currently keyed by hostname
+> + */
+> +static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
+> +                               void *buffer, uint16_t maxbuf)
+> +{
+> +    const struct TCP_Server_Info *server = cookie_netfs_data;
+> +    uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
+> +
+
+Would a tuple of address/family/port be a better choice here? Imagine I
+mount "foo" and then later mount "foor.bar.baz". If they are the same
+address and only the UNC differs, then you won't get the benefit of
+the cache, right?
+
+> +    if (len > maxbuf)
+> +            return 0;
+> +
+> +    memcpy(buffer, server->hostname, len);
+> +
+> +    return len;
+> +}
+> +
+> +/*
+> + * Server object for FS-Cache
+> + */
+> +const struct fscache_cookie_def cifs_fscache_server_index_def = {
+> +    .name = "CIFS.server",
+> +    .type = FSCACHE_COOKIE_TYPE_INDEX,
+> +    .get_key = cifs_server_get_key,
+> +};
+> Index: cifs-2.6/fs/cifs/cifsglob.h
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/cifsglob.h
+> +++ cifs-2.6/fs/cifs/cifsglob.h
+> @@ -193,6 +193,9 @@ struct TCP_Server_Info {
+>      bool    sec_mskerberos;         /* supports legacy MS Kerberos */
+>      bool    sec_kerberosu2u;        /* supports U2U Kerberos */
+>      bool    sec_ntlmssp;            /* supports NTLMSSP */
+> +#ifdef CONFIG_CIFS_FSCACHE
+> +    struct fscache_cookie   *fscache; /* client index cache cookie */
+> +#endif
+>  };
+>  
+>  /*
+> Index: cifs-2.6/fs/cifs/connect.c
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/connect.c
+> +++ cifs-2.6/fs/cifs/connect.c
+> @@ -48,6 +48,7 @@
+>  #include "nterr.h"
+>  #include "rfc1002pdu.h"
+>  #include "cn_cifs.h"
+> +#include "fscache.h"
+>  
+>  #define CIFS_PORT 445
+>  #define RFC1001_PORT 139
+> @@ -1453,6 +1454,8 @@ cifs_put_tcp_session(struct TCP_Server_I
+>              return;
+>      }
+>  
+> +    cifs_fscache_release_client_cookie(server);
+> +
+>      list_del_init(&server->tcp_ses_list);
+>      write_unlock(&cifs_tcp_ses_lock);
+>  
+> @@ -1572,6 +1575,7 @@ cifs_get_tcp_session(struct smb_vol *vol
+>              goto out_err;
+>      }
+>  
+> +    cifs_fscache_get_client_cookie(tcp_ses);
+>      /* thread spawned, put it on the list */
+>      write_lock(&cifs_tcp_ses_lock);
+>      list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
+> Index: cifs-2.6/fs/cifs/fscache.c
+> ===================================================================
+> --- /dev/null
+> +++ cifs-2.6/fs/cifs/fscache.c
+> @@ -0,0 +1,47 @@
+> +/*
+> + *   fs/cifs/fscache.c - CIFS filesystem cache interface
+> + *
+> + *   Copyright (c) 2010 Novell, Inc.
+> + *   Authors(s): Suresh Jayaraman (sjayaraman-l3A5Bk7waGM@public.gmane.org>
+> + *
+> + *   This library is free software; you can redistribute it and/or modify
+> + *   it under the terms of the GNU Lesser General Public License as published
+> + *   by the Free Software Foundation; either version 2.1 of the License, or
+> + *   (at your option) any later version.
+> + *
+> + *   This library is distributed in the hope that it will be useful,
+> + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+> + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+> + *   the GNU Lesser General Public License for more details.
+> + *
+> + *   You should have received a copy of the GNU Lesser General Public License
+> + *   along with this library; if not, write to the Free Software
+> + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+> + */
+> +#include <linux/init.h>
+> +#include <linux/kernel.h>
+> +#include <linux/sched.h>
+> +#include <linux/mm.h>
+> +#include <linux/in6.h>
+> +
+> +#include "fscache.h"
+> +#include "cifsglob.h"
+> +#include "cifs_debug.h"
+> +
+> +void cifs_fscache_get_client_cookie(struct TCP_Server_Info *server)
+> +{
+> +    server->fscache =
+> +            fscache_acquire_cookie(cifs_fscache_netfs.primary_index,
+> +                            &cifs_fscache_server_index_def, server);
+> +    cFYI(1, "CIFS: get client cookie (0x%p/0x%p)\n",
+> +                            server, server->fscache);
+> +}
+> +
+> +void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
+> +{
+> +    cFYI(1, "CIFS: release client cookie (0x%p/0x%p)\n",
+> +                            server, server->fscache);
+> +    fscache_relinquish_cookie(server->fscache, 0);
+> +    server->fscache = NULL;
+> +}
+> +
+> Index: cifs-2.6/fs/cifs/fscache.h
+> ===================================================================
+> --- cifs-2.6.orig/fs/cifs/fscache.h
+> +++ cifs-2.6/fs/cifs/fscache.h
+> @@ -27,14 +27,26 @@
+>  #ifdef CONFIG_CIFS_FSCACHE
+>  
+>  extern struct fscache_netfs cifs_fscache_netfs;
+> +extern const struct fscache_cookie_def cifs_fscache_server_index_def;
+>  
+>  extern int cifs_fscache_register(void);
+>  extern void cifs_fscache_unregister(void);
+>  
+> +/*
+> + * fscache.c
+> + */
+> +extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
+> +extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
+> +
+>  #else /* CONFIG_CIFS_FSCACHE */
+>  static inline int cifs_fscache_register(void) { return 0; }
+>  static inline void cifs_fscache_unregister(void) {}
+>  
+> +static inline void
+> +cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
+> +static inline void
+> +cifs_fscache_get_client_cookie(struct TCP_Server_Info *server); {}
+> +
+>  #endif /* CONFIG_CIFS_FSCACHE */
+>  
+>  #endif /* _CIFS_FSCACHE_H */
+> --
+> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
+> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+> More majordomo info at  http://vger.kernel.org/majordomo-info.html
+> 
+
+
+-- 
+Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002189:2, b/test/corpora/lkml/cur/1382298770.002189:2,
new file mode 100644 (file)
index 0000000..3cfc62e
--- /dev/null
@@ -0,0 +1,66 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 03/10] cifs: register CIFS for caching
+Date: Wed, 23 Jun 2010 17:51:17 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 20
+Message-ID: <9603.1277311877@redhat.com>
+References: <1277220189-3485-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 18:51:32 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTAg-0008Bt-CT
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 18:51:30 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751915Ab0FWQv3 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 12:51:29 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50923 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751520Ab0FWQv3 (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 12:51:29 -0400
+Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGpLFc028550
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 12:51:21 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGpHIG010890;
+       Wed, 23 Jun 2010 12:51:18 -0400
+In-Reply-To: <1277220189-3485-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002219>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> +    rc = cifs_fscache_register();
+> +    if (rc)
+> +            goto out;
+> +
+>      rc = cifs_init_inodecache();
+>      if (rc)
+>              goto out_clean_proc;
+> @@ -949,8 +954,10 @@ init_cifs(void)
+>      cifs_destroy_mids();
+>   out_destroy_inodecache:
+>      cifs_destroy_inodecache();
+> +    cifs_fscache_unregister();
+>   out_clean_proc:
+
+This is incorrect.  You need to call cifs_fscache_unregister() if
+cifs_init_inodecache() fails.
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002191:2, b/test/corpora/lkml/cur/1382298770.002191:2,
new file mode 100644 (file)
index 0000000..56752a9
--- /dev/null
@@ -0,0 +1,65 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 04/10] cifs: define server-level cache index objects and register them with FS-Cache
+Date: Wed, 23 Jun 2010 17:54:52 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 19
+Message-ID: <9658.1277312092@redhat.com>
+References: <1277220198-3522-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Wed Jun 23 18:55:07 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1ORTE8-0002ll-VF
+       for lnx-linux-fsdevel@lo.gmane.org; Wed, 23 Jun 2010 18:55:05 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752263Ab0FWQzD (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Wed, 23 Jun 2010 12:55:03 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:18394 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751794Ab0FWQzB (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Wed, 23 Jun 2010 12:55:01 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGsu1L000993
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 12:54:56 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGsrUG016433;
+       Wed, 23 Jun 2010 12:54:54 -0400
+In-Reply-To: <1277220198-3522-1-git-send-email-sjayaraman@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002221>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Define server-level cache index objects (as managed by TCP_ServerInfo
+> structs).  Each server object is created in the CIFS top-level index object
+> and is itself an index into which superblock-level objects are inserted.
+> 
+> Currently, the server objects are keyed by hostname.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+
+Looks reasonable, apart from the index key.  I agree with Jeff that you
+probably want {address,port,family} rather than a hostname.
+
+David
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002193:2, b/test/corpora/lkml/cur/1382298770.002193:2,
new file mode 100644 (file)
index 0000000..e2ea626
--- /dev/null
@@ -0,0 +1,59 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Wed, 23 Jun 2010 17:58:10 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <9720.1277312290@redhat.com>
+References: <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 18:58:19 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTHG-0003Az-Ge
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 18:58:18 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751520Ab0FWQ6R (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 12:58:17 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:62343 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751372Ab0FWQ6R (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 12:58:17 -0400
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGwDC2031683
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 12:58:13 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NGwAfq021298;
+       Wed, 23 Jun 2010 12:58:11 -0400
+In-Reply-To: <1277220206-3559-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002223>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define superblock-level cache index objects (managed by cifsTconInfo
+> structs).  Each superblock object is created in a server-level index object
+> and in itself an index into which inode-level objects are inserted.
+> 
+> Currently, the superblock objects are keyed by sharename.
+
+Seems reasonable.  Is there any way you can check that the share you are
+looking at on a server is the same as the last time you looked?  Can you
+validate the root directory of the share in some way?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002194:2, b/test/corpora/lkml/cur/1382298770.002194:2,
new file mode 100644 (file)
index 0000000..d2d1efd
--- /dev/null
@@ -0,0 +1,61 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Wed, 23 Jun 2010 18:02:53 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 15
+Message-ID: <9822.1277312573@redhat.com>
+References: <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:03:04 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTLr-0007Bh-Cs
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:03:03 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752063Ab0FWRDB (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:03:01 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:30823 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRDA (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:03:00 -0400
+Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH2v0J030982
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:02:57 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH2r9N014323;
+       Wed, 23 Jun 2010 13:02:54 -0400
+In-Reply-To: <1277220214-3597-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002224>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Define inode-level data storage objects (managed by cifsInodeInfo structs).
+> Each inode-level object is created in a super-block level object and is
+> itself a data storage object in to which pages from the inode are stored.
+> 
+> The inode object is keyed by UniqueId. The coherency data being used is
+> LastWriteTime and the file size.
+
+Isn't there a file creation time too?
+
+I take it you don't support caching on files that are open for writing at this
+time?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002195:2, b/test/corpora/lkml/cur/1382298770.002195:2,
new file mode 100644 (file)
index 0000000..ec54a81
--- /dev/null
@@ -0,0 +1,59 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 07/10] cifs: FS-Cache page management
+Date: Wed, 23 Jun 2010 18:05:01 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <9866.1277312701@redhat.com>
+References: <1277220228-3635-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Wed Jun 23 19:05:19 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1ORTNz-0008Oj-Ho
+       for lnx-linux-fsdevel@lo.gmane.org; Wed, 23 Jun 2010 19:05:15 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752145Ab0FWRFO (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Wed, 23 Jun 2010 13:05:14 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:1689 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRFN (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Wed, 23 Jun 2010 13:05:13 -0400
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH59sl011966
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:05:09 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH52Jl022163;
+       Wed, 23 Jun 2010 13:05:03 -0400
+In-Reply-To: <1277220228-3635-1-git-send-email-sjayaraman@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002225>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Takes care of invalidation and release of FS-Cache marked pages and also
+> invalidation of the FsCache page flag when the inode is removed.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+
+Acked-by: David Howells <dhowells@redhat.com>
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002196:2, b/test/corpora/lkml/cur/1382298770.002196:2,
new file mode 100644 (file)
index 0000000..63838dc
--- /dev/null
@@ -0,0 +1,54 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 08/10] cifs: store pages into local cache
+Date: Wed, 23 Jun 2010 18:06:12 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 8
+Message-ID: <9890.1277312772@redhat.com>
+References: <1277220240-3674-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:06:21 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTP3-0000fp-01
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:06:21 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752403Ab0FWRGU (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:06:20 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:63621 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751804Ab0FWRGT (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:06:19 -0400
+Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH6FCB012081
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:06:15 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH6CKG013414;
+       Wed, 23 Jun 2010 13:06:13 -0400
+In-Reply-To: <1277220240-3674-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002226>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Store pages from an CIFS inode into the data storage object associated with
+> that inode.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+
+Acked-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002197:2, b/test/corpora/lkml/cur/1382298770.002197:2,
new file mode 100644 (file)
index 0000000..765c399
--- /dev/null
@@ -0,0 +1,53 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 09/10] cifs: read pages from FS-Cache
+Date: Wed, 23 Jun 2010 18:07:40 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 7
+Message-ID: <9918.1277312860@redhat.com>
+References: <1277220261-3717-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 19:07:51 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1ORTQR-0000nv-JF
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 19:07:47 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751708Ab0FWRHr (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Wed, 23 Jun 2010 13:07:47 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:34413 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1750954Ab0FWRHq (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Wed, 23 Jun 2010 13:07:46 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH7h3Y005904
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:07:43 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH7efR020683;
+       Wed, 23 Jun 2010 13:07:41 -0400
+In-Reply-To: <1277220261-3717-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002227>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> Read pages from a FS-Cache data storage object into a CIFS inode.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+
+Acked-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002201:2, b/test/corpora/lkml/cur/1382298770.002201:2,
new file mode 100644 (file)
index 0000000..bae1eef
--- /dev/null
@@ -0,0 +1,58 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Wed, 23 Jun 2010 18:08:34 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 12
+Message-ID: <9942.1277312914@redhat.com>
+References: <1277220309-3757-1-git-send-email-sjayaraman@suse.de> <yes>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 23 19:09:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1ORTRv-0002J8-2s
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 23 Jun 2010 19:09:19 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753275Ab0FWRIt (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 23 Jun 2010 13:08:49 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:6156 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753203Ab0FWRIr (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 23 Jun 2010 13:08:47 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH8dax006028
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 23 Jun 2010 13:08:39 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NH8YmA020846;
+       Wed, 23 Jun 2010 13:08:36 -0400
+In-Reply-To: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002231>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Add a mount option 'fsc' to enable local caching on CIFS.
+> 
+> As the cifs-utils (userspace) changes are not done yet, this patch enables
+> 'fsc' by default to assist testing.
+> 
+> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
+
+Acked-by: David Howells <dhowells@redhat.com>
+
+(Give or take the debugging bit)
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002878:2, b/test/corpora/lkml/cur/1382298770.002878:2,
new file mode 100644 (file)
index 0000000..66a3e22
--- /dev/null
@@ -0,0 +1,90 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
+Date: Fri, 25 Jun 2010 16:18:12 +0530
+Lines: 47
+Message-ID: <4C24896C.4000903@suse.de>
+References: <yes> <1277220309-3757-1-git-send-email-sjayaraman@suse.de> <4C225338.9010807@gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+To: Scott Lovenberg <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 12:48:27 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS6SO-0003QF-NW
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 12:48:25 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753965Ab0FYKsX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 06:48:23 -0400
+Received: from cantor.suse.de ([195.135.220.2]:46395 "EHLO mx1.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752612Ab0FYKsW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 06:48:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by mx1.suse.de (Postfix) with ESMTP id 60CED6CB00;
+       Fri, 25 Jun 2010 12:48:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <4C225338.9010807-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002912>
+
+On 06/24/2010 12:02 AM, Scott Lovenberg wrote:
+> On 6/22/2010 11:25 AM, Suresh Jayaraman wrote:
+>> Add a mount option 'fsc' to enable local caching on CIFS.
+>>
+>> As the cifs-utils (userspace) changes are not done yet, this patch
+>> enables
+>> 'fsc' by default to assist testing.
+>>    
+> [...]
+>> @@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const
+>> char *devname,
+>>               printk(KERN_WARNING "CIFS: Mount option noac not "
+>>                   "supported. Instead set "
+>>                   "/proc/fs/cifs/LookupCacheEnabled to 0\n");
+>> +        } else if (strnicmp(data, "fsc", 3) == 0) {
+>> +            vol->fsc = true;
+>>           } else
+>>               printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
+>>                           data);
+>> @@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol
+>> *pvolume_info,
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+>>       if (pvolume_info->dynperm)
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
+>> +    if (pvolume_info->fsc)
+>> +        cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
+>>       if (pvolume_info->direct_io) {
+>>           cFYI(1, "mounting share using direct i/o");
+>>           cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+>>    
+> I reworked the CIFS mount option parsing a while back; I'm not sure
+> whether that patch was going to be in the 2.6.35 tree or not (the window
+> just opened, didn't it?).
+
+Not a problem, I could redo this patch alone when the reworked option
+parsing patches get in.
+
+> Jeff, Steve, can you confirm if that patch is going to be in 2.6.35?
+> 
+> Patch refs: http://patchwork.ozlabs.org/patch/53059/  and
+> http://patchwork.ozlabs.org/patch/53674/
+> 
+
+Thanks,
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002879:2, b/test/corpora/lkml/cur/1382298770.002879:2,
new file mode 100644 (file)
index 0000000..5782037
--- /dev/null
@@ -0,0 +1,68 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 03/10] cifs: register CIFS for caching
+Date: Fri, 25 Jun 2010 16:26:22 +0530
+Lines: 26
+Message-ID: <4C248B56.8030207@suse.de>
+References: <1277220189-3485-1-git-send-email-sjayaraman@suse.de> <yes> <9603.1277311877@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 12:56:32 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS6aG-00066f-1L
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 12:56:32 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754188Ab0FYK4b (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 06:56:31 -0400
+Received: from cantor.suse.de ([195.135.220.2]:46564 "EHLO mx1.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753651Ab0FYK4a (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 06:56:30 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by mx1.suse.de (Postfix) with ESMTP id 17F1E6CB00;
+       Fri, 25 Jun 2010 12:56:30 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <9603.1277311877-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002913>
+
+On 06/23/2010 10:21 PM, David Howells wrote:
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+>> +   rc = cifs_fscache_register();
+>> +   if (rc)
+>> +           goto out;
+>> +
+>>     rc = cifs_init_inodecache();
+>>     if (rc)
+>>             goto out_clean_proc;
+>> @@ -949,8 +954,10 @@ init_cifs(void)
+>>     cifs_destroy_mids();
+>>   out_destroy_inodecache:
+>>     cifs_destroy_inodecache();
+>> +   cifs_fscache_unregister();
+>>   out_clean_proc:
+> 
+> This is incorrect.  You need to call cifs_fscache_unregister() if
+> cifs_init_inodecache() fails.
+> 
+
+Doh! I'll fix it.
+
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002911:2, b/test/corpora/lkml/cur/1382298770.002911:2,
new file mode 100644 (file)
index 0000000..8e172cb
--- /dev/null
@@ -0,0 +1,84 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index
+ objects and register them
+Date: Fri, 25 Jun 2010 18:14:16 +0530
+Lines: 41
+Message-ID: <4C24A4A0.90408@suse.de>
+References: <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 14:44:28 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8Gh-0005Bb-E2
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 14:44:27 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754703Ab0FYMo0 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 08:44:26 -0400
+Received: from cantor.suse.de ([195.135.220.2]:51036 "EHLO mx1.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754222Ab0FYMoZ (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 08:44:25 -0400
+Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by mx1.suse.de (Postfix) with ESMTP id E07FF8FEA2;
+       Fri, 25 Jun 2010 14:44:24 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <9720.1277312290-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002945>
+
+On 06/23/2010 10:28 PM, David Howells wrote:
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+>> Define superblock-level cache index objects (managed by cifsTconInfo
+>> structs).  Each superblock object is created in a server-level index object
+>> and in itself an index into which inode-level objects are inserted.
+>>
+>> Currently, the superblock objects are keyed by sharename.
+> 
+> Seems reasonable.  Is there any way you can check that the share you are
+> looking at on a server is the same as the last time you looked?  Can you
+
+Good point.
+
+I thought of using TID (Tree identifier; a unique ID for a resource in
+use by client) along with sharename. But, Server is free to reuse them
+when the tree connection closes and does not guarantee the same Tid for
+a particular resource across tree connections.
+
+Also, considering the UNC name of the resource (//server/share) may not
+be a good idea too as the cache will not be used when for e.g. IPaddress
+is used to mount.
+
+So, if a server does something like this:
+   - export a share 'foo' (original server path: /export/vol1/foo)
+   - client mounts and uses it
+   - server unexports the share 'foo'
+   - server exports 'foo' (original sever path: /export/vol2/foo)
+
+we have a bit of problem..
+
+> validate the root directory of the share in some way?
+> 
+
+I don't know if there is a way to do this.
+
+Thanks,
+
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002912:2, b/test/corpora/lkml/cur/1382298770.002912:2,
new file mode 100644 (file)
index 0000000..d9c761d
--- /dev/null
@@ -0,0 +1,65 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Fri, 25 Jun 2010 18:20:14 +0530
+Lines: 24
+Message-ID: <4C24A606.5040001@suse.de>
+References: <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 14:50:26 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8MR-0007EU-OS
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 14:50:24 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754607Ab0FYMuX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 08:50:23 -0400
+Received: from cantor2.suse.de ([195.135.220.15]:38716 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753675Ab0FYMuW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 08:50:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id B05E686A2E;
+       Fri, 25 Jun 2010 14:50:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <9822.1277312573-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002946>
+
+On 06/23/2010 10:32 PM, David Howells wrote:
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+>> Define inode-level data storage objects (managed by cifsInodeInfo structs).
+>> Each inode-level object is created in a super-block level object and is
+>> itself a data storage object in to which pages from the inode are stored.
+>>
+>> The inode object is keyed by UniqueId. The coherency data being used is
+>> LastWriteTime and the file size.
+> 
+> Isn't there a file creation time too?
+
+I think the creation time is currently being ignored as we won't be able
+to accomodate in POSIX stat struct.
+
+> I take it you don't support caching on files that are open for writing at this
+> time?
+> 
+
+Yes.
+
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002915:2, b/test/corpora/lkml/cur/1382298770.002915:2,
new file mode 100644 (file)
index 0000000..e43c909
--- /dev/null
@@ -0,0 +1,58 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Fri, 25 Jun 2010 13:55:49 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 12
+Message-ID: <22697.1277470549@redhat.com>
+References: <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 14:56:04 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8Rw-0002tq-3k
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 14:56:04 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1753622Ab0FYM4B (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 08:56:01 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50162 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752535Ab0FYM4B (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 08:56:01 -0400
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCtqOd018091
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 08:55:52 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCtn4G016466;
+       Fri, 25 Jun 2010 08:55:51 -0400
+In-Reply-To: <4C24A606.5040001-l3A5Bk7waGM@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002949>
+
+Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+
+> I think the creation time is currently being ignored as we won't be able
+> to accomodate in POSIX stat struct.
+
+The FS-Cache interface doesn't use the POSIX stat struct, but it could be
+really useful to save it and use it for cache coherency inside the kernel.
+
+Out of interest, what does Samba do when it comes to generating a creation time
+for UNIX where one does not exist?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002917:2, b/test/corpora/lkml/cur/1382298770.002917:2,
new file mode 100644 (file)
index 0000000..f7047f8
--- /dev/null
@@ -0,0 +1,67 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Fri, 25 Jun 2010 13:58:33 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 21
+Message-ID: <22746.1277470713@redhat.com>
+References: <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Fri Jun 25 15:02:20 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with smtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OS8Xz-000628-FG
+       for lnx-linux-fsdevel@lo.gmane.org; Fri, 25 Jun 2010 15:02:19 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755357Ab0FYM6k (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Fri, 25 Jun 2010 08:58:40 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:50417 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754086Ab0FYM6j (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Fri, 25 Jun 2010 08:58:39 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCwa7Z005113
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 08:58:36 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PCwXVB011094;
+       Fri, 25 Jun 2010 08:58:34 -0400
+In-Reply-To: <4C24A4A0.90408@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002951>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Also, considering the UNC name of the resource (//server/share) may not
+> be a good idea too as the cache will not be used when for e.g. IPaddress
+> is used to mount.
+
+You could convert the UNC name to an IP address, and just use that as your
+key.
+
+> > validate the root directory of the share in some way?
+>
+> I don't know if there is a way to do this.
+
+Is there an inode number or something?  Even the creation time might do.
+
+David
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002930:2, b/test/corpora/lkml/cur/1382298770.002930:2,
new file mode 100644 (file)
index 0000000..2041016
--- /dev/null
@@ -0,0 +1,81 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Fri, 25 Jun 2010 14:26:52 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 35
+Message-ID: <23204.1277472412@redhat.com>
+References: <22746.1277470713@redhat.com> <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>,
+       Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: unlisted-recipients:; (no To-header on input)
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 15:27:01 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OS8vt-0000Xv-FL
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 15:27:01 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1755944Ab0FYN1A (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 09:27:00 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:15634 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1755398Ab0FYN07 (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 09:26:59 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PDQu1D020638
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 09:26:56 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PDQruU018472;
+       Fri, 25 Jun 2010 09:26:54 -0400
+In-Reply-To: <22746.1277470713-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1002964>
+
+David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
+
+> > > validate the root directory of the share in some way?
+> >
+> > I don't know if there is a way to do this.
+> 
+> Is there an inode number or something?  Even the creation time might do.
+
+Looking in cifspdu.h, there are a number of things that it might be possible
+to use.
+
+ (1) FILE_ALL_INFO: CreationTime, IndexNumber, IndexNumber1, FileName
+     (assuming this isn't flattened to '\' or something for the root of a
+     share.
+
+ (2) FILE_UNIX_BASIC_INFO: DevMajor, DevMinor, UniqueId.
+
+ (3) FILE_INFO_STANDARD: CreationDate, CreationTime.
+
+ (4) FILE_INFO_BASIC: CreationTime.
+
+ (5) FILE_DIRECTORY_INFO: FileIndex, CreationTime, FileName.
+
+ (6) SEARCH_ID_FULL_DIR_INFO: FileIndex, CreationTime, UniqueId, FileName.
+
+ (7) FILE_BOTH_DIRECTORY_INFO: FileIndex, CreationTime, ShortName, FileName.
+
+ (8) OPEN_RSP_EXT: Fid, CreationTime, VolumeGUID, FileId.
+
+You may have to choose different sets of things, depending on what the server
+has on offer.  Also, don't forget, if you can't work out whether a share is
+coherent or not from the above, you can always use LastWriteTime, ChangeTime
+and EndOfFile and just discard the whole subtree if they differ.
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.002997:2, b/test/corpora/lkml/cur/1382298770.002997:2,
new file mode 100644 (file)
index 0000000..b78073c
--- /dev/null
@@ -0,0 +1,90 @@
+From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Fri, 25 Jun 2010 12:53:06 -0400
+Lines: 36
+Message-ID: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+References: <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+       <yes>
+       <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>,
+       Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Jun 25 18:53:12 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSC9P-0005Eb-SU
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Fri, 25 Jun 2010 18:53:12 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S932199Ab0FYQxK (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 12:53:10 -0400
+Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.122]:53512 "EHLO
+       cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S932187Ab0FYQxJ (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Fri, 25 Jun 2010 12:53:09 -0400
+X-Authority-Analysis: v=1.0 c=1 a=iVNVO0OCT3kA:10 a=yQWWgrYGNuUA:10 a=kj9zAlcOel0A:10 a=20KFwNOVAAAA:8 a=hGzw-44bAAAA:8 a=f0L6POiToRdS6aViIA4A:9 a=tdNtT7bw1iHNm6ggrCkIte35EhAA:4 a=CjuIK1q_8ugA:10 a=jEp0ucaQiEUA:10 a=0kPLrQdw3YYA:10 a=dowx1zmaLagA:10 a=00U40p1LBqVLw4jT:21 a=gh7LVOPznGai4vo_:21
+X-Cloudmark-Score: 0
+X-Originating-IP: 71.70.153.3
+Received: from [71.70.153.3] ([71.70.153.3:42266] helo=mail.poochiereds.net)
+       by cdptpa-oedge01.mail.rr.com (envelope-from <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>)
+       (ecelerity 2.2.2.39 r()) with ESMTP
+       id 2D/E0-24471-3FED42C4; Fri, 25 Jun 2010 16:53:08 +0000
+Received: from tlielax.poochiereds.net (tlielax.poochiereds.net [192.168.1.3])
+       by mail.poochiereds.net (Postfix) with ESMTPS id E9B19580FA;
+       Fri, 25 Jun 2010 12:53:06 -0400 (EDT)
+In-Reply-To: <22697.1277470549-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-redhat-linux-gnu)
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003033>
+
+On Fri, 25 Jun 2010 13:55:49 +0100
+David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
+
+> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
+> 
+> > I think the creation time is currently being ignored as we won't be able
+> > to accomodate in POSIX stat struct.
+> 
+> The FS-Cache interface doesn't use the POSIX stat struct, but it could be
+> really useful to save it and use it for cache coherency inside the kernel.
+> 
+> Out of interest, what does Samba do when it comes to generating a creation time
+> for UNIX where one does not exist?
+> 
+
+(cc'ing samba-technical since we're talking about the create time)
+
+Looks like it mostly uses the ctime. IMO, the mtime would be a better
+choice since it changes less frequently, but I don't guess that it
+matters very much.
+
+I have a few patches that make the cifs_iget code do more stringent
+checks. One of those makes it use the create time like an i_generation
+field to guard against matching inodes that have the same number but
+that have undergone a delete/create cycle. They need a bit more testing
+but I'm planning to post them in time for 2.6.36.
+
+Because of how samba generates this number, it could be somewhat
+problematic to do this. What may save us though is that Linux<->Samba
+mostly uses unix extensions unless someone has specifically disabled
+them on either end. The unix extension calls don't generally send any
+sort of create time field, so we can't rely on it in those codepaths
+anyway.
+
+-- 
+Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003106:2, b/test/corpora/lkml/cur/1382298770.003106:2,
new file mode 100644 (file)
index 0000000..19ea381
--- /dev/null
@@ -0,0 +1,60 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Fri, 25 Jun 2010 22:46:38 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 13
+Message-ID: <18628.1277502398@redhat.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com>
+Cc: dhowells@redhat.com, Suresh Jayaraman <sjayaraman@suse.de>,
+       Steve French <smfrench@gmail.com>, linux-cifs@vger.kernel.org,
+       linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
+       samba-technical@lists.samba.org
+To: Jeff Layton <jlayton@samba.org>
+X-From: linux-kernel-owner@vger.kernel.org Fri Jun 25 23:47:07 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSGjo-0006q8-ME
+       for glk-linux-kernel-3@lo.gmane.org; Fri, 25 Jun 2010 23:47:05 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932250Ab0FYVqv (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Fri, 25 Jun 2010 17:46:51 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:55406 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932088Ab0FYVqs (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Fri, 25 Jun 2010 17:46:48 -0400
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PLkhIG005974
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 17:46:43 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PLkd77017768;
+       Fri, 25 Jun 2010 17:46:40 -0400
+In-Reply-To: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003142>
+
+Jeff Layton <jlayton@samba.org> wrote:
+
+> Looks like it mostly uses the ctime. IMO, the mtime would be a better
+> choice since it changes less frequently, but I don't guess that it
+> matters very much.
+
+I'd've thought mtime changes more frequently since that's altered when data is
+written.  ctime is changed when attributes are changed.
+
+Note that Ext4 appears to have a file creation time field in its inode
+(struct ext4_inode::i_crtime[_extra]).  Can Samba be made to use that?
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003117:2, b/test/corpora/lkml/cur/1382298770.003117:2,
new file mode 100644 (file)
index 0000000..7f53e34
--- /dev/null
@@ -0,0 +1,65 @@
+From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Sat, 26 Jun 2010 00:04:28 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 18
+Message-ID: <20123.1277507068@redhat.com>
+References: <20100625182651.36800d06@tlielax.poochiereds.net> <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <yes> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com> <18628.1277502398@redhat.com>
+Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>,
+       Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
+To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Sat Jun 26 01:04:45 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSHww-0006Jk-NV
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Sat, 26 Jun 2010 01:04:43 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1751807Ab0FYXEl (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Fri, 25 Jun 2010 19:04:41 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:62977 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752149Ab0FYXEl (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Fri, 25 Jun 2010 19:04:41 -0400
+Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5PN4X40004498
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Fri, 25 Jun 2010 19:04:34 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5PN4Sld008220;
+       Fri, 25 Jun 2010 19:04:30 -0400
+In-Reply-To: <20100625182651.36800d06-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003153>
+
+Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
+
+> IIUC, updating mtime for a write is also an attribute change, and that
+> affects ctime. According to the stat(2) manpage:
+
+You're right.  Okay, ctime is the more frequently changed.
+
+> > Note that Ext4 appears to have a file creation time field in its inode
+> > (struct ext4_inode::i_crtime[_extra]).  Can Samba be made to use that?
+> 
+> Is it exposed to userspace in any (standard) way? It would be handy to
+> have that. While we're wishing...it might also be nice to have a
+> standard way to get at the i_generation from userspace too.
+
+Not at present, but it's something that could be exported by ioctl() or
+getxattr().
+
+David
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003118:2, b/test/corpora/lkml/cur/1382298770.003118:2,
new file mode 100644 (file)
index 0000000..a1ec438
--- /dev/null
@@ -0,0 +1,122 @@
+From: Steve French <smfrench@gmail.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and 
+       register them
+Date: Fri, 25 Jun 2010 18:05:30 -0500
+Lines: 51
+Message-ID: <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+       <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+       <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>
+       <18628.1277502398@redhat.com>
+       <20100625182651.36800d06@tlielax.poochiereds.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: David Howells <dhowells@redhat.com>,
+       Suresh Jayaraman <sjayaraman@suse.de>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org, samba-technical@lists.samba.org,
+       Jeff Layton <jlayton@redhat.com>
+To: Jeff Layton <jlayton@samba.org>,
+       "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
+       Mingming Cao <mcao@us.ibm.com>
+X-From: linux-kernel-owner@vger.kernel.org Sat Jun 26 01:05:41 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSHxs-0006a8-BA
+       for glk-linux-kernel-3@lo.gmane.org; Sat, 26 Jun 2010 01:05:40 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756188Ab0FYXFd convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Fri, 25 Jun 2010 19:05:33 -0400
+Received: from mail-qw0-f46.google.com ([209.85.216.46]:51369 "EHLO
+       mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751575Ab0FYXFb convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Fri, 25 Jun 2010 19:05:31 -0400
+Received: by qwi4 with SMTP id 4so742644qwi.19
+        for <multiple recipients>; Fri, 25 Jun 2010 16:05:30 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:mime-version:received:received:in-reply-to
+         :references:date:message-id:subject:from:to:cc:content-type
+         :content-transfer-encoding;
+        bh=6wKQkGOEeUGN4oPR3Nm4SRxtJr/EBwN8ENmpLnfdCDU=;
+        b=X7L6W0MtpQeW/4iBuj+oDlcP2yCJ3qwUs9lHBq1fRW6WdYblHXjmaN8o++3GDPLAg5
+         0MD07zxbYTGXRSrgCjCrGVm0tT88/6hY2a/rB8g68h/Qso2sIHa7B1iIN8JRR4pPWle0
+         sVjp9Xy/bQn2e0uE481Ii1TLHuWYA/QDXZreU=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
+         :cc:content-type:content-transfer-encoding;
+        b=B+7qQvdOpN5a/KCRrDbssKZX8D3SnP73VMHd9RpkqP9nCHCmSLAgbeH03+/m6CLVAo
+         G+NKWqWtknwPBkYqT/bdP2XEak1yr+0rjOqjUaNvaT7AhzsyHEJBkaNnsbS3qaRy39OP
+         S7OkAyHfmgdeNAHkKnKRF73hfpvgAqR9X4bn8=
+Received: by 10.224.59.223 with SMTP id m31mr1130670qah.63.1277507130411; Fri, 
+       25 Jun 2010 16:05:30 -0700 (PDT)
+Received: by 10.229.46.136 with HTTP; Fri, 25 Jun 2010 16:05:30 -0700 (PDT)
+In-Reply-To: <20100625182651.36800d06@tlielax.poochiereds.net>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003154>
+
+On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wrote:
+>
+> On Fri, 25 Jun 2010 22:46:38 +0100
+> David Howells <dhowells@redhat.com> wrote:
+>
+> > Jeff Layton <jlayton@samba.org> wrote:
+> >
+> > > Looks like it mostly uses the ctime. IMO, the mtime would be a be=
+tter
+> > > choice since it changes less frequently, but I don't guess that i=
+t
+> > > matters very much.
+> >
+> > I'd've thought mtime changes more frequently since that's altered w=
+hen data is
+> > written. =A0ctime is changed when attributes are changed.
+> >
+>
+> IIUC, updating mtime for a write is also an attribute change, and tha=
+t
+> affects ctime. According to the stat(2) manpage:
+>
+> =A0 =A0 =A0 The field st_ctime is changed by writing or by setting =A0=
+inode =A0informa-
+> =A0 =A0 =A0 tion (i.e., owner, group, link count, mode, etc.).
+>
+> > Note that Ext4 appears to have a file creation time field in its in=
+ode
+> > (struct ext4_inode::i_crtime[_extra]). =A0Can Samba be made to use =
+that?
+> >
+>
+> Is it exposed to userspace in any (standard) way? It would be handy t=
+o
+> have that. While we're wishing...it might also be nice to have a
+> standard way to get at the i_generation from userspace too.
+>
+
+Yes - I have talked with MingMing and Aneesh about those (NFS may
+someday be able to use those too).=A0 An obstacle in the past had been
+that samba server stores its own fake creation time in an ndr encoded
+xattr which complicates things.
+
+MingMing/Annesh -
+Xattr or other way to get at birth time?
+
+
+--
+Thanks,
+
+Steve
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003171:2, b/test/corpora/lkml/cur/1382298770.003171:2,
new file mode 100644 (file)
index 0000000..66e425e
--- /dev/null
@@ -0,0 +1,174 @@
+From: Mingming Cao <mcao@us.ibm.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+       register them
+Date: Fri, 25 Jun 2010 17:52:24 -0700
+Lines: 92
+Message-ID: <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>  <4C24A606.5040001@suse.de>
+       <1277220214-3597-1-git-send-email-sjayaraman@suse.de>   <9822.1277312573@redhat.com>
+       <22697.1277470549@redhat.com>   <18628.1277502398@redhat.com>   <20100625182651.36800d06@tlielax.poochiereds.net>
+       <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: quoted-printable
+Cc: linux-cifs@vger.kernel.org, Jeff Layton <jlayton@redhat.com>,
+       samba-technical@lists.samba.org, linux-kernel@vger.kernel.org,
+       David Howells <dhowells@redhat.com>, linux-fsdevel@vger.kernel.org,
+       "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
+To: Steve French <smfrench@gmail.com>
+X-From: samba-technical-bounces@lists.samba.org Sat Jun 26 13:36:56 2010
+Return-path: <samba-technical-bounces@lists.samba.org>
+Envelope-to: gnsi-samba-technical@m.gmane.org
+Received: from fn.samba.org ([216.83.154.106] helo=lists.samba.org)
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <samba-technical-bounces@lists.samba.org>)
+       id 1OSTgu-00025d-6P
+       for gnsi-samba-technical@m.gmane.org; Sat, 26 Jun 2010 13:36:56 +0200
+Received: from fn.samba.org (localhost [127.0.0.1])
+       by lists.samba.org (Postfix) with ESMTP id 1ED11AD2C4;
+       Sat, 26 Jun 2010 05:36:45 -0600 (MDT)
+X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-6.6 required=3.8 tests=BAYES_00,HTML_MESSAGE,
+       RCVD_IN_DNSWL_MED,SPF_PASS autolearn=ham version=3.2.5
+X-Original-To: samba-technical@lists.samba.org
+Delivered-To: samba-technical@lists.samba.org
+Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152])
+       by lists.samba.org (Postfix) with ESMTP id 30F90AD282
+       for <samba-technical@lists.samba.org>;
+       Fri, 25 Jun 2010 18:52:24 -0600 (MDT)
+Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com
+       [9.17.195.226])
+       by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5Q0iN1h017083
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:44:23 -0600
+Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167])
+       by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id
+       o5Q0qQTN175324
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:52:26 -0600
+Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1])
+       by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP
+       id o5Q0qPCF006767
+       for <samba-technical@lists.samba.org>; Fri, 25 Jun 2010 18:52:26 -0600
+Received: from d03nm128.boulder.ibm.com (d03nm128.boulder.ibm.com
+       [9.17.195.32])
+       by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id
+       o5Q0qPrh006760; Fri, 25 Jun 2010 18:52:25 -0600
+In-Reply-To: <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+X-KeepSent: B55E8EC7:E8DD23D5-8725774E:0004921E;
+ type=4; name=$KeepSent
+X-Mailer: Lotus Notes Build V852_M2_03302010 March 30, 2010
+X-MIMETrack: Serialize by Router on D03NM128/03/M/IBM(Release 8.0.1|February
+       07, 2008) at 06/25/2010 18:52:25
+X-Mailman-Approved-At: Sat, 26 Jun 2010 05:36:42 -0600
+X-Content-Filtered-By: Mailman/MimeDel 2.1.12
+X-BeenThere: samba-technical@lists.samba.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Discussions on Samba internals. For general questions please
+       subscribe to the list samba@samba.org"
+       <samba-technical.lists.samba.org>
+List-Unsubscribe: <https://lists.samba.org/mailman/options/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=unsubscribe>
+List-Archive: <http://lists.samba.org/pipermail/samba-technical>
+List-Post: <mailto:samba-technical@lists.samba.org>
+List-Help: <mailto:samba-technical-request@lists.samba.org?subject=help>
+List-Subscribe: <https://lists.samba.org/mailman/listinfo/samba-technical>,
+       <mailto:samba-technical-request@lists.samba.org?subject=subscribe>
+Sender: samba-technical-bounces@lists.samba.org
+Errors-To: samba-technical-bounces@lists.samba.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003208>
+
+
+
+Steve French <smfrench@gmail.com> wrote on 06/25/2010 04:05:30 PM:
+
+> Steve French <smfrench@gmail.com>
+> 06/25/2010 04:05 PM
+>
+> To
+>
+> Jeff Layton <jlayton@samba.org>, "Aneesh Kumar K.V"
+> <aneesh.kumar@linux.vnet.ibm.com>, Mingming Cao/Beaverton/IBM@IBMUS
+>
+> cc
+>
+> David Howells <dhowells@redhat.com>, Suresh Jayaraman
+> <sjayaraman@suse.de>, linux-cifs@vger.kernel.org, linux-
+> fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba-
+> technical@lists.samba.org, Jeff Layton <jlayton@redhat.com>
+>
+> Subject
+>
+> Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+> register them
+>
+> On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wrot=
+e:
+> >
+> > On Fri, 25 Jun 2010 22:46:38 +0100
+> > David Howells <dhowells@redhat.com> wrote:
+> >
+> > > Jeff Layton <jlayton@samba.org> wrote:
+> > >
+> > > > Looks like it mostly uses the ctime. IMO, the mtime would be a
+better
+> > > > choice since it changes less frequently, but I don't guess that=
+ it
+> > > > matters very much.
+> > >
+> > > I'd've thought mtime changes more frequently since that's
+> altered when data is
+> > > written. =A0ctime is changed when attributes are changed.
+> > >
+> >
+> > IIUC, updating mtime for a write is also an attribute change, and t=
+hat
+> > affects ctime. According to the stat(2) manpage:
+> >
+> > =A0 =A0 =A0 The field st_ctime is changed by writing or by setting
+> =A0inode =A0informa-
+> > =A0 =A0 =A0 tion (i.e., owner, group, link count, mode, etc.).
+> >
+> > > Note that Ext4 appears to have a file creation time field in its
+inode
+> > > (struct ext4_inode::i_crtime[_extra]). =A0Can Samba be made to us=
+e
+that?
+> > >
+> >
+> > Is it exposed to userspace in any (standard) way? It would be handy=
+ to
+> > have that. While we're wishing...it might also be nice to have a
+> > standard way to get at the i_generation from userspace too.
+> >
+>
+> Yes - I have talked with MingMing and Aneesh about those (NFS may
+> someday be able to use those too).=A0 An obstacle in the past had bee=
+n
+> that samba server stores its own fake creation time in an ndr encoded=
+
+> xattr which complicates things.
+>
+> MingMing/Annesh -
+> Xattr or other way to get at birth time?
+>
+>
+
+Not yet,
+ The ext4 file creation time only accesable from the kernel at the mome=
+nt.
+There were discussion
+to make this information avaliable via xattr before, but was rejected,
+since most people
+agree that making this info avalibele via stat() is more standard. Howe=
+ver
+modifying stat() would imply
+big interface change. thus no action has been taken yet.
+
+> --
+> Thanks,
+>
+> Steve=
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003317:2, b/test/corpora/lkml/cur/1382298770.003317:2,
new file mode 100644 (file)
index 0000000..6fce518
--- /dev/null
@@ -0,0 +1,156 @@
+From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them
+Date: Sun, 27 Jun 2010 23:47:21 +0530
+Lines: 100
+Message-ID: <871vbscpce.fsf@linux.vnet.ibm.com>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com> <18628.1277502398@redhat.com> <20100625182651.36800d06@tlielax.poochiereds.net> <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com> <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: David Howells <dhowells@redhat.com>,
+       Jeff Layton <jlayton@redhat.com>,
+       Jeff Layton <jlayton@samba.org>, linux-cifs@vger.kernel.org,
+       linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
+       samba-technical@lists.samba.org,
+       Suresh Jayaraman <sjayaraman@suse.de>
+To: Mingming Cao <mcao@us.ibm.com>, Steve French <smfrench@gmail.com>,
+       "DENIEL Philippe" <philippe.deniel@cea.fr>
+X-From: linux-kernel-owner@vger.kernel.org Sun Jun 27 20:18:00 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OSwQZ-0003Kh-Vu
+       for glk-linux-kernel-3@lo.gmane.org; Sun, 27 Jun 2010 20:18:00 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754631Ab0F0SRq convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 27 Jun 2010 14:17:46 -0400
+Received: from e23smtp07.au.ibm.com ([202.81.31.140]:52430 "EHLO
+       e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753837Ab0F0SRl convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 27 Jun 2010 14:17:41 -0400
+Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247])
+       by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id o5RIHbfJ012483;
+       Mon, 28 Jun 2010 04:17:37 +1000
+Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97])
+       by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5RIHW9f1130634;
+       Mon, 28 Jun 2010 04:17:32 +1000
+Received: from d23av03.au.ibm.com (loopback [127.0.0.1])
+       by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5RIHVcR027534;
+       Mon, 28 Jun 2010 04:17:32 +1000
+Received: from skywalker.linux.vnet.ibm.com ([9.77.196.78])
+       by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5RIHMFl027485;
+       Mon, 28 Jun 2010 04:17:24 +1000
+In-Reply-To: <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+User-Agent: Notmuch/ (http://notmuchmail.org) Emacs/24.0.50.1 (i686-pc-linux-gnu)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003357>
+
+On Fri, 25 Jun 2010 17:52:24 -0700, Mingming Cao <mcao@us.ibm.com> wrot=
+e:
+>=20
+>=20
+> Steve French <smfrench@gmail.com> wrote on 06/25/2010 04:05:30 PM:
+>=20
+> > Steve French <smfrench@gmail.com>
+> > 06/25/2010 04:05 PM
+> >
+> > To
+> >
+> > Jeff Layton <jlayton@samba.org>, "Aneesh Kumar K.V"
+> > <aneesh.kumar@linux.vnet.ibm.com>, Mingming Cao/Beaverton/IBM@IBMUS
+> >
+> > cc
+> >
+> > David Howells <dhowells@redhat.com>, Suresh Jayaraman
+> > <sjayaraman@suse.de>, linux-cifs@vger.kernel.org, linux-
+> > fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba-
+> > technical@lists.samba.org, Jeff Layton <jlayton@redhat.com>
+> >
+> > Subject
+> >
+> > Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+> > register them
+> >
+> > On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton <jlayton@samba.org> wr=
+ote:
+> > >
+> > > On Fri, 25 Jun 2010 22:46:38 +0100
+> > > David Howells <dhowells@redhat.com> wrote:
+> > >
+> > > > Jeff Layton <jlayton@samba.org> wrote:
+> > > >
+> > > > > Looks like it mostly uses the ctime. IMO, the mtime would be =
+a
+> better
+> > > > > choice since it changes less frequently, but I don't guess th=
+at it
+> > > > > matters very much.
+> > > >
+> > > > I'd've thought mtime changes more frequently since that's
+> > altered when data is
+> > > > written. =C2=A0ctime is changed when attributes are changed.
+> > > >
+> > >
+> > > IIUC, updating mtime for a write is also an attribute change, and=
+ that
+> > > affects ctime. According to the stat(2) manpage:
+> > >
+> > > =C2=A0 =C2=A0 =C2=A0 The field st_ctime is changed by writing or =
+by setting
+> > =C2=A0inode =C2=A0informa-
+> > > =C2=A0 =C2=A0 =C2=A0 tion (i.e., owner, group, link count, mode, =
+etc.).
+> > >
+> > > > Note that Ext4 appears to have a file creation time field in it=
+s
+> inode
+> > > > (struct ext4_inode::i_crtime[_extra]). =C2=A0Can Samba be made =
+to use
+> that?
+> > > >
+> > >
+> > > Is it exposed to userspace in any (standard) way? It would be han=
+dy to
+> > > have that. While we're wishing...it might also be nice to have a
+> > > standard way to get at the i_generation from userspace too.
+> > >
+> >
+> > Yes - I have talked with MingMing and Aneesh about those (NFS may
+> > someday be able to use those too).=C2=A0 An obstacle in the past ha=
+d been
+> > that samba server stores its own fake creation time in an ndr encod=
+ed
+> > xattr which complicates things.
+> >
+> > MingMing/Annesh -
+> > Xattr or other way to get at birth time?
+> >
+> >
+>=20
+> Not yet,
+>  The ext4 file creation time only accesable from the kernel at the mo=
+ment.
+> There were discussion
+> to make this information avaliable via xattr before, but was rejected=
+,
+> since most people
+> agree that making this info avalibele via stat() is more standard. Ho=
+wever
+> modifying stat() would imply
+> big interface change. thus no action has been taken yet.
+
+NFS ganesha pNFS also had a requirement for getting i_generation and
+inode number in userspace. So may be we should now look at updating
+stat or add a variant syscall that include i_generation and create time
+in the return value
+
+-aneesh
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003318:2, b/test/corpora/lkml/cur/1382298770.003318:2,
new file mode 100644 (file)
index 0000000..058d147
--- /dev/null
@@ -0,0 +1,66 @@
+From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
+Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and
+ register them
+Date: Sun, 27 Jun 2010 14:22:29 -0400
+Lines: 9
+Message-ID: <20100627182229.GA492@infradead.org>
+References: <20100625125306.7f9b1966@tlielax.poochiereds.net>
+ <4C24A606.5040001@suse.de>
+ <1277220214-3597-1-git-send-email-sjayaraman@suse.de>
+ <9822.1277312573@redhat.com>
+ <22697.1277470549@redhat.com>
+ <18628.1277502398@redhat.com>
+ <20100625182651.36800d06@tlielax.poochiereds.net>
+ <AANLkTilOTrHLvLv4XWYZO6xCnYZgYT7gO2M-oKZ6VvqM@mail.gmail.com>
+ <OFB55E8EC7.E8DD23D5-ON8725774E.0004921E-8825774E.0004CC31@us.ibm.com>
+ <871vbscpce.fsf@linux.vnet.ibm.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Mingming Cao <mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
+       DENIEL Philippe <philippe.deniel-KCE40YydGKI@public.gmane.org>,
+       David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
+       Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
+       Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
+       Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+To: "Aneesh Kumar K. V" <aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Sun Jun 27 20:22:46 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OSwVB-0005TI-SG
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Sun, 27 Jun 2010 20:22:46 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1752811Ab0F0SWo (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Sun, 27 Jun 2010 14:22:44 -0400
+Received: from bombadil.infradead.org ([18.85.46.34]:55433 "EHLO
+       bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752728Ab0F0SWn (ORCPT
+       <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Sun, 27 Jun 2010 14:22:43 -0400
+Received: from hch by bombadil.infradead.org with local (Exim 4.72 #1 (Red Hat Linux))
+       id 1OSwUv-00009z-9N; Sun, 27 Jun 2010 18:22:29 +0000
+Content-Disposition: inline
+In-Reply-To: <871vbscpce.fsf-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+X-SRS-Rewrite: SMTP reverse-path rewritten from <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> by bombadil.infradead.org
+       See http://www.infradead.org/rpr.html
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003358>
+
+On Sun, Jun 27, 2010 at 11:47:21PM +0530, Aneesh Kumar K. V wrote:
+> NFS ganesha pNFS also had a requirement for getting i_generation and
+> inode number in userspace. So may be we should now look at updating
+> stat or add a variant syscall that include i_generation and create time
+> in the return value
+
+What's missing in knfsd that you feel the sudden urge to move backwards
+to a userspace nfsd (one with a horribly crappy codebase, too).
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003486:2, b/test/corpora/lkml/cur/1382298770.003486:2,
new file mode 100644 (file)
index 0000000..8831b45
--- /dev/null
@@ -0,0 +1,89 @@
+From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index
+ objects and register them
+Date: Mon, 28 Jun 2010 18:23:13 +0530
+Lines: 48
+Message-ID: <4C289B39.4060901@suse.de>
+References: <22746.1277470713@redhat.com> <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com> <23204.1277472412@redhat.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Jun 28 14:53:24 2010
+Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1OTDq0-00054Q-At
+       for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 28 Jun 2010 14:53:24 +0200
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1754503Ab0F1MxX (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
+       Mon, 28 Jun 2010 08:53:23 -0400
+Received: from cantor2.suse.de ([195.135.220.15]:48374 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754456Ab0F1MxW (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Mon, 28 Jun 2010 08:53:22 -0400
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id 7BDC18672B;
+       Mon, 28 Jun 2010 14:53:21 +0200 (CEST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
+In-Reply-To: <23204.1277472412-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-cifs.vger.kernel.org>
+X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003530>
+
+On 06/25/2010 06:56 PM, David Howells wrote:
+> David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
+> 
+>>>> validate the root directory of the share in some way?
+>>>
+>>> I don't know if there is a way to do this.
+>>
+>> Is there an inode number or something?  Even the creation time might do.
+> 
+> Looking in cifspdu.h, there are a number of things that it might be possible
+> to use.
+> 
+>  (1) FILE_ALL_INFO: CreationTime, IndexNumber, IndexNumber1, FileName
+>      (assuming this isn't flattened to '\' or something for the root of a
+>      share.
+> 
+>  (2) FILE_UNIX_BASIC_INFO: DevMajor, DevMinor, UniqueId.
+> 
+>  (3) FILE_INFO_STANDARD: CreationDate, CreationTime.
+> 
+>  (4) FILE_INFO_BASIC: CreationTime.
+> 
+>  (5) FILE_DIRECTORY_INFO: FileIndex, CreationTime, FileName.
+> 
+>  (6) SEARCH_ID_FULL_DIR_INFO: FileIndex, CreationTime, UniqueId, FileName.
+> 
+>  (7) FILE_BOTH_DIRECTORY_INFO: FileIndex, CreationTime, ShortName, FileName.
+> 
+>  (8) OPEN_RSP_EXT: Fid, CreationTime, VolumeGUID, FileId.
+> 
+> You may have to choose different sets of things, depending on what the server
+> has on offer.  Also, don't forget, if you can't work out whether a share is
+
+Did you mean we need to validate differently for different servers?
+
+I just did some testing and it looks like we could rely on CreationTime,
+IndexNumber for validating with Windows servers (FileName is relative to
+the mapped drive) and UniqueId for validating with Samba servers. I did
+not test all possibilities (there could be more).
+
+> coherent or not from the above, you can always use LastWriteTime, ChangeTime
+> and EndOfFile and just discard the whole subtree if they differ.
+> 
+
+Thanks,
+
+-- 
+Suresh Jayaraman
+
+
diff --git a/test/corpora/lkml/cur/1382298770.003499:2, b/test/corpora/lkml/cur/1382298770.003499:2,
new file mode 100644 (file)
index 0000000..b10adc4
--- /dev/null
@@ -0,0 +1,63 @@
+From: David Howells <dhowells@redhat.com>
+Subject: Re: [RFC][PATCH 05/10] cifs: define superblock-level cache index objects and register them
+Date: Mon, 28 Jun 2010 14:24:45 +0100
+Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
+       Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
+       Kingdom.
+       Registered in England and Wales under Company Registration No. 3798903
+Lines: 17
+Message-ID: <9513.1277731485@redhat.com>
+References: <4C289B39.4060901@suse.de> <22746.1277470713@redhat.com> <4C24A4A0.90408@suse.de> <1277220206-3559-1-git-send-email-sjayaraman@suse.de> <yes> <9720.1277312290@redhat.com> <23204.1277472412@redhat.com>
+Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
+       linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Suresh Jayaraman <sjayaraman@suse.de>
+X-From: linux-fsdevel-owner@vger.kernel.org Mon Jun 28 15:24:57 2010
+Return-path: <linux-fsdevel-owner@vger.kernel.org>
+Envelope-to: lnx-linux-fsdevel@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-fsdevel-owner@vger.kernel.org>)
+       id 1OTEKW-00048k-S3
+       for lnx-linux-fsdevel@lo.gmane.org; Mon, 28 Jun 2010 15:24:57 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1751608Ab0F1NYz (ORCPT <rfc822;lnx-linux-fsdevel@m.gmane.org>);
+       Mon, 28 Jun 2010 09:24:55 -0400
+Received: from mx1.redhat.com ([209.132.183.28]:26085 "EHLO mx1.redhat.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751395Ab0F1NYy (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>);
+       Mon, 28 Jun 2010 09:24:54 -0400
+Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21])
+       by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5SDOmfA019811
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Mon, 28 Jun 2010 09:24:49 -0400
+Received: from redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1])
+       by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5SDOjHf030340;
+       Mon, 28 Jun 2010 09:24:47 -0400
+In-Reply-To: <4C289B39.4060901@suse.de>
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21
+Sender: linux-fsdevel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-fsdevel.vger.kernel.org>
+X-Mailing-List: linux-fsdevel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1003543>
+
+Suresh Jayaraman <sjayaraman@suse.de> wrote:
+
+> Did you mean we need to validate differently for different servers?
+
+You may need to, yes, as different servers may make different attributes
+available.
+
+This isn't too bad.  Each server index record in the cache has freeform
+auxiliary data, just as does each file data record.  You could, say, stick a
+byte at the front that indicates what you've stored in there.
+
+David
+--
+To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298770.004581:2, b/test/corpora/lkml/cur/1382298770.004581:2,
new file mode 100644 (file)
index 0000000..732bfa0
--- /dev/null
@@ -0,0 +1,92 @@
+From: Timur Tabi <timur.tabi@gmail.com>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Wed, 30 Jun 2010 15:55:58 -0500
+Lines: 33
+Message-ID: <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+References: <20100308191005.GE4324@amak.tundra.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: mporter@kernel.crashing.org, linux-kernel@vger.kernel.org,
+       linuxppc-dev@lists.ozlabs.org, thomas.moll@sysgo.com
+To: Alexandre Bounine <abounine@tundra.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 30 22:56:40 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OU4Kl-0005Kf-V4
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 30 Jun 2010 22:56:40 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756668Ab0F3U4b convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 30 Jun 2010 16:56:31 -0400
+Received: from mail-vw0-f46.google.com ([209.85.212.46]:41333 "EHLO
+       mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753416Ab0F3U43 convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 30 Jun 2010 16:56:29 -0400
+Received: by vws5 with SMTP id 5so1449398vws.19
+        for <linux-kernel@vger.kernel.org>; Wed, 30 Jun 2010 13:56:28 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:mime-version:received:in-reply-to
+         :references:from:date:message-id:subject:to:cc:content-type
+         :content-transfer-encoding;
+        bh=FTlit9cHTz/9rLGcvA5/pEZlzxAQ5x20v8HE5XYFwYM=;
+        b=NFbjnxZ4KwcjTy4tFh+BnhWPEGeYTw6z918yIouRaMmbEDph56xq26K9aTBokuYHqe
+         UgFjBn7XWcxvqJPyCetfsDRG+F3M2XwCq/DSCswSPtXSLsy8WKm7cMXVS3hjiO8sMZ97
+         mRMGZkYBJHjWP+ulkBXiq6q7/OQuE8Dkl+rWM=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
+         :cc:content-type:content-transfer-encoding;
+        b=r0N6AOAg+TSvY2kPQPahldj4iRU9oUoSLtHA7JXG2QU4CR9O5GBhxAtr2aY99qUPZd
+         tFS0ZWRAb9cmOgiZhTpNxsBjCJ/e/DQ1ccP5rZ/U40q1SJ1KwN92hqpOoppZ0tkqSB7/
+         UlQtsvPSK7a0bYqufEmscfAi98w1+mfZIbK6U=
+Received: by 10.220.161.203 with SMTP id s11mr5093041vcx.195.1277931388141; 
+       Wed, 30 Jun 2010 13:56:28 -0700 (PDT)
+Received: by 10.220.161.137 with HTTP; Wed, 30 Jun 2010 13:55:58 -0700 (PDT)
+In-Reply-To: <20100308191005.GE4324@amak.tundra.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1004632>
+
+On Mon, Mar 8, 2010 at 2:10 PM, Alexandre Bounine <abounine@tundra.com>=
+ wrote:
+>
+> From: Alexandre Bounine <alexandre.bounine@idt.com>
+>
+> Add Machine Check exception handling into RapidIO port driver
+> for Freescale SoCs (MPC85xx).
+>
+> Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
+> Tested-by: Thomas Moll <thomas.moll@sysgo.com>
+=2E..
+
+> +static int fsl_rio_mcheck_exception(struct pt_regs *regs)
+> +{
+> + =A0 =A0 =A0 const struct exception_table_entry *entry =3D NULL;
+> + =A0 =A0 =A0 unsigned long reason =3D (mfspr(SPRN_MCSR) & MCSR_MASK)=
+;
+
+MCSR_MASK is not defined anywhere, so when I compile this code, I get t=
+his:
+
+  CC      arch/powerpc/sysdev/fsl_rio.o
+arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
+arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+(first use in this function)
+arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+is reported only once
+arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears =
+in.)
+
+--=20
+Timur Tabi
+Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298770.004582:2, b/test/corpora/lkml/cur/1382298770.004582:2,
new file mode 100644 (file)
index 0000000..d149b72
--- /dev/null
@@ -0,0 +1,68 @@
+From: Timur Tabi <timur.tabi@gmail.com>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Wed, 30 Jun 2010 16:00:56 -0500
+Lines: 12
+Message-ID: <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Cc: mporter@kernel.crashing.org, linux-kernel@vger.kernel.org,
+       linuxppc-dev@lists.ozlabs.org, thomas.moll@sysgo.com
+To: Alexandre Bounine <abounine@tundra.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Jun 30 23:01:37 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OU4PZ-0000HS-0T
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 30 Jun 2010 23:01:37 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755703Ab0F3VB2 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 30 Jun 2010 17:01:28 -0400
+Received: from mail-vw0-f46.google.com ([209.85.212.46]:53141 "EHLO
+       mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751784Ab0F3VB1 (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 30 Jun 2010 17:01:27 -0400
+Received: by vws5 with SMTP id 5so1454517vws.19
+        for <linux-kernel@vger.kernel.org>; Wed, 30 Jun 2010 14:01:26 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:mime-version:received:in-reply-to
+         :references:from:date:message-id:subject:to:cc:content-type;
+        bh=+BUKti+Oa03CrnVvRyT591FhcoxqR7S2rzZHtD6WSuY=;
+        b=O/b04HLJrmTE0aIq2mNCRznQrXxAAGHSMarHR5mrgYptmr68froM6UgmDqTZFLhNiH
+         BcT8g+AziiqSV1k/ckXjRyVR0s9Jdv4g2phMNtp8NStbPfOPpLDkUKTQadphOTonCfeK
+         e+ZrLBwh+FCoYNAOjvFioBKj6CxN2Oi5xIhPc=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
+         :cc:content-type;
+        b=UcKGhJIXCTTcSvBWwGwLUefPONGygVPsUnTt4nDSl4udB8JKMyi0EghzzgNXUyq4Dz
+         UCxzZAyxzjvjgsgPS3kzPhSsWG2PRG66pC1OA68RJ5YVOjt55/yOz/yfTqXBVvRSq2fV
+         QNcKACYHSjkIZ7Uq7ZEW9bEGI5tTKdz++N2UA=
+Received: by 10.220.124.73 with SMTP id t9mr5099129vcr.37.1277931686462; Wed, 
+       30 Jun 2010 14:01:26 -0700 (PDT)
+Received: by 10.220.161.137 with HTTP; Wed, 30 Jun 2010 14:00:56 -0700 (PDT)
+In-Reply-To: <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1004633>
+
+On Wed, Jun 30, 2010 at 3:55 PM, Timur Tabi <timur.tabi@gmail.com> wrote:
+
+> MCSR_MASK is not defined anywhere, so when I compile this code, I get this:
+
+Never mind.  I see that it's been fixed already, and that the patch
+that removed MCSR_MASK was posted around the same time that this patch
+was posted.
+
+
+-- 
+Timur Tabi
+Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298775.002830:2, b/test/corpora/lkml/cur/1382298775.002830:2,
new file mode 100644 (file)
index 0000000..1bf40bc
--- /dev/null
@@ -0,0 +1,60 @@
+From: Michael Neuling <mikey@neuling.org>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Tue, 03 Aug 2010 16:06:30 +1000
+Lines: 15
+Message-ID: <4381.1280815590@neuling.org>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com> <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+Cc: Alexandre Bounine <abounine@tundra.com>,
+       linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
+       thomas.moll@sysgo.com
+To: Timur Tabi <timur.tabi@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Aug 03 08:06:45 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OgAeD-00087x-ED
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 03 Aug 2010 08:06:45 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755287Ab0HCGGf (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 3 Aug 2010 02:06:35 -0400
+Received: from ozlabs.org ([203.10.76.45]:51158 "EHLO ozlabs.org"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1755139Ab0HCGGd (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 3 Aug 2010 02:06:33 -0400
+Received: from localhost.localdomain (localhost [127.0.0.1])
+       by ozlabs.org (Postfix) with ESMTP id B7A371007D1;
+       Tue,  3 Aug 2010 16:06:31 +1000 (EST)
+Received: by localhost.localdomain (Postfix, from userid 1000)
+       id EDBB7C5EB7; Tue,  3 Aug 2010 16:06:30 +1000 (EST)
+Received: from neuling.org (localhost [127.0.0.1])
+       by localhost.localdomain (Postfix) with ESMTP id E8003C51D3;
+       Tue,  3 Aug 2010 16:06:30 +1000 (EST)
+In-reply-to: <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+Comments: In-reply-to Timur Tabi <timur.tabi@gmail.com>
+   message dated "Wed, 30 Jun 2010 16:00:56 -0500."
+X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1017846>
+
+> > MCSR_MASK is not defined anywhere, so when I compile this code, I get this:
+> 
+> Never mind.  I see that it's been fixed already, and that the patch
+> that removed MCSR_MASK was posted around the same time that this patch
+> was posted.
+
+I don't know what happened here but 2.6.35 is broken because of this
+problem:
+
+arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared (first use in this function)
+arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier is reported only once
+arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears in.)
+arch/powerpc/sysdev/fsl_rio.c:250: error: 'MCSR_BUS_RBERR' undeclared (first use in this function)
+
+Mikey
+
+
diff --git a/test/corpora/lkml/cur/1382298775.002978:2, b/test/corpora/lkml/cur/1382298775.002978:2,
new file mode 100644 (file)
index 0000000..21e2a10
--- /dev/null
@@ -0,0 +1,91 @@
+From: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Tue, 3 Aug 2010 05:17:54 -0700
+Lines: 34
+Message-ID: <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com> <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com> <4381.1280815590@neuling.org>
+Mime-Version: 1.0
+Content-Type: text/plain;
+       charset="us-ascii"
+Content-Transfer-Encoding: 8BIT
+Cc: "Alexandre Bounine" <abounine@tundra.com>,
+       <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
+       <thomas.moll@sysgo.com>
+To: "Michael Neuling" <mikey@neuling.org>,
+       "Timur Tabi" <timur.tabi@gmail.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Aug 03 14:27:12 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OgGaG-0002zE-Fr
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 03 Aug 2010 14:27:04 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756073Ab0HCM0x (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 3 Aug 2010 08:26:53 -0400
+Received: from mxout1.idt.com ([157.165.5.25]:35046 "EHLO mxout1.idt.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1756010Ab0HCM0w convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 3 Aug 2010 08:26:52 -0400
+X-Greylist: delayed 521 seconds by postgrey-1.27 at vger.kernel.org; Tue, 03 Aug 2010 08:26:52 EDT
+Received: from mail.idt.com (localhost [127.0.0.1])
+       by mxout1.idt.com (8.13.1/8.13.1) with ESMTP id o73CHxil001904;
+       Tue, 3 Aug 2010 05:17:59 -0700
+Received: from corpml3.corp.idt.com (corpml3.corp.idt.com [157.165.140.25])
+       by mail.idt.com (8.13.8/8.13.8) with ESMTP id o73CHvit016488;
+       Tue, 3 Aug 2010 05:17:57 -0700 (PDT)
+Received: from CORPEXCH1.na.ads.idt.com (localhost [127.0.0.1])
+       by corpml3.corp.idt.com (8.11.7p1+Sun/8.11.7) with ESMTP id o73CHtN07516;
+       Tue, 3 Aug 2010 05:17:55 -0700 (PDT)
+X-MimeOLE: Produced By Microsoft Exchange V6.5
+Content-class: urn:content-classes:message
+In-Reply-To: <4381.1280815590@neuling.org>
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+Thread-Topic: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Thread-Index: Acsy0pTOmhzzm4GETvS4r2R2pYb40wAMtx8w
+X-Scanned-By: MIMEDefang 2.43
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1017995>
+
+This happened after change to book-e definitions.
+There are patches that address this issue.
+
+> -----Original Message-----
+> From: Michael Neuling [mailto:mikey@neuling.org]
+> Sent: Tuesday, August 03, 2010 2:07 AM
+> To: Timur Tabi
+> Cc: Alexandre Bounine; linuxppc-dev@lists.ozlabs.org;
+linux-kernel@vger.kernel.org;
+> thomas.moll@sysgo.com
+> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
+port
+> 
+> > > MCSR_MASK is not defined anywhere, so when I compile this code, I
+get this:
+> >
+> > Never mind.  I see that it's been fixed already, and that the patch
+> > that removed MCSR_MASK was posted around the same time that this
+patch
+> > was posted.
+> 
+> I don't know what happened here but 2.6.35 is broken because of this
+> problem:
+> 
+> arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+(first use in this function)
+> arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+is reported only once
+> arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
+in.)
+> arch/powerpc/sysdev/fsl_rio.c:250: error: 'MCSR_BUS_RBERR' undeclared
+(first use in this function)
+> 
+> Mikey
+
+
diff --git a/test/corpora/lkml/cur/1382298775.002992:2, b/test/corpora/lkml/cur/1382298775.002992:2,
new file mode 100644 (file)
index 0000000..0f11acd
--- /dev/null
@@ -0,0 +1,87 @@
+From: Timur Tabi <timur@freescale.com>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Tue, 3 Aug 2010 08:01:51 -0500
+Lines: 25
+Message-ID: <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com> 
+       <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com> 
+       <4381.1280815590@neuling.org> <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Cc: Michael Neuling <mikey@neuling.org>,
+       Alexandre Bounine <abounine@tundra.com>,
+       linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
+       thomas.moll@sysgo.com, Kumar Gala <galak@kernel.crashing.org>
+To: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Aug 03 15:02:39 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OgH8b-0003r0-5v
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 03 Aug 2010 15:02:33 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756383Ab0HCNCY (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 3 Aug 2010 09:02:24 -0400
+Received: from mail-qy0-f181.google.com ([209.85.216.181]:47377 "EHLO
+       mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1754253Ab0HCNCX (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 3 Aug 2010 09:02:23 -0400
+Received: by qyk7 with SMTP id 7so647758qyk.19
+        for <linux-kernel@vger.kernel.org>; Tue, 03 Aug 2010 06:02:22 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:mime-version:sender:received
+         :in-reply-to:references:from:date:x-google-sender-auth:message-id
+         :subject:to:cc:content-type;
+        bh=vTJghTE4Rwcgvgu1RS/86u/ljjztFlVQ5ODYWXBRkUM=;
+        b=p7S+ZVc0INWI6uXFwsLVTTEnV8wFAB0u0cDLt5qp0gyuMbF9yqXhukSTbYS8Vf8gCk
+         UFDmrOGjzC1whtvZnRS+Q80vVTR3+1URt/RTCUqirvalLvgluNrzP6sQ3xccFy4LkdLi
+         nGsgcNEqVwPPZgg3uSqew6B5UIoH7S00YzAYU=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=mime-version:sender:in-reply-to:references:from:date
+         :x-google-sender-auth:message-id:subject:to:cc:content-type;
+        b=qNVeIlTzozhY9MXH5PHYIsAL8T7zOBZ+0hWrBlbEy0PiBHW1AAv9nNd6FspugBZVUW
+         q7iPmhg0n6Oa3KFBNjs42dInyCPUqiQs10rGTQCJsSVITmZ/NA9sf8FFbI+Dg7xQiJKj
+         TN/8W0tBK9mUiqVvoO1avTKG1hqyMwTdMqlaM=
+Received: by 10.224.73.18 with SMTP id o18mr2669587qaj.354.1280840541149; Tue, 
+       03 Aug 2010 06:02:21 -0700 (PDT)
+Received: by 10.220.112.69 with HTTP; Tue, 3 Aug 2010 06:01:51 -0700 (PDT)
+In-Reply-To: <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+X-Google-Sender-Auth: lBedzmn1VMYh0pQjuCJuDw-lNh8
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1018009>
+
+On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
+<Alexandre.Bounine@idt.com> wrote:
+> This happened after change to book-e definitions.
+> There are patches that address this issue.
+
+And those patches should have been applied before 2.6.35 was released.
+ Someone dropped the ball.  2.6.35 is broken for a number of PowerPC
+boards:
+
+$ make mpc85xx_defconfig
+...
+$ make
+...
+  CC      arch/powerpc/sysdev/fsl_rio.o
+arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
+arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+(first use in this function)
+arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+is reported only once
+arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears in.)
+make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
+
+-- 
+Timur Tabi
+Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298775.002999:2, b/test/corpora/lkml/cur/1382298775.002999:2,
new file mode 100644 (file)
index 0000000..e6456b6
--- /dev/null
@@ -0,0 +1,109 @@
+From: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Tue, 3 Aug 2010 06:24:47 -0700
+Lines: 40
+Message-ID: <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com>
+References: <20100308191005.GE4324@amak.tundra.com>
+       <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+       <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+       <4381.1280815590@neuling.org>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+       <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Michael Neuling <mikey@neuling.org>, linux-kernel@vger.kernel.org,
+       Alexandre Bounine <abounine@tundra.com>, thomas.moll@sysgo.com,
+       linuxppc-dev@lists.ozlabs.org
+To: "Timur Tabi" <timur@freescale.com>
+X-From: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Tue Aug 03 15:25:22 2010
+Return-path: <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>
+Envelope-to: glppe-linuxppc-embedded-2@m.gmane.org
+Received: from ozlabs.org ([203.10.76.45])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>)
+       id 1OgHUd-0006wG-MW
+       for glppe-linuxppc-embedded-2@m.gmane.org; Tue, 03 Aug 2010 15:25:20 +0200
+Received: from bilbo.ozlabs.org (localhost [127.0.0.1])
+       by ozlabs.org (Postfix) with ESMTP id 54FA51007E4
+       for <glppe-linuxppc-embedded-2@m.gmane.org>; Tue,  3 Aug 2010 23:25:09 +1000 (EST)
+Received: from mxout1.idt.com (mxout1.idt.com [157.165.5.25])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (Client CN "mxout1.idt.com", Issuer "idt.com" (not verified))
+       by ozlabs.org (Postfix) with ESMTPS id 5C917B70A6
+       for <linuxppc-dev@lists.ozlabs.org>;
+       Tue,  3 Aug 2010 23:25:00 +1000 (EST)
+Received: from mail.idt.com (localhost [127.0.0.1])
+       by mxout1.idt.com (8.13.1/8.13.1) with ESMTP id o73DOrjO005661;
+       Tue, 3 Aug 2010 06:24:54 -0700
+Received: from corpml1.corp.idt.com (corpml1.corp.idt.com [157.165.140.20])
+       by mail.idt.com (8.13.8/8.13.8) with ESMTP id o73DOndw022603;
+       Tue, 3 Aug 2010 06:24:50 -0700 (PDT)
+Received: from CORPEXCH1.na.ads.idt.com (localhost [127.0.0.1])
+       by corpml1.corp.idt.com (8.11.7p1+Sun/8.11.7) with ESMTP id
+       o73DOml00291; Tue, 3 Aug 2010 06:24:48 -0700 (PDT)
+X-MimeOLE: Produced By Microsoft Exchange V6.5
+Content-class: urn:content-classes:message
+In-Reply-To: <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com>
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+Thread-Topic: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Thread-Index: AcszC8UElBYHaZlHSsmvZEE2KBL+0wAAhg7A
+X-Scanned-By: MIMEDefang 2.43
+X-BeenThere: linuxppc-dev@lists.ozlabs.org
+X-Mailman-Version: 2.1.13
+Precedence: list
+List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org>
+List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>
+List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev>
+List-Post: <mailto:linuxppc-dev@lists.ozlabs.org>
+List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>
+List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>
+Sender: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1018016>
+
+Yang Li pointed to these patches in his post from July 23, 2010.
+It would be nice to have these patches in mainline code. 
+
+> -----Original Message-----
+> From: timur.tabi@gmail.com [mailto:timur.tabi@gmail.com] On Behalf Of
+Timur Tabi
+> Sent: Tuesday, August 03, 2010 9:02 AM
+> To: Bounine, Alexandre
+> Cc: Michael Neuling; Alexandre Bounine; linuxppc-dev@lists.ozlabs.org;
+linux-kernel@vger.kernel.org;
+> thomas.moll@sysgo.com; Kumar Gala
+> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
+port
+> 
+> On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
+> <Alexandre.Bounine@idt.com> wrote:
+> > This happened after change to book-e definitions.
+> > There are patches that address this issue.
+> 
+> And those patches should have been applied before 2.6.35 was released.
+>  Someone dropped the ball.  2.6.35 is broken for a number of PowerPC
+> boards:
+> 
+> $ make mpc85xx_defconfig
+> ....
+> $ make
+> ....
+>   CC      arch/powerpc/sysdev/fsl_rio.o
+> arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
+> arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+> (first use in this function)
+> arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+> is reported only once
+> arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
+in.)
+> make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
+> 
+> --
+> Timur Tabi
+> Linux kernel developer at Freescale
+
+
diff --git a/test/corpora/lkml/cur/1382298775.003976:2, b/test/corpora/lkml/cur/1382298775.003976:2,
new file mode 100644 (file)
index 0000000..a6ff629
--- /dev/null
@@ -0,0 +1,96 @@
+From: Michael Neuling <mikey@neuling.org>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Thu, 05 Aug 2010 13:34:20 +1000
+Lines: 50
+Message-ID: <26581.1280979260@neuling.org>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com> <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com> <4381.1280815590@neuling.org> <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com> <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com> <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com>
+Cc: "Timur Tabi" <timur@freescale.com>,
+       "Alexandre Bounine" <abounine@tundra.com>,
+       linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
+       thomas.moll@sysgo.com, "Kumar Gala" <galak@kernel.crashing.org>
+To: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+X-From: linux-kernel-owner@vger.kernel.org Thu Aug 05 05:34:37 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1OgrE1-00024O-Bh
+       for glk-linux-kernel-3@lo.gmane.org; Thu, 05 Aug 2010 05:34:33 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1758775Ab0HEDeX (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 4 Aug 2010 23:34:23 -0400
+Received: from ozlabs.org ([203.10.76.45]:40810 "EHLO ozlabs.org"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1758704Ab0HEDeV (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 4 Aug 2010 23:34:21 -0400
+Received: from localhost.localdomain (localhost [127.0.0.1])
+       by ozlabs.org (Postfix) with ESMTP id 97995B70D8;
+       Thu,  5 Aug 2010 13:34:20 +1000 (EST)
+Received: by localhost.localdomain (Postfix, from userid 1000)
+       id 456CDCC199; Thu,  5 Aug 2010 13:34:20 +1000 (EST)
+Received: from neuling.org (localhost [127.0.0.1])
+       by localhost.localdomain (Postfix) with ESMTP id 404C8C6123;
+       Thu,  5 Aug 2010 13:34:20 +1000 (EST)
+In-reply-to: <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com>
+Comments: In-reply-to "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+   message dated "Tue, 03 Aug 2010 06:24:47 -0700."
+X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1019004>
+
+
+
+In message <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com> you wrote:
+> Yang Li pointed to these patches in his post from July 23, 2010.
+> It would be nice to have these patches in mainline code.=20
+
+This is still broken in Kumar's latest tree.  Do you guys wanna repost
+them so Kumar can pick them up easily?
+
+Mikey
+
+> 
+> > -----Original Message-----
+> > From: timur.tabi@gmail.com [mailto:timur.tabi@gmail.com] On Behalf Of
+> Timur Tabi
+> > Sent: Tuesday, August 03, 2010 9:02 AM
+> > To: Bounine, Alexandre
+> > Cc: Michael Neuling; Alexandre Bounine; linuxppc-dev@lists.ozlabs.org;
+> linux-kernel@vger.kernel.org;
+> > thomas.moll@sysgo.com; Kumar Gala
+> > Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
+> port
+> >=20
+> > On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
+> > <Alexandre.Bounine@idt.com> wrote:
+> > > This happened after change to book-e definitions.
+> > > There are patches that address this issue.
+> >=20
+> > And those patches should have been applied before 2.6.35 was released.
+> >  Someone dropped the ball.  2.6.35 is broken for a number of PowerPC
+> > boards:
+> >=20
+> > $ make mpc85xx_defconfig
+> > ....
+> > $ make
+> > ....
+> >   CC      arch/powerpc/sysdev/fsl_rio.o
+> > arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
+> > arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+> > (first use in this function)
+> > arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
+> > is reported only once
+> > arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
+> in.)
+> > make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
+> >=20
+> > --
+> > Timur Tabi
+> > Linux kernel developer at Freescale
+> 
+
+
diff --git a/test/corpora/lkml/cur/1382298775.004354:2, b/test/corpora/lkml/cur/1382298775.004354:2,
new file mode 100644 (file)
index 0000000..2d69a12
--- /dev/null
@@ -0,0 +1,170 @@
+From: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Thu, 5 Aug 2010 10:25:18 -0700
+Lines: 99
+Message-ID: <0CE8B6BE3C4AD74AB97D9D29BD24E552011935BD@CORPEXCH1.na.ads.idt.com>
+References: <20100308191005.GE4324@amak.tundra.com>
+       <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+       <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+       <4381.1280815590@neuling.org>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+       <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com>
+       <26581.1280979260@neuling.org>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Li Yang-R58472 <r58472@freescale.com>, linux-kernel@vger.kernel.org,
+       Alexandre Bounine <abounine@tundra.com>, thomas.moll@sysgo.com,
+       linuxppc-dev@lists.ozlabs.org, Timur Tabi <timur@freescale.com>
+To: "Michael Neuling" <mikey@neuling.org>
+X-From: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Thu Aug 05 19:25:54 2010
+Return-path: <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>
+Envelope-to: glppe-linuxppc-embedded-2@m.gmane.org
+Received: from ozlabs.org ([203.10.76.45])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>)
+       id 1Oh4CX-0002Xd-Hu
+       for glppe-linuxppc-embedded-2@m.gmane.org; Thu, 05 Aug 2010 19:25:54 +0200
+Received: from bilbo.ozlabs.org (localhost [127.0.0.1])
+       by ozlabs.org (Postfix) with ESMTP id ED044100873
+       for <glppe-linuxppc-embedded-2@m.gmane.org>; Fri,  6 Aug 2010 03:25:45 +1000 (EST)
+Received: from mxout1.idt.com (mxout1.idt.com [157.165.5.25])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (Client CN "mxout1.idt.com", Issuer "idt.com" (not verified))
+       by ozlabs.org (Postfix) with ESMTPS id 43F72B6EEA
+       for <linuxppc-dev@lists.ozlabs.org>;
+       Fri,  6 Aug 2010 03:25:34 +1000 (EST)
+Received: from mail.idt.com (localhost [127.0.0.1])
+       by mxout1.idt.com (8.13.1/8.13.1) with ESMTP id o75HPQdX013269;
+       Thu, 5 Aug 2010 10:25:26 -0700
+Received: from corpml1.corp.idt.com (corpml1.corp.idt.com [157.165.140.20])
+       by mail.idt.com (8.13.8/8.13.8) with ESMTP id o75HPMOi016437;
+       Thu, 5 Aug 2010 10:25:23 -0700 (PDT)
+Received: from CORPEXCH1.na.ads.idt.com (localhost [127.0.0.1])
+       by corpml1.corp.idt.com (8.11.7p1+Sun/8.11.7) with ESMTP id
+       o75HPKp19185; Thu, 5 Aug 2010 10:25:21 -0700 (PDT)
+X-MimeOLE: Produced By Microsoft Exchange V6.5
+Content-class: urn:content-classes:message
+In-Reply-To: <26581.1280979260@neuling.org>
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+Thread-Topic: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Thread-Index: Acs0TsVj0+lZKwxtSsOT8qDn1XxpJAAdBmhA
+X-Scanned-By: MIMEDefang 2.43
+X-BeenThere: linuxppc-dev@lists.ozlabs.org
+X-Mailman-Version: 2.1.13
+Precedence: list
+List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org>
+List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>
+List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev>
+List-Post: <mailto:linuxppc-dev@lists.ozlabs.org>
+List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>
+List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>
+Sender: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1019383>
+
+Below is a copy of Leo's message with pointers to the patches.
+
+Alex.
+>Subject: [PATCH] RapidIO,powerpc/85xx: remove MCSR_MASK in fsl_rio
+>
+>Fixes compile problem caused by MCSR_MASK removal from book-E
+definitions.
+
+Hi Alex,
+
+Only with your patch, there will still be problem on SRIO platforms
+other than MPC85xx.
+
+I have posted a patch series to fix this together with several
+compatibility issues a month before.
+
+http://patchwork.ozlabs.org/patch/56135/
+http://patchwork.ozlabs.org/patch/56136/
+http://patchwork.ozlabs.org/patch/56138/
+http://patchwork.ozlabs.org/patch/56137/
+
+
+Can anyone pick the patch series quickly as currently there is a compile
+error when SRIO is enabled.
+
+- Leo
+
+
+> -----Original Message-----
+> From: Michael Neuling [mailto:mikey@neuling.org]
+> Sent: Wednesday, August 04, 2010 11:34 PM
+> To: Bounine, Alexandre
+> Cc: Timur Tabi; Alexandre Bounine; linuxppc-dev@lists.ozlabs.org;
+linux-kernel@vger.kernel.org;
+> thomas.moll@sysgo.com; Kumar Gala
+> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
+port
+> 
+> 
+> 
+> In message
+<0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com> you
+wrote:
+> > Yang Li pointed to these patches in his post from July 23, 2010.
+> > It would be nice to have these patches in mainline code.=20
+> 
+> This is still broken in Kumar's latest tree.  Do you guys wanna repost
+> them so Kumar can pick them up easily?
+> 
+> Mikey
+> 
+> >
+> > > -----Original Message-----
+> > > From: timur.tabi@gmail.com [mailto:timur.tabi@gmail.com] On Behalf
+Of
+> > Timur Tabi
+> > > Sent: Tuesday, August 03, 2010 9:02 AM
+> > > To: Bounine, Alexandre
+> > > Cc: Michael Neuling; Alexandre Bounine;
+linuxppc-dev@lists.ozlabs.org;
+> > linux-kernel@vger.kernel.org;
+> > > thomas.moll@sysgo.com; Kumar Gala
+> > > Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for
+SRIO
+> > port
+> > >=20
+> > > On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
+> > > <Alexandre.Bounine@idt.com> wrote:
+> > > > This happened after change to book-e definitions.
+> > > > There are patches that address this issue.
+> > >=20
+> > > And those patches should have been applied before 2.6.35 was
+released.
+> > >  Someone dropped the ball.  2.6.35 is broken for a number of
+PowerPC
+> > > boards:
+> > >=20
+> > > $ make mpc85xx_defconfig
+> > > ....
+> > > $ make
+> > > ....
+> > >   CC      arch/powerpc/sysdev/fsl_rio.o
+> > > arch/powerpc/sysdev/fsl_rio.c: In function
+'fsl_rio_mcheck_exception':
+> > > arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
+> > > (first use in this function)
+> > > arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared
+identifier
+> > > is reported only once
+> > > arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it
+appears
+> > in.)
+> > > make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
+> > >=20
+> > > --
+> > > Timur Tabi
+> > > Linux kernel developer at Freescale
+> >
+
+
diff --git a/test/corpora/lkml/cur/1382298775.004363:2, b/test/corpora/lkml/cur/1382298775.004363:2,
new file mode 100644 (file)
index 0000000..f4198fb
--- /dev/null
@@ -0,0 +1,95 @@
+From: Kumar Gala <galak@kernel.crashing.org>
+Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Thu, 5 Aug 2010 12:53:03 -0500
+Lines: 34
+Message-ID: <C9528078-D64C-4944-B960-0E985B3EE0BA@kernel.crashing.org>
+References: <20100308191005.GE4324@amak.tundra.com>
+       <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com>
+       <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com>
+       <4381.1280815590@neuling.org>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com>
+       <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com>
+       <26581.1280979260@neuling.org>
+       <0CE8B6BE3C4AD74AB97D9D29BD24E552011935BD@CORPEXCH1.na.ads.idt.com>
+Mime-Version: 1.0 (Apple Message framework v1081)
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Michael Neuling <mikey@neuling.org>, Li Yang-R58472 <r58472@freescale.com>,
+       linux-kernel@vger.kernel.org,
+       Alexandre Bounine <abounine@tundra.com>, thomas.moll@sysgo.com,
+       linuxppc-dev@lists.ozlabs.org, Timur Tabi <timur@freescale.com>
+To: "Bounine, Alexandre" <Alexandre.Bounine@IDT.COM>
+X-From: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Thu Aug 05 19:53:49 2010
+Return-path: <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>
+Envelope-to: glppe-linuxppc-embedded-2@m.gmane.org
+Received: from ozlabs.org ([203.10.76.45])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org>)
+       id 1Oh4dY-0000mU-OI
+       for glppe-linuxppc-embedded-2@m.gmane.org; Thu, 05 Aug 2010 19:53:49 +0200
+Received: from bilbo.ozlabs.org (localhost [127.0.0.1])
+       by ozlabs.org (Postfix) with ESMTP id C0974B71BD
+       for <glppe-linuxppc-embedded-2@m.gmane.org>; Fri,  6 Aug 2010 03:53:41 +1000 (EST)
+Received: from gate.crashing.org (gate.crashing.org [63.228.1.57])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (Client did not present a certificate)
+       by ozlabs.org (Postfix) with ESMTPS id 707ADB6EF1
+       for <linuxppc-dev@lists.ozlabs.org>;
+       Fri,  6 Aug 2010 03:53:31 +1000 (EST)
+Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1])
+       by gate.crashing.org (8.14.1/8.13.8) with ESMTP id o75Hr4pE020296;
+       Thu, 5 Aug 2010 12:53:05 -0500
+In-Reply-To: <0CE8B6BE3C4AD74AB97D9D29BD24E552011935BD@CORPEXCH1.na.ads.idt.com>
+X-Mailer: Apple Mail (2.1081)
+X-BeenThere: linuxppc-dev@lists.ozlabs.org
+X-Mailman-Version: 2.1.13
+Precedence: list
+List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org>
+List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>
+List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev>
+List-Post: <mailto:linuxppc-dev@lists.ozlabs.org>
+List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>
+List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>,
+       <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>
+Sender: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1019393>
+
+
+On Aug 5, 2010, at 12:25 PM, Bounine, Alexandre wrote:
+
+> Below is a copy of Leo's message with pointers to the patches.
+> 
+> Alex.
+> 
+>> Subject: [PATCH] RapidIO,powerpc/85xx: remove MCSR_MASK in fsl_rio
+>> 
+>> Fixes compile problem caused by MCSR_MASK removal from book-E
+> definitions.
+> 
+> Hi Alex,
+> 
+> Only with your patch, there will still be problem on SRIO platforms
+> other than MPC85xx.
+> 
+> I have posted a patch series to fix this together with several
+> compatibility issues a month before.
+> 
+> http://patchwork.ozlabs.org/patch/56135/
+> http://patchwork.ozlabs.org/patch/56136/
+> http://patchwork.ozlabs.org/patch/56138/
+> http://patchwork.ozlabs.org/patch/56137/
+> 
+> 
+> Can anyone pick the patch series quickly as currently there is a compile
+> error when SRIO is enabled.
+> 
+> - Leo
+
+I'm looking at this now and wondering what we added the mcheck handler for in the first place and what its trying to accomplish.
+
+- k
+
+
diff --git a/test/corpora/lkml/cur/1382298775.004374:2, b/test/corpora/lkml/cur/1382298775.004374:2,
new file mode 100644 (file)
index 0000000..48558ad
--- /dev/null
@@ -0,0 +1,75 @@
+From: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
+Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Date: Thu, 5 Aug 2010 11:17:58 -0700
+Lines: 18
+Message-ID: <0CE8B6BE3C4AD74AB97D9D29BD24E55201193609@CORPEXCH1.na.ads.idt.com>
+References: <20100308191005.GE4324@amak.tundra.com> <AANLkTine3pc2Ai2Woj81Y9fS_KgGs1sIMb2NMR6G74ww@mail.gmail.com> <AANLkTinKbimKyLpvFD7KOvavshu_n8gRcp2BvEJj0XZQ@mail.gmail.com> <4381.1280815590@neuling.org> <0CE8B6BE3C4AD74AB97D9D29BD24E5520114309D@CORPEXCH1.na.ads.idt.com> <AANLkTinpwYnyc1oN1VbtBgUF6bk6E5q_Gq1Dj3WXV3wc@mail.gmail.com> <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com> <26581.1280979260@neuling.org> <0CE8B6BE3C4AD74AB97D9D29BD24E552011935BD@CORPEXCH1.na.ads.idt.com> <C9528078-D64C-4944-B960-0E985B3EE0BA@kernel.crashing.org>
+Mime-Version: 1.0
+Content-Type: text/plain;
+       charset="us-ascii"
+Content-Transfer-Encoding: 8BIT
+Cc: "Michael Neuling" <mikey@neuling.org>,
+       "Timur Tabi" <timur@freescale.com>,
+       "Alexandre Bounine" <abounine@tundra.com>,
+       <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
+       <thomas.moll@sysgo.com>, "Li Yang-R58472" <r58472@freescale.com>
+To: "Kumar Gala" <galak@kernel.crashing.org>
+X-From: linux-kernel-owner@vger.kernel.org Thu Aug 05 20:18:33 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1Oh51V-00075S-1W
+       for glk-linux-kernel-3@lo.gmane.org; Thu, 05 Aug 2010 20:18:33 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S934019Ab0HESSU (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Thu, 5 Aug 2010 14:18:20 -0400
+Received: from mxout1.idt.com ([157.165.5.25]:47318 "EHLO mxout1.idt.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S933252Ab0HESSS convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Thu, 5 Aug 2010 14:18:18 -0400
+Received: from mail.idt.com (localhost [127.0.0.1])
+       by mxout1.idt.com (8.13.1/8.13.1) with ESMTP id o75II315017058;
+       Thu, 5 Aug 2010 11:18:03 -0700
+Received: from corpml1.corp.idt.com (corpml1.corp.idt.com [157.165.140.20])
+       by mail.idt.com (8.13.8/8.13.8) with ESMTP id o75II1Ek021771;
+       Thu, 5 Aug 2010 11:18:01 -0700 (PDT)
+Received: from CORPEXCH1.na.ads.idt.com (localhost [127.0.0.1])
+       by corpml1.corp.idt.com (8.11.7p1+Sun/8.11.7) with ESMTP id o75II0M19896;
+       Thu, 5 Aug 2010 11:18:00 -0700 (PDT)
+X-MimeOLE: Produced By Microsoft Exchange V6.5
+Content-class: urn:content-classes:message
+In-Reply-To: <C9528078-D64C-4944-B960-0E985B3EE0BA@kernel.crashing.org>
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+Thread-Topic: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port
+Thread-Index: Acs0x5rSJ4s7P9ssRjKYVWxFQe3GMgAARQEw
+X-Scanned-By: MIMEDefang 2.43
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1019404>
+
+> I'm looking at this now and wondering what we added the mcheck handler
+for in the first place and what
+> its trying to accomplish.
+> 
+> - k
+
+This protects system from hanging if RIO link fails or enters error
+state. In some situations following maintenance read may initiate link
+recovery from error state.
+
+As it is now, MCheck mostly prevents system from hanging, but it also
+adds sense to return status of maintenance read routine. I am using
+return status in my new set of patches to check if RIO link is valid
+during error recovery.
+
+Alex.
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002253:2, b/test/corpora/lkml/cur/1382298793.002253:2,
new file mode 100644 (file)
index 0000000..cbd67e8
--- /dev/null
@@ -0,0 +1,208 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 00/44] remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:19 -0800
+Lines: 158
+Message-ID: <cover.1289789604.git.joe@perches.com>
+Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,
+       linux-tegra@vger.kernel.org, microblaze-uclinux@itee.uq.edu.au,
+       user-mode-linux-devel@lists.sourceforge.net,
+       user-mode-linux-user@lists.sourceforge.net,
+       cpufreq@vger.kernel.org, linux-i2c@vger.kernel.org,
+       netdev@vger.kernel.org, linux-media@vger.kernel.org,
+       linux-mmc@vger.kernel.org, e1000-devel@lists.sourceforge.net,
+       linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
+       platform-driver-x86@vger.kernel.org,
+       ibm-acpi-devel@lists.sourceforge.net, linux-s390@vger.kernel.org,
+       linux-scsi@vger.kernel.org,
+       spi-devel-general@lists.sourceforge.net,
+       devel@driverdev.osuosl.org, linux-usb@vger.kernel.org,
+       xen-devel@lists.xensource.com, virtualization@lists.osdl.org,
+       v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org,
+       logfs@logfs.org, linux-nfs@vger.kernel.org,
+       ocfs2-devel@oss.oracle.com, linu
+To: Jiri Kosina <trivial@kernel.org>
+X-From: cpufreq-owner@vger.kernel.org Mon Nov 15 04:05:30 2010
+Return-path: <cpufreq-owner@vger.kernel.org>
+Envelope-to: glkc-cpufreq2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <cpufreq-owner@vger.kernel.org>)
+       id 1PHpNp-0000PT-Vh
+       for glkc-cpufreq2@lo.gmane.org; Mon, 15 Nov 2010 04:05:30 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754566Ab0KODF2 (ORCPT <rfc822;glkc-cpufreq2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:28 -0500
+Received: from mail.perches.com ([173.55.12.10]:1118 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751901Ab0KODF1 (ORCPT <rfc822;cpufreq@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:27 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 0D82A24368;
+       Sun, 14 Nov 2010 19:03:52 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+Sender: cpufreq-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <cpufreq.vger.kernel.org>
+X-Mailing-List: cpufreq@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062272>
+
+ya trivial series...
+
+Joe Perches (44):
+  arch/arm: Remove unnecessary semicolons
+  arch/microblaze: Remove unnecessary semicolons
+  arch/um: Remove unnecessary semicolons
+  drivers/cpufreq: Remove unnecessary semicolons
+  drivers/gpio: Remove unnecessary semicolons
+  drivers/i2c: Remove unnecessary semicolons
+  drivers/isdn: Remove unnecessary semicolons
+  drivers/leds: Remove unnecessary semicolons
+  drivers/media/video: Remove unnecessary semicolons
+  drivers/misc: Remove unnecessary semicolons
+  drivers/mmc: Remove unnecessary semicolons
+  drivers/net/bnx2x: Remove unnecessary semicolons
+  drivers/net/e1000e: Remove unnecessary semicolons
+  drivers/net/ixgbe: Remove unnecessary semicolons
+  drivers/net/vxge: Remove unnecessary semicolons
+  drivers/net/wireless/ath: Remove unnecessary semicolons
+  drivers/net/wireless/iwlwifi: Remove unnecessary semicolons
+  drivers/net/cnic.c: Remove unnecessary semicolons
+  drivers/platform/x86: Remove unnecessary semicolons
+  drivers/power: Remove unnecessary semicolons
+  drivers/s390/net: Remove unnecessary semicolons
+  drivers/scsi/be2iscsi: Remove unnecessary semicolons
+  drivers/scsi/bfa: Remove unnecessary semicolons
+  drivers/scsi/lpfc: Remove unnecessary semicolons
+  drivers/scsi/pm8001: Remove unnecessary semicolons
+  drivers/scsi/qla2xxx: Remove unnecessary semicolons
+  drivers/serial: Remove unnecessary semicolons
+  drivers/spi: Remove unnecessary semicolons
+  drivers/staging: Remove unnecessary semicolons
+  drivers/usb/gadget: Remove unnecessary semicolons
+  drivers/xen: Remove unnecessary semicolons
+  fs/9p: Remove unnecessary semicolons
+  fs/ceph: Remove unnecessary semicolons
+  fs/logfs: Remove unnecessary semicolons
+  fs/nfs: Remove unnecessary semicolons
+  fs/ocfs2: Remove unnecessary semicolons
+  fs/ubifs: Remove unnecessary semicolons
+  include/linux/if_macvlan.h: Remove unnecessary semicolons
+  include/net/caif/cfctrl.h: Remove unnecessary semicolons
+  mm/hugetlb.c: Remove unnecessary semicolons
+  net/ipv6/mcast.c: Remove unnecessary semicolons
+  net/sunrpc/addr.c: Remove unnecessary semicolons
+  sound/core/pcm_lib.c: Remove unnecessary semicolons
+  sound/soc/codecs: Remove unnecessary semicolons
+
+ arch/arm/mach-at91/at91cap9_devices.c              |    2 +-
+ arch/arm/mach-at91/at91sam9g45_devices.c           |    2 +-
+ arch/arm/mach-at91/at91sam9rl_devices.c            |    2 +-
+ arch/arm/mach-nuc93x/time.c                        |    2 +-
+ arch/arm/mach-tegra/tegra2_clocks.c                |    2 +-
+ arch/arm/mach-w90x900/cpu.c                        |    2 +-
+ arch/arm/plat-mxc/irq.c                            |    2 +-
+ arch/microblaze/lib/memmove.c                      |    2 +-
+ arch/um/drivers/mmapper_kern.c                     |    2 +-
+ drivers/cpufreq/cpufreq_conservative.c             |    2 +-
+ drivers/gpio/langwell_gpio.c                       |    2 +-
+ drivers/i2c/busses/i2c-designware.c                |    2 +-
+ drivers/isdn/hardware/mISDN/mISDNinfineon.c        |    4 ++--
+ drivers/isdn/hardware/mISDN/mISDNisar.c            |    2 +-
+ drivers/leds/leds-mc13783.c                        |    2 +-
+ drivers/media/video/cx88/cx88-blackbird.c          |    2 +-
+ drivers/media/video/davinci/vpfe_capture.c         |    2 +-
+ drivers/media/video/em28xx/em28xx-cards.c          |    2 +-
+ drivers/misc/bmp085.c                              |    2 +-
+ drivers/misc/isl29020.c                            |    2 +-
+ drivers/mmc/host/davinci_mmc.c                     |    2 +-
+ drivers/net/bnx2x/bnx2x_link.c                     |    4 ++--
+ drivers/net/bnx2x/bnx2x_main.c                     |    2 +-
+ drivers/net/cnic.c                                 |    2 +-
+ drivers/net/e1000e/netdev.c                        |    2 +-
+ drivers/net/ixgbe/ixgbe_sriov.c                    |    2 +-
+ drivers/net/vxge/vxge-main.c                       |    2 +-
+ drivers/net/wireless/ath/ath9k/htc.h               |    2 +-
+ drivers/net/wireless/iwlwifi/iwl-agn.c             |    2 +-
+ drivers/platform/x86/classmate-laptop.c            |    2 +-
+ drivers/platform/x86/thinkpad_acpi.c               |    2 +-
+ drivers/power/intel_mid_battery.c                  |    2 +-
+ drivers/s390/net/qeth_core_sys.c                   |    2 +-
+ drivers/scsi/be2iscsi/be_main.c                    |    4 ++--
+ drivers/scsi/bfa/bfa_fcs_lport.c                   |    2 +-
+ drivers/scsi/lpfc/lpfc_bsg.c                       |    2 +-
+ drivers/scsi/pm8001/pm8001_init.c                  |    2 +-
+ drivers/scsi/qla2xxx/qla_isr.c                     |    4 ++--
+ drivers/scsi/qla2xxx/qla_nx.c                      |    2 +-
+ drivers/serial/mrst_max3110.c                      |    2 +-
+ drivers/spi/amba-pl022.c                           |    2 +-
+ drivers/spi/spi_nuc900.c                           |    2 +-
+ .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c   |    2 +-
+ drivers/staging/ath6kl/os/linux/ar6000_drv.c       |    2 +-
+ drivers/staging/bcm/InterfaceInit.c                |    2 +-
+ drivers/staging/bcm/InterfaceIsr.c                 |    2 +-
+ drivers/staging/bcm/Misc.c                         |    4 ++--
+ .../comedi/drivers/addi-data/APCI1710_Tor.c        |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci1500.c      |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci1516.c      |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci3501.c      |    2 +-
+ drivers/staging/comedi/drivers/amplc_pci230.c      |    2 +-
+ drivers/staging/comedi/drivers/cb_das16_cs.c       |    2 +-
+ drivers/staging/comedi/drivers/comedi_bond.c       |    2 +-
+ drivers/staging/crystalhd/crystalhd_hw.c           |    2 +-
+ drivers/staging/go7007/go7007-driver.c             |    2 +-
+ drivers/staging/iio/accel/lis3l02dq_ring.c         |    2 +-
+ .../staging/intel_sst/intel_sst_drv_interface.c    |    4 ++--
+ drivers/staging/keucr/smilmain.c                   |    4 ++--
+ drivers/staging/keucr/smilsub.c                    |    4 ++--
+ drivers/staging/msm/lcdc_toshiba_wvga_pt.c         |    2 +-
+ drivers/staging/rt2860/common/cmm_data_pci.c       |    4 ++--
+ drivers/staging/rt2860/rt_linux.c                  |    2 +-
+ drivers/staging/rt2860/rtmp.h                      |    2 +-
+ drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c  |    2 +-
+ drivers/staging/rtl8192e/r819xE_phy.c              |    2 +-
+ drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |    2 +-
+ drivers/staging/rtl8192u/r8192U_core.c             |    2 +-
+ drivers/staging/rtl8192u/r819xU_phy.c              |    2 +-
+ drivers/staging/rtl8712/rtl8712_efuse.c            |    2 +-
+ drivers/staging/rtl8712/rtl8712_xmit.c             |    2 +-
+ drivers/staging/rtl8712/rtl871x_xmit.c             |    2 +-
+ drivers/staging/tidspbridge/core/tiomap3430.c      |    4 ++--
+ drivers/staging/tidspbridge/rmgr/nldr.c            |    2 +-
+ drivers/staging/vt6655/card.c                      |    2 +-
+ drivers/staging/vt6655/iwctl.c                     |    2 +-
+ drivers/staging/vt6655/wpa2.c                      |    4 ++--
+ drivers/staging/vt6656/baseband.c                  |    2 +-
+ drivers/staging/vt6656/iwctl.c                     |    2 +-
+ drivers/staging/vt6656/power.c                     |    2 +-
+ drivers/staging/vt6656/wpa2.c                      |    4 ++--
+ drivers/usb/gadget/f_fs.c                          |    2 +-
+ drivers/xen/swiotlb-xen.c                          |    2 +-
+ fs/9p/acl.c                                        |    2 +-
+ fs/9p/xattr.c                                      |    2 +-
+ fs/ceph/mds_client.c                               |    2 +-
+ fs/logfs/readwrite.c                               |    2 +-
+ fs/nfs/getroot.c                                   |    2 +-
+ fs/ocfs2/refcounttree.c                            |    2 +-
+ fs/ubifs/scan.c                                    |    2 +-
+ include/linux/if_macvlan.h                         |    2 +-
+ include/net/caif/cfctrl.h                          |    2 +-
+ mm/hugetlb.c                                       |    2 +-
+ net/ipv6/mcast.c                                   |    2 +-
+ net/sunrpc/addr.c                                  |    2 +-
+ sound/core/pcm_lib.c                               |    2 +-
+ sound/soc/codecs/wm8904.c                          |    2 +-
+ sound/soc/codecs/wm8940.c                          |    1 -
+ sound/soc/codecs/wm8993.c                          |    2 +-
+ sound/soc/codecs/wm_hubs.c                         |    2 +-
+ 100 files changed, 111 insertions(+), 112 deletions(-)
+
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe cpufreq" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002254:2, b/test/corpora/lkml/cur/1382298793.002254:2,
new file mode 100644 (file)
index 0000000..b495912
--- /dev/null
@@ -0,0 +1,100 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 13/44] drivers/net/e1000e: Remove unnecessary
+       semicolons
+Date: Sun, 14 Nov 2010 19:04:32 -0800
+Lines: 34
+Message-ID: <e5cf92d50de7924930d660a5865c3d60d9cd9dc5.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: e1000-devel@lists.sourceforge.net, Bruce Allan <bruce.w.allan@intel.com>,
+       Jesse Brandeburg <jesse.brandeburg@intel.com>,
+       linux-kernel@vger.kernel.org, Greg Rose <gregory.v.rose@intel.com>,
+       John Ronciak <john.ronciak@intel.com>,
+       Jeff Kirsher <jeffrey.t.kirsher@intel.com>, netdev@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: e1000-devel-bounces@lists.sourceforge.net Mon Nov 15 04:05:53 2010
+Return-path: <e1000-devel-bounces@lists.sourceforge.net>
+Envelope-to: glded-e1000-devel@m.gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PHpOD-0000a9-4r
+       for glded-e1000-devel@m.gmane.org; Mon, 15 Nov 2010 04:05:53 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PHpO5-0002a8-SR; Mon, 15 Nov 2010 03:05:45 +0000
+Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
+       helo=mx.sourceforge.net)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <joe@perches.com>) id 1PHpO5-0002Zz-D2
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 03:05:45 +0000
+X-ACL-Warn: 
+Received: from mail.perches.com ([173.55.12.10])
+       by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PHpO1-0002b4-4y
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 03:05:45 +0000
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 462EB24376;
+       Sun, 14 Nov 2010 19:04:03 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-Spam-Score: 0.1 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
+       domain 0.1 AWL AWL: From: address is in the auto white-list
+X-Headers-End: 1PHpO1-0002b4-4y
+X-BeenThere: e1000-devel@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "e100/e1000\(e\)/ixgb/igb/ixgbe development and discussion"
+       <e1000-devel.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>, 
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=e1000-devel>
+List-Post: <mailto:e1000-devel@lists.sourceforge.net>
+List-Help: <mailto:e1000-devel-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>,
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: e1000-devel-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062273>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/e1000e/netdev.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
+index c4ca162..a6d54e4 100644
+--- a/drivers/net/e1000e/netdev.c
++++ b/drivers/net/e1000e/netdev.c
+@@ -4595,7 +4595,7 @@ dma_error:
+                       i += tx_ring->count;
+               i--;
+               buffer_info = &tx_ring->buffer_info[i];
+-              e1000_put_txbuf(adapter, buffer_info);;
++              e1000_put_txbuf(adapter, buffer_info);
+       }
+       return 0;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+_______________________________________________
+E1000-devel mailing list
+E1000-devel@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/e1000-devel
+To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002255:2, b/test/corpora/lkml/cur/1382298793.002255:2,
new file mode 100644 (file)
index 0000000..1c158be
--- /dev/null
@@ -0,0 +1,100 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 14/44] drivers/net/ixgbe: Remove unnecessary
+       semicolons
+Date: Sun, 14 Nov 2010 19:04:33 -0800
+Lines: 34
+Message-ID: <7d2c334daa75c5221946a17d45c9de1901cf06e7.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: e1000-devel@lists.sourceforge.net, Bruce Allan <bruce.w.allan@intel.com>,
+       Jesse Brandeburg <jesse.brandeburg@intel.com>,
+       linux-kernel@vger.kernel.org, Greg Rose <gregory.v.rose@intel.com>,
+       John Ronciak <john.ronciak@intel.com>,
+       Jeff Kirsher <jeffrey.t.kirsher@intel.com>, netdev@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: e1000-devel-bounces@lists.sourceforge.net Mon Nov 15 04:05:55 2010
+Return-path: <e1000-devel-bounces@lists.sourceforge.net>
+Envelope-to: glded-e1000-devel@m.gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PHpOE-0000bY-KU
+       for glded-e1000-devel@m.gmane.org; Mon, 15 Nov 2010 04:05:54 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com)
+       by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PHpO6-0004H7-Hr; Mon, 15 Nov 2010 03:05:46 +0000
+Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
+       helo=mx.sourceforge.net)
+       by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <joe@perches.com>) id 1PHpO6-0004H2-2t
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 03:05:46 +0000
+X-ACL-Warn: 
+Received: from mail.perches.com ([173.55.12.10])
+       by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PHpO1-0006jE-SS
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 03:05:46 +0000
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 0D6062436F;
+       Sun, 14 Nov 2010 19:04:04 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-Spam-Score: 0.1 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
+       domain 0.1 AWL AWL: From: address is in the auto white-list
+X-Headers-End: 1PHpO1-0006jE-SS
+X-BeenThere: e1000-devel@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "e100/e1000\(e\)/ixgb/igb/ixgbe development and discussion"
+       <e1000-devel.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>, 
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=e1000-devel>
+List-Post: <mailto:e1000-devel@lists.sourceforge.net>
+List-Help: <mailto:e1000-devel-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>,
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: e1000-devel-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062274>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/ixgbe/ixgbe_sriov.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c
+index 5428153..93f40bc 100644
+--- a/drivers/net/ixgbe/ixgbe_sriov.c
++++ b/drivers/net/ixgbe/ixgbe_sriov.c
+@@ -68,7 +68,7 @@ static int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
+        * addresses
+        */
+       for (i = 0; i < entries; i++) {
+-              vfinfo->vf_mc_hashes[i] = hash_list[i];;
++              vfinfo->vf_mc_hashes[i] = hash_list[i];
+       }
+       for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
+-- 
+1.7.3.1.g432b3.dirty
+
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+_______________________________________________
+E1000-devel mailing list
+E1000-devel@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/e1000-devel
+To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002256:2, b/test/corpora/lkml/cur/1382298793.002256:2,
new file mode 100644 (file)
index 0000000..8626b81
--- /dev/null
@@ -0,0 +1,89 @@
+From: Joe Perches <joe@perches.com>
+Subject: [uml-user] [PATCH 03/44] arch/um: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:22 -0800
+Lines: 28
+Message-ID: <9ab60a1761dde357ebc028c525dae7572e072588.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Jeff Dike <jdike@addtoit.com>, user-mode-linux-user@lists.sourceforge.net,
+       user-mode-linux-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: user-mode-linux-user-bounces@lists.sourceforge.net Mon Nov 15 04:06:03 2010
+Return-path: <user-mode-linux-user-bounces@lists.sourceforge.net>
+Envelope-to: gluu-user-mode-linux-user-592@gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <user-mode-linux-user-bounces@lists.sourceforge.net>)
+       id 1PHpOM-0000er-Jl
+       for gluu-user-mode-linux-user-592@gmane.org; Mon, 15 Nov 2010 04:06:02 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <user-mode-linux-user-bounces@lists.sourceforge.net>)
+       id 1PHpNz-0002ZS-PM; Mon, 15 Nov 2010 03:05:39 +0000
+Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
+       helo=mx.sourceforge.net)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <joe@perches.com>)
+       id 1PHpNy-0002ZA-Q9; Mon, 15 Nov 2010 03:05:38 +0000
+X-ACL-Warn: 
+Received: from mail.perches.com ([173.55.12.10])
+       by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PHpNu-0002aj-Ks; Mon, 15 Nov 2010 03:05:38 +0000
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 845BB2436D;
+       Sun, 14 Nov 2010 19:03:56 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-Spam-Score: 0.1 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
+       domain 0.1 AWL AWL: From: address is in the auto white-list
+X-Headers-End: 1PHpNu-0002aj-Ks
+X-BeenThere: user-mode-linux-user@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: The user-mode Linux user list
+       <user-mode-linux-user.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user>,
+       <mailto:user-mode-linux-user-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=user-mode-linux-user>
+List-Post: <mailto:user-mode-linux-user@lists.sourceforge.net>
+List-Help: <mailto:user-mode-linux-user-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user>,
+       <mailto:user-mode-linux-user-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: user-mode-linux-user-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062275>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ arch/um/drivers/mmapper_kern.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
+index 8501e7d..6256fa9 100644
+--- a/arch/um/drivers/mmapper_kern.c
++++ b/arch/um/drivers/mmapper_kern.c
+@@ -122,7 +122,7 @@ static int __init mmapper_init(void)
+       if (err) {
+               printk(KERN_ERR "mmapper - misc_register failed, err = %d\n",
+                      err);
+-              return err;;
++              return err;
+       }
+       return 0;
+ }
+-- 
+1.7.3.1.g432b3.dirty
+
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002257:2, b/test/corpora/lkml/cur/1382298793.002257:2,
new file mode 100644 (file)
index 0000000..849da33
--- /dev/null
@@ -0,0 +1,81 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 40/44] mm/hugetlb.c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:59 -0800
+Lines: 28
+Message-ID: <59705f848d35b12ace640f92afcffea02cee0976.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: linux-mm@kvack.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: owner-linux-mm@kvack.org Mon Nov 15 04:06:05 2010
+Return-path: <owner-linux-mm@kvack.org>
+Envelope-to: glkm-linux-mm-2@m.gmane.org
+Received: from kanga.kvack.org ([205.233.56.17])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <owner-linux-mm@kvack.org>)
+       id 1PHpOO-0000gl-5U
+       for glkm-linux-mm-2@m.gmane.org; Mon, 15 Nov 2010 04:06:04 +0100
+Received: by kanga.kvack.org (Postfix)
+       id 6220A8D003C; Sun, 14 Nov 2010 22:06:03 -0500 (EST)
+Delivered-To: linux-mm-outgoing@kvack.org
+Received: by kanga.kvack.org (Postfix, from userid 40)
+       id 5D2638D0017; Sun, 14 Nov 2010 22:06:03 -0500 (EST)
+X-Original-To: int-list-linux-mm@kvack.org
+Delivered-To: int-list-linux-mm@kvack.org
+Received: by kanga.kvack.org (Postfix, from userid 63042)
+       id 427128D003C; Sun, 14 Nov 2010 22:06:03 -0500 (EST)
+X-Original-To: linux-mm@kvack.org
+Delivered-To: linux-mm@kvack.org
+Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243])
+       by kanga.kvack.org (Postfix) with SMTP id C08B98D0017
+       for <linux-mm@kvack.org>; Sun, 14 Nov 2010 22:06:02 -0500 (EST)
+X-VirusChecked: Checked
+X-Env-Sender: joe@perches.com
+X-Msg-Ref: server-4.tower-203.messagelabs.com!1289790361!41887937!1
+X-StarScan-Version: 6.2.9; banners=-,-,-
+X-Originating-IP: [173.55.12.10]
+X-SpamReason: No, hits=0.0 required=7.0 tests=
+Received: (qmail 4485 invoked from network); 15 Nov 2010 03:06:01 -0000
+Received: from mail.perches.com (HELO mail.perches.com) (173.55.12.10)
+  by server-4.tower-203.messagelabs.com with SMTP; 15 Nov 2010 03:06:01 -0000
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id EB70E2436B;
+       Sun, 14 Nov 2010 19:04:28 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
+Sender: owner-linux-mm@kvack.org
+Precedence: bulk
+X-Loop: owner-majordomo@kvack.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062276>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ mm/hugetlb.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/mm/hugetlb.c b/mm/hugetlb.c
+index c4a3558..8875242 100644
+--- a/mm/hugetlb.c
++++ b/mm/hugetlb.c
+@@ -540,7 +540,7 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
+       /* If reserves cannot be used, ensure enough pages are in the pool */
+       if (avoid_reserve && h->free_huge_pages - h->resv_huge_pages == 0)
+-              goto err;;
++              goto err;
+       for_each_zone_zonelist_nodemask(zone, z, zonelist,
+                                               MAX_NR_ZONES - 1, nodemask) {
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe, send a message with 'unsubscribe linux-mm' in
+the body to majordomo@kvack.org.  For more info on Linux MM,
+see: http://www.linux-mm.org/ .
+Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
+Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002258:2, b/test/corpora/lkml/cur/1382298793.002258:2,
new file mode 100644 (file)
index 0000000..271136b
--- /dev/null
@@ -0,0 +1,86 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 31/44] drivers/xen: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:50 -0800
+Lines: 20
+Message-ID: <b3f95cd997859d5d714de322ce17810fe73460cd.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: virtualization@lists.osdl.org,
+       Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
+       xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
+       Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+To: Jiri Kosina <trivial@kernel.org>
+X-From: xen-devel-bounces@lists.xensource.com Mon Nov 15 04:06:05 2010
+Return-path: <xen-devel-bounces@lists.xensource.com>
+Envelope-to: gcvxd-xen-devel@m.gmane.org
+Received: from lists.colo.xensource.com ([70.42.241.110] helo=lists.xensource.com)
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <xen-devel-bounces@lists.xensource.com>)
+       id 1PHpON-0000fV-A9
+       for gcvxd-xen-devel@m.gmane.org; Mon, 15 Nov 2010 04:06:03 +0100
+Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
+       by lists.xensource.com with esmtp (Exim 4.43)
+       id 1PHpOK-0008Sa-VZ; Sun, 14 Nov 2010 19:06:01 -0800
+Received: from spam.xensource.com ([70.42.241.90])
+       by lists.xensource.com with esmtp (Exim 4.43) id 1PHpOG-0008R4-01
+       for xen-devel@lists.xensource.com; Sun, 14 Nov 2010 19:05:56 -0800
+X-ASG-Debug-ID: 1289790355-0739cd1c0001-8pertM
+Received: from mail.perches.com (mail.perches.com [173.55.12.10]) by
+       spam.xensource.com with ESMTP id XhkGr3VGEwXLx5vl for
+       <xen-devel@lists.xensource.com>;
+       Sun, 14 Nov 2010 19:05:55 -0800 (PST)
+X-Barracuda-Envelope-From: joe@perches.com
+X-Barracuda-Apparent-Source-IP: 173.55.12.10
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 044672436E;
+       Sun, 14 Nov 2010 19:04:23 -0800 (PST)
+X-ASG-Orig-Subj: [PATCH 31/44] drivers/xen: Remove unnecessary semicolons
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-Barracuda-Connect: mail.perches.com[173.55.12.10]
+X-Barracuda-Start-Time: 1289790355
+X-Barracuda-URL: http://spam.xensource.com:8000/cgi-mod/mark.cgi
+X-Virus-Scanned: by bsmtpd at xensource.com
+X-Barracuda-Spam-Score: 0.00
+X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
+       QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
+X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.46657
+       Rule breakdown below
+       pts rule name              description
+       ---- ----------------------
+       --------------------------------------------------
+X-BeenThere: xen-devel@lists.xensource.com
+X-Mailman-Version: 2.1.5
+Precedence: list
+List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
+List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
+       <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
+List-Post: <mailto:xen-devel@lists.xensource.com>
+List-Help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
+List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
+       <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
+Sender: xen-devel-bounces@lists.xensource.com
+Errors-To: xen-devel-bounces@lists.xensource.com
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062277>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/xen/swiotlb-xen.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
+index 54469c3..65ea21a 100644
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -54,7 +54,7 @@ u64 start_dma_addr;
+ static dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
+ {
+-      return phys_to_machine(XPADDR(paddr)).maddr;;
++      return phys_to_machine(XPADDR(paddr)).maddr;
+ }
+ static phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
+-- 
+1.7.3.1.g432b3.dirty
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002259:2, b/test/corpora/lkml/cur/1382298793.002259:2,
new file mode 100644 (file)
index 0000000..de8e427
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 11/44] drivers/mmc: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:30 -0800
+Lines: 21
+Message-ID: <6391af02ba7ec4a76c5c5f462d8013fc1f52f999.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Chris Ball <cjb@laptop.org>, linux-mmc@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:20 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOe-0000ny-CV
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:20 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932688Ab0KODFg (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:36 -0500
+Received: from mail.perches.com ([173.55.12.10]:1153 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932652Ab0KODFe (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:34 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id DD07924374;
+       Sun, 14 Nov 2010 19:04:01 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062278>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/mmc/host/davinci_mmc.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
+index e15547c..b643dde 100644
+--- a/drivers/mmc/host/davinci_mmc.c
++++ b/drivers/mmc/host/davinci_mmc.c
+@@ -480,7 +480,7 @@ static void mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
+       struct scatterlist      *sg;
+       unsigned                sg_len;
+       unsigned                bytes_left = host->bytes_left;
+-      const unsigned          shift = ffs(rw_threshold) - 1;;
++      const unsigned          shift = ffs(rw_threshold) - 1;
+       if (host->data_dir == DAVINCI_MMC_DATADIR_WRITE) {
+               template = &host->tx_template;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002260:2, b/test/corpora/lkml/cur/1382298793.002260:2,
new file mode 100644 (file)
index 0000000..2b5145f
--- /dev/null
@@ -0,0 +1,57 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 20/44] drivers/power: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:39 -0800
+Lines: 21
+Message-ID: <2f2ed8aa6745be23063fed55243313839d7ba523.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOe-0000ny-TB
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:21 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932773Ab0KODFm (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:42 -0500
+Received: from mail.perches.com ([173.55.12.10]:1185 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932746Ab0KODFk (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:40 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 3664A2436B;
+       Sun, 14 Nov 2010 19:04:08 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062279>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/power/intel_mid_battery.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c
+index 2a10cd3..8397978 100644
+--- a/drivers/power/intel_mid_battery.c
++++ b/drivers/power/intel_mid_battery.c
+@@ -522,7 +522,7 @@ static int pmic_battery_set_charger(struct pmic_power_module_info *pbi,
+       if (retval) {
+               dev_warn(pbi->dev, "%s(): ipc pmic read failed\n",
+                                                               __func__);
+-              return retval;;
++              return retval;
+       }
+       return 0;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002261:2, b/test/corpora/lkml/cur/1382298793.002261:2,
new file mode 100644 (file)
index 0000000..28aac74
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 02/44] arch/microblaze: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:21 -0800
+Lines: 21
+Message-ID: <5d57b90b488b4338bcdc3f0fbf5f6996842bd44d.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Michal Simek <monstr@monstr.eu>, microblaze-uclinux@itee.uq.edu.au,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOd-0000ny-SE
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:20 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932624Ab0KODFc (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:32 -0500
+Received: from mail.perches.com ([173.55.12.10]:1127 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1757330Ab0KODF3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:29 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id EF7FB2436C;
+       Sun, 14 Nov 2010 19:03:55 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062280>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ arch/microblaze/lib/memmove.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c
+index 123e361..810fd68 100644
+--- a/arch/microblaze/lib/memmove.c
++++ b/arch/microblaze/lib/memmove.c
+@@ -182,7 +182,7 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
+                       for (; c >= 4; c -= 4) {
+                               value = *--i_src;
+                               *--i_dst = buf_hold | ((value & 0xFF000000)>> 24);
+-                              buf_hold = (value & 0xFFFFFF) << 8;;
++                              buf_hold = (value & 0xFFFFFF) << 8;
+                       }
+ #endif
+                       /* Realign the source */
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002262:2, b/test/corpora/lkml/cur/1382298793.002262:2,
new file mode 100644 (file)
index 0000000..b931922
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 25/44] drivers/scsi/pm8001: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:44 -0800
+Lines: 21
+Message-ID: <20b352f91642ca45ad730d8eeec0bbd323d26626.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: jack_wang@usish.com, lindar_liu@usish.com,
+       "James E.J. Bottomley" <James.Bottomley@suse.de>,
+       linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOf-0000ny-V3
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:22 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932817Ab0KODFp (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:45 -0500
+Received: from mail.perches.com ([173.55.12.10]:1198 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932690Ab0KODFn (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:43 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 22C0624374;
+       Sun, 14 Nov 2010 19:04:11 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062281>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/scsi/pm8001/pm8001_init.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
+index f8c86b2..be210dd 100644
+--- a/drivers/scsi/pm8001/pm8001_init.c
++++ b/drivers/scsi/pm8001/pm8001_init.c
+@@ -160,7 +160,7 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
+ static void pm8001_tasklet(unsigned long opaque)
+ {
+       struct pm8001_hba_info *pm8001_ha;
+-      pm8001_ha = (struct pm8001_hba_info *)opaque;;
++      pm8001_ha = (struct pm8001_hba_info *)opaque;
+       if (unlikely(!pm8001_ha))
+               BUG_ON(1);
+       PM8001_CHIP_DISP->isr(pm8001_ha);
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002263:2, b/test/corpora/lkml/cur/1382298793.002263:2,
new file mode 100644 (file)
index 0000000..4014b08
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 43/44] sound/core/pcm_lib.c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:05:02 -0800
+Lines: 21
+Message-ID: <9fa8e193ce125ef4fd19a952792629c5ee84953f.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:24 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOg-0000ny-Vl
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:23 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933024Ab0KODGF (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:06:05 -0500
+Received: from mail.perches.com ([173.55.12.10]:1272 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932998Ab0KODGD (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:06:03 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id E309C24378;
+       Sun, 14 Nov 2010 19:04:30 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062282>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ sound/core/pcm_lib.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
+index a1707cc..b75db8e 100644
+--- a/sound/core/pcm_lib.c
++++ b/sound/core/pcm_lib.c
+@@ -223,7 +223,7 @@ static void xrun_log(struct snd_pcm_substream *substream,
+       entry->jiffies = jiffies;
+       entry->pos = pos;
+       entry->period_size = runtime->period_size;
+-      entry->buffer_size = runtime->buffer_size;;
++      entry->buffer_size = runtime->buffer_size;
+       entry->old_hw_ptr = runtime->status->hw_ptr;
+       entry->hw_ptr_base = runtime->hw_ptr_base;
+       log->idx = (log->idx + 1) % XRUN_LOG_CNT;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002264:2, b/test/corpora/lkml/cur/1382298793.002264:2,
new file mode 100644 (file)
index 0000000..17d8127
--- /dev/null
@@ -0,0 +1,103 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:05:03 -0800
+Lines: 62
+Message-ID: <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:24 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOh-0000ny-G0
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:23 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933041Ab0KODGR (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:06:17 -0500
+Received: from mail.perches.com ([173.55.12.10]:1275 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932999Ab0KODGE (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:06:04 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 2AAD92436C;
+       Sun, 14 Nov 2010 19:04:32 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062283>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ sound/soc/codecs/wm8904.c  |    2 +-
+ sound/soc/codecs/wm8940.c  |    1 -
+ sound/soc/codecs/wm8993.c  |    2 +-
+ sound/soc/codecs/wm_hubs.c |    2 +-
+ 4 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
+index 33be84e..99ae66d 100644
+--- a/sound/soc/codecs/wm8904.c
++++ b/sound/soc/codecs/wm8904.c
+@@ -1590,7 +1590,7 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream,
+                      - wm8904->fs);
+       for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) {
+               cur_val = abs((wm8904->sysclk_rate /
+-                             clk_sys_rates[i].ratio) - wm8904->fs);;
++                             clk_sys_rates[i].ratio) - wm8904->fs);
+               if (cur_val < best_val) {
+                       best = i;
+                       best_val = cur_val;
+diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
+index 2cb16f8..e3f3572 100644
+--- a/sound/soc/codecs/wm8940.c
++++ b/sound/soc/codecs/wm8940.c
+@@ -735,7 +735,6 @@ static int wm8940_probe(struct snd_soc_codec *codec)
+               return ret;
+       return ret;
+-;
+ }
+ static int wm8940_remove(struct snd_soc_codec *codec)
+diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
+index 589e3fa..74af9c5 100644
+--- a/sound/soc/codecs/wm8993.c
++++ b/sound/soc/codecs/wm8993.c
+@@ -1225,7 +1225,7 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
+                      - wm8993->fs);
+       for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) {
+               cur_val = abs((wm8993->sysclk_rate /
+-                             clk_sys_rates[i].ratio) - wm8993->fs);;
++                             clk_sys_rates[i].ratio) - wm8993->fs);
+               if (cur_val < best_val) {
+                       best = i;
+                       best_val = cur_val;
+diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
+index 19ca782..2afbc7a 100644
+--- a/sound/soc/codecs/wm_hubs.c
++++ b/sound/soc/codecs/wm_hubs.c
+@@ -112,7 +112,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
+               switch (hubs->dcs_readback_mode) {
+               case 0:
+                       reg_l = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_1)
+-                              & WM8993_DCS_INTEG_CHAN_0_MASK;;
++                              & WM8993_DCS_INTEG_CHAN_0_MASK;
+                       reg_r = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_2)
+                               & WM8993_DCS_INTEG_CHAN_1_MASK;
+                       break;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002265:2, b/test/corpora/lkml/cur/1382298793.002265:2,
new file mode 100644 (file)
index 0000000..c4c55c7
--- /dev/null
@@ -0,0 +1,76 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 19/44] drivers/platform/x86: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:38 -0800
+Lines: 35
+Message-ID: <eda82bcfaad265fc5cd3901bc4f41bfcfac2403b.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
+       Daniel Oliveira Nascimento <don@syst.com.br>,
+       Matthew Garrett <mjg@redhat.com>,
+       Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
+       platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
+       ibm-acpi-devel@lists.sourceforge.net
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOf-0000ny-DL
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:21 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932793Ab0KODFn (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:43 -0500
+Received: from mail.perches.com ([173.55.12.10]:1183 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932690Ab0KODFk (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:40 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 96EF224372;
+       Sun, 14 Nov 2010 19:04:07 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062284>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/platform/x86/classmate-laptop.c |    2 +-
+ drivers/platform/x86/thinkpad_acpi.c    |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
+index 341cbfe..d2b7720 100644
+--- a/drivers/platform/x86/classmate-laptop.c
++++ b/drivers/platform/x86/classmate-laptop.c
+@@ -653,7 +653,7 @@ static void cmpc_keys_handler(struct acpi_device *dev, u32 event)
+       if ((event & 0x0F) < ARRAY_SIZE(cmpc_keys_codes))
+               code = cmpc_keys_codes[event & 0x0F];
+-      inputdev = dev_get_drvdata(&dev->dev);;
++      inputdev = dev_get_drvdata(&dev->dev);
+       input_report_key(inputdev, code, !(event & 0x10));
+ }
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
+index 2d61186..3cd7814 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
+@@ -6345,7 +6345,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
+                       "as change notification\n");
+       tpacpi_hotkey_driver_mask_set(hotkey_driver_mask
+                               | TP_ACPI_HKEY_BRGHTUP_MASK
+-                              | TP_ACPI_HKEY_BRGHTDWN_MASK);;
++                              | TP_ACPI_HKEY_BRGHTDWN_MASK);
+       return 0;
+ }
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002266:2, b/test/corpora/lkml/cur/1382298793.002266:2,
new file mode 100644 (file)
index 0000000..cc36531
--- /dev/null
@@ -0,0 +1,75 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 28/44] drivers/spi: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:47 -0800
+Lines: 35
+Message-ID: <fe5e5e0efbd97eaa32530eef5ed47efdc3252dad.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>,
+       Grant Likely <grant.likely@secretlab.ca>,
+       Wan ZongShun <mcuos.com@gmail.com>,
+       spi-devel-general@lists.sourceforge.net,
+       linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:06:22 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpOg-0000ny-FJ
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:06:22 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932836Ab0KODFr (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:47 -0500
+Received: from mail.perches.com ([173.55.12.10]:1208 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932690Ab0KODFq (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:46 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 454B624375;
+       Sun, 14 Nov 2010 19:04:13 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062285>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/spi/amba-pl022.c |    2 +-
+ drivers/spi/spi_nuc900.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
+index fb3d1b3..2e50631 100644
+--- a/drivers/spi/amba-pl022.c
++++ b/drivers/spi/amba-pl022.c
+@@ -956,7 +956,7 @@ static int configure_dma(struct pl022 *pl022)
+               tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
+               break;
+       case WRITING_U32:
+-              tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;;
++              tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+               break;
+       }
+diff --git a/drivers/spi/spi_nuc900.c b/drivers/spi/spi_nuc900.c
+index dff63be..d5be18b 100644
+--- a/drivers/spi/spi_nuc900.c
++++ b/drivers/spi/spi_nuc900.c
+@@ -449,7 +449,7 @@ err_iomap:
+       release_mem_region(hw->res->start, resource_size(hw->res));
+       kfree(hw->ioarea);
+ err_pdata:
+-      spi_master_put(hw->master);;
++      spi_master_put(hw->master);
+ err_nomem:
+       return err;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002267:2, b/test/corpora/lkml/cur/1382298793.002267:2,
new file mode 100644 (file)
index 0000000..d3acae5
--- /dev/null
@@ -0,0 +1,773 @@
+From: Joe Perches <joe@perches.com>
+Subject: =?UTF-8?q?=5BPATCH=2029/44=5D=20drivers/staging=3A=20Remove=20unnecessary=20semicolons?=
+Date: Sun, 14 Nov 2010 19:04:48 -0800
+Lines: 724
+Message-ID: <3246dc176a2c553078e73332f02d802dd8ef7942.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: multipart/mixed; boundary="===============1088501263=="
+Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman <gregkh@suse.de>,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: devel-bounces@linuxdriverproject.org Mon Nov 15 04:06:51 2010
+Return-path: <devel-bounces@linuxdriverproject.org>
+Envelope-to: glddd-devel@m.gmane.org
+Received: from driverdev.linuxdriverproject.org ([140.211.166.17])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <devel-bounces@linuxdriverproject.org>)
+       id 1PHpP7-000137-TU
+       for glddd-devel@m.gmane.org; Mon, 15 Nov 2010 04:06:50 +0100
+Received: from driverdev.linuxdriverproject.org (localhost [127.0.0.1])
+       by driverdev.linuxdriverproject.org (Postfix) with ESMTP id 01FCE460C4;
+       Sun, 14 Nov 2010 19:05:00 -0800 (PST)
+X-Original-To: devel@driverdev.osuosl.org
+Delivered-To: devel@driverdev.osuosl.org
+Received: from mail.perches.com (mail.perches.com [173.55.12.10])
+       by driverdev.linuxdriverproject.org (Postfix) with ESMTP id 8F70A460C6
+       for <devel@driverdev.osuosl.org>; Sun, 14 Nov 2010 19:04:05 -0800 (PST)
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id C136B2436B;
+       Sun, 14 Nov 2010 19:04:21 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+X-BeenThere: devel@linuxdriverproject.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: Linux Driver Project Developer List <devel.linuxdriverproject.org>
+List-Unsubscribe: <http://driverdev.linuxdriverproject.org/mailman/options/devel>,
+       <mailto:devel-request@linuxdriverproject.org?subject=unsubscribe>
+List-Archive: <http://driverdev.linuxdriverproject.org/pipermail/devel>
+List-Post: <mailto:devel@linuxdriverproject.org>
+List-Help: <mailto:devel-request@linuxdriverproject.org?subject=help>
+List-Subscribe: <http://driverdev.linuxdriverproject.org/mailman/listinfo/devel>,
+       <mailto:devel-request@linuxdriverproject.org?subject=subscribe>
+Sender: devel-bounces@linuxdriverproject.org
+Errors-To: devel-bounces@linuxdriverproject.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062286>
+
+--===============1088501263==
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c   |    2 +-
+ drivers/staging/ath6kl/os/linux/ar6000_drv.c       |    2 +-
+ drivers/staging/bcm/InterfaceInit.c                |    2 +-
+ drivers/staging/bcm/InterfaceIsr.c                 |    2 +-
+ drivers/staging/bcm/Misc.c                         |    4 ++--
+ .../comedi/drivers/addi-data/APCI1710_Tor.c        |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci1500.c      |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci1516.c      |    2 +-
+ .../comedi/drivers/addi-data/hwdrv_apci3501.c      |    2 +-
+ drivers/staging/comedi/drivers/amplc_pci230.c      |    2 +-
+ drivers/staging/comedi/drivers/cb_das16_cs.c       |    2 +-
+ drivers/staging/comedi/drivers/comedi_bond.c       |    2 +-
+ drivers/staging/crystalhd/crystalhd_hw.c           |    2 +-
+ drivers/staging/go7007/go7007-driver.c             |    2 +-
+ drivers/staging/iio/accel/lis3l02dq_ring.c         |    2 +-
+ .../staging/intel_sst/intel_sst_drv_interface.c    |    4 ++--
+ drivers/staging/keucr/smilmain.c                   |    4 ++--
+ drivers/staging/keucr/smilsub.c                    |    4 ++--
+ drivers/staging/msm/lcdc_toshiba_wvga_pt.c         |    2 +-
+ drivers/staging/rt2860/common/cmm_data_pci.c       |    4 ++--
+ drivers/staging/rt2860/rt_linux.c                  |    2 +-
+ drivers/staging/rt2860/rtmp.h                      |    2 +-
+ drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c  |    2 +-
+ drivers/staging/rtl8192e/r819xE_phy.c              |    2 +-
+ drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |    2 +-
+ drivers/staging/rtl8192u/r8192U_core.c             |    2 +-
+ drivers/staging/rtl8192u/r819xU_phy.c              |    2 +-
+ drivers/staging/rtl8712/rtl8712_efuse.c            |    2 +-
+ drivers/staging/rtl8712/rtl8712_xmit.c             |    2 +-
+ drivers/staging/rtl8712/rtl871x_xmit.c             |    2 +-
+ drivers/staging/tidspbridge/core/tiomap3430.c      |    4 ++--
+ drivers/staging/tidspbridge/rmgr/nldr.c            |    2 +-
+ drivers/staging/vt6655/card.c                      |    2 +-
+ drivers/staging/vt6655/iwctl.c                     |    2 +-
+ drivers/staging/vt6655/wpa2.c                      |    4 ++--
+ drivers/staging/vt6656/baseband.c                  |    2 +-
+ drivers/staging/vt6656/iwctl.c                     |    2 +-
+ drivers/staging/vt6656/power.c                     |    2 +-
+ drivers/staging/vt6656/wpa2.c                      |    4 ++--
+ 39 files changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drive=
+rs/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+index c307a55..3963038 100644
+--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
++++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+@@ -876,7 +876,7 @@ HIFAckInterrupt(HIF_DEVICE *device)
+ void
+ HIFUnMaskInterrupt(HIF_DEVICE *device)
+ {
+-    int ret;;
++    int ret;
+=20
+     AR_DEBUG_ASSERT(device !=3D NULL);
+     AR_DEBUG_ASSERT(device->func !=3D NULL);
+diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/stagi=
+ng/ath6kl/os/linux/ar6000_drv.c
+index a659f70..126a36a 100644
+--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
++++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+@@ -4439,7 +4439,7 @@ skip_key:
+         for (i =3D assoc_req_ie_pos; i < assoc_req_ie_pos + assocReqLen =
+- 4; i++) {
+             AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_CONNECT,("%2.2x ", assocInfo[=
+i]));
+             sprintf(pos, "%2.2x", assocInfo[i]);
+-            pos +=3D 2;;
++            pos +=3D 2;
+         }
+         AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_CONNECT,("\n"));
+=20
+diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/In=
+terfaceInit.c
+index 824f9a4..a368011 100644
+--- a/drivers/staging/bcm/InterfaceInit.c
++++ b/drivers/staging/bcm/InterfaceInit.c
+@@ -265,7 +265,7 @@ usbbcm_device_probe(struct usb_interface *intf, const=
+ struct usb_device_id *id)
+               uint32_t uiNackZeroLengthInt=3D4;
+               if(wrmalt(psAdapter, DISABLE_USB_ZERO_LEN_INT, &uiNackZeroLengthInt, s=
+izeof(uiNackZeroLengthInt)))
+               {
+-                      return -EIO;;
++                      return -EIO;
+               }
+       }
+=20
+diff --git a/drivers/staging/bcm/InterfaceIsr.c b/drivers/staging/bcm/Int=
+erfaceIsr.c
+index f928fe4..604d07f 100644
+--- a/drivers/staging/bcm/InterfaceIsr.c
++++ b/drivers/staging/bcm/InterfaceIsr.c
+@@ -87,7 +87,7 @@ static void read_int_callback(struct urb *urb/*, struct=
+ pt_regs *regs*/)
+                               BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Int=
+errupt IN endPoint  has got halted/stalled...need to clear this");
+                               Adapter->bEndPointHalted =3D TRUE ;
+                               wake_up(&Adapter->tx_packet_wait_queue);
+-                              urb->status =3D STATUS_SUCCESS ;;
++                              urb->status =3D STATUS_SUCCESS ;
+                               return;
+               }
+           /* software-driven interface shutdown */
+diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c
+index 22550f7..cd14fec 100644
+--- a/drivers/staging/bcm/Misc.c
++++ b/drivers/staging/bcm/Misc.c
+@@ -764,7 +764,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter)
+=20
+                       /* Wake the LED Thread with IDLEMODE_ENTER State */
+                       Adapter->DriverState =3D LOWPOWER_MODE_ENTER;
+-                      BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL,"LED Thread =
+is Running..Hence Setting LED Event as IDLEMODE_ENTER jiffies:%ld",jiffie=
+s);;
++                      BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL,"LED Thread =
+is Running..Hence Setting LED Event as IDLEMODE_ENTER jiffies:%ld",jiffie=
+s);
+                       wake_up(&Adapter->LEDInfo.notify_led_event);
+=20
+                       /* Wait for 1 SEC for LED to OFF */
+@@ -1410,7 +1410,7 @@ int bcm_parse_target_params(PMINI_ADAPTER Adapter)
+=20
+ void beceem_parse_target_struct(PMINI_ADAPTER Adapter)
+ {
+-      UINT uiHostDrvrCfg6 =3D0, uiEEPROMFlag =3D 0;;
++      UINT uiHostDrvrCfg6 =3D0, uiEEPROMFlag =3D 0;
+=20
+       if(ntohl(Adapter->pstargetparams->m_u32PhyParameter2) & AUTO_SYNC_DISAB=
+LE)
+       {
+diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c b/dr=
+ivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
+index 7361d50..0e6affd 100644
+--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
++++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
+@@ -1008,7 +1008,7 @@ int i_APCI1710_InsnWriteEnableDisableTorCounter(str=
+uct comedi_device *dev,
+       b_ExternGate =3D (unsigned char) data[3];
+       b_CycleMode =3D (unsigned char) data[4];
+       b_InterruptEnable =3D (unsigned char) data[5];
+-      i_ReturnValue =3D insn->n;;
++      i_ReturnValue =3D insn->n;
+       devpriv->tsk_Current =3D current;       /*  Save the current process task str=
+ucture */
+       /**************************/
+       /* Test the module number */
+diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/=
+drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+index 2a8a6c7..62f421a 100644
+--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
++++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+@@ -2850,7 +2850,7 @@ static int i_APCI1500_Reset(struct comedi_device *d=
+ev)
+       i_Logic =3D 0;
+       i_CounterLogic =3D 0;
+       i_InterruptMask =3D 0;
+-      i_InputChannel =3D 0;;
++      i_InputChannel =3D 0;
+       i_TimerCounter1Enabled =3D 0;
+       i_TimerCounter2Enabled =3D 0;
+       i_WatchdogCounter3Enabled =3D 0;
+diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c b/=
+drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
+index 12fcc35..8a584a0 100644
+--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
++++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
+@@ -335,7 +335,7 @@ int i_APCI1516_WriteDigitalOutput(struct comedi_devic=
+e *dev, struct comedi_subde
+                       return -EINVAL;
+               }               /* if else data[3]=3D=3D1) */
+       }                       /* if else data[3]=3D=3D0) */
+-      return (insn->n);;
++      return (insn->n);
+ }
+=20
+ /*
+diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c b/=
+drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
+index 356a189..acaceb0 100644
+--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
++++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
+@@ -339,7 +339,7 @@ int i_APCI3501_ConfigAnalogOutput(struct comedi_devic=
+e *dev, struct comedi_subde
+ int i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, struct comed=
+i_subdevice *s,
+       struct comedi_insn *insn, unsigned int *data)
+ {
+-      unsigned int ul_Command1 =3D 0, ul_Channel_no, ul_Polarity, ul_DAC_Read=
+y =3D 0;;
++      unsigned int ul_Command1 =3D 0, ul_Channel_no, ul_Polarity, ul_DAC_Read=
+y =3D 0;
+=20
+       ul_Channel_no =3D CR_CHAN(insn->chanspec);
+=20
+diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/stag=
+ing/comedi/drivers/amplc_pci230.c
+index 5d06457..7edeb11 100644
+--- a/drivers/staging/comedi/drivers/amplc_pci230.c
++++ b/drivers/staging/comedi/drivers/amplc_pci230.c
+@@ -971,7 +971,7 @@ static int pci230_attach(struct comedi_device *dev, s=
+truct comedi_devconfig *it)
+       if (thisboard->ao_chans > 0) {
+               s->type =3D COMEDI_SUBD_AO;
+               s->subdev_flags =3D SDF_WRITABLE | SDF_GROUND;
+-              s->n_chan =3D thisboard->ao_chans;;
++              s->n_chan =3D thisboard->ao_chans;
+               s->maxdata =3D (1 << thisboard->ao_bits) - 1;
+               s->range_table =3D &pci230_ao_range;
+               s->insn_write =3D &pci230_ao_winsn;
+diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/stagi=
+ng/comedi/drivers/cb_das16_cs.c
+index 0345b4c..bb93685 100644
+--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
++++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
+@@ -169,7 +169,7 @@ static int das16cs_attach(struct comedi_device *dev,
+       if (!link)
+               return -EIO;
+=20
+-      dev->iobase =3D link->resource[0]->start;;
++      dev->iobase =3D link->resource[0]->start;
+       printk("I/O base=3D0x%04lx ", dev->iobase);
+=20
+       printk("fingerprint:\n");
+diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/stagi=
+ng/comedi/drivers/comedi_bond.c
+index cfcbd9b..d8aefb2 100644
+--- a/drivers/staging/comedi/drivers/comedi_bond.c
++++ b/drivers/staging/comedi/drivers/comedi_bond.c
+@@ -370,7 +370,7 @@ static int doDevConfig(struct comedi_device *dev, str=
+uct comedi_devconfig *it)
+       struct comedi_device *devs_opened[COMEDI_NUM_BOARD_MINORS];
+=20
+       memset(devs_opened, 0, sizeof(devs_opened));
+-      devpriv->name[0] =3D 0;;
++      devpriv->name[0] =3D 0;
+       /* Loop through all comedi devices specified on the command-line,
+          building our device list */
+       for (i =3D 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) {
+diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/c=
+rystalhd/crystalhd_hw.c
+index f631857..153ddbf 100644
+--- a/drivers/staging/crystalhd/crystalhd_hw.c
++++ b/drivers/staging/crystalhd/crystalhd_hw.c
+@@ -1711,7 +1711,7 @@ enum BC_STATUS crystalhd_download_fw(struct crystal=
+hd_adp *adp, void *buffer, ui
+       }
+=20
+       BCMLOG(BCMLOG_INFO, "Firmware Downloaded Successfully\n");
+-      return BC_STS_SUCCESS;;
++      return BC_STS_SUCCESS;
+ }
+=20
+ enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
+diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7=
+007/go7007-driver.c
+index b3f42f3..8426a02 100644
+--- a/drivers/staging/go7007/go7007-driver.c
++++ b/drivers/staging/go7007/go7007-driver.c
+@@ -624,7 +624,7 @@ struct go7007 *go7007_alloc(struct go7007_board_info =
+*board, struct device *dev)
+       go->dvd_mode =3D 0;
+       go->interlace_coding =3D 0;
+       for (i =3D 0; i < 4; ++i)
+-              go->modet[i].enable =3D 0;;
++              go->modet[i].enable =3D 0;
+       for (i =3D 0; i < 1624; ++i)
+               go->modet_map[i] =3D 0;
+       go->audio_deliver =3D NULL;
+diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging=
+/iio/accel/lis3l02dq_ring.c
+index 330d5d6..1fd088a 100644
+--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
++++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
+@@ -517,7 +517,7 @@ int lis3l02dq_configure_ring(struct iio_dev *indio_de=
+v)
+=20
+       ret =3D iio_alloc_pollfunc(indio_dev, NULL, &lis3l02dq_poll_func_th);
+       if (ret)
+-              goto error_iio_sw_rb_free;;
++              goto error_iio_sw_rb_free;
+       indio_dev->modes |=3D INDIO_RING_TRIGGERED;
+       return 0;
+=20
+diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/driver=
+s/staging/intel_sst/intel_sst_drv_interface.c
+index 669e298..6443fbd 100644
+--- a/drivers/staging/intel_sst/intel_sst_drv_interface.c
++++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c
+@@ -171,9 +171,9 @@ static int sst_get_sfreq(struct snd_sst_params *str_p=
+aram)
+       case SST_CODEC_TYPE_MP3:
+               return str_param->sparams.uc.mp3_params.sfreq;
+       case SST_CODEC_TYPE_AAC:
+-              return str_param->sparams.uc.aac_params.sfreq;;
++              return str_param->sparams.uc.aac_params.sfreq;
+       case SST_CODEC_TYPE_WMA9:
+-              return str_param->sparams.uc.wma_params.sfreq;;
++              return str_param->sparams.uc.wma_params.sfreq;
+       default:
+               return 0;
+       }
+diff --git a/drivers/staging/keucr/smilmain.c b/drivers/staging/keucr/smi=
+lmain.c
+index bdfbf76..2cbe9f8 100644
+--- a/drivers/staging/keucr/smilmain.c
++++ b/drivers/staging/keucr/smilmain.c
+@@ -153,9 +153,9 @@ int Media_D_ReadSector(struct us_data *us, DWORD star=
+t,WORD count,BYTE *buf)
+       WORD len, bn;
+=20
+       //if (Check_D_MediaPower())        ; =A6b 6250 don't care
+-      //    return(ErrCode);             ;
++      //    return(ErrCode);
+       //if (Check_D_MediaFmt(fdoExt))    ;
+-      //    return(ErrCode);             ;
++      //    return(ErrCode);
+       if (Conv_D_MediaAddr(us, start))
+               return(ErrCode);
+=20
+diff --git a/drivers/staging/keucr/smilsub.c b/drivers/staging/keucr/smil=
+sub.c
+index 1b52535..ce10cf2 100644
+--- a/drivers/staging/keucr/smilsub.c
++++ b/drivers/staging/keucr/smilsub.c
+@@ -763,8 +763,8 @@ int Ssfdc_D_WriteSectForCopy(struct us_data *us, BYTE=
+ *buf, BYTE *redundant)
+       bcb->CDB[7]                     =3D (BYTE)addr;
+       bcb->CDB[6]                     =3D (BYTE)(addr/0x0100);
+       bcb->CDB[5]                     =3D Media.Zone/2;
+-      bcb->CDB[8]                     =3D *(redundant+REDT_ADDR1H);;
+-      bcb->CDB[9]                     =3D *(redundant+REDT_ADDR1L);;
++      bcb->CDB[8]                     =3D *(redundant+REDT_ADDR1H);
++      bcb->CDB[9]                     =3D *(redundant+REDT_ADDR1L);
+=20
+       result =3D ENE_SendScsiCmd(us, FDIR_WRITE, buf, 0);
+       if (result !=3D USB_STOR_XFER_GOOD)
+diff --git a/drivers/staging/msm/lcdc_toshiba_wvga_pt.c b/drivers/staging=
+/msm/lcdc_toshiba_wvga_pt.c
+index 864d7c1..edba78a 100644
+--- a/drivers/staging/msm/lcdc_toshiba_wvga_pt.c
++++ b/drivers/staging/msm/lcdc_toshiba_wvga_pt.c
+@@ -77,7 +77,7 @@ static void toshiba_spi_write(char cmd, uint32 data, in=
+t num)
+=20
+       /* followed by parameter bytes */
+       if (num) {
+-              bp =3D (char *)&data;;
++              bp =3D (char *)&data;
+               bp +=3D (num - 1);
+               while (num) {
+                       toshiba_spi_write_byte(1, *bp);
+diff --git a/drivers/staging/rt2860/common/cmm_data_pci.c b/drivers/stagi=
+ng/rt2860/common/cmm_data_pci.c
+index 43d73a0..7af59ff 100644
+--- a/drivers/staging/rt2860/common/cmm_data_pci.c
++++ b/drivers/staging/rt2860/common/cmm_data_pci.c
+@@ -137,7 +137,7 @@ u16 RtmpPCI_WriteSingleTxResource(struct rt_rtmp_adap=
+ter *pAd,
+=20
+       pTxD->SDPtr0 =3D BufBasePaLow;
+       pTxD->SDLen0 =3D TXINFO_SIZE + TXWI_SIZE + hwHeaderLen; /* include padd=
+ing */
+-      pTxD->SDPtr1 =3D PCI_MAP_SINGLE(pAd, pTxBlk, 0, 1, PCI_DMA_TODEVICE);;
++      pTxD->SDPtr1 =3D PCI_MAP_SINGLE(pAd, pTxBlk, 0, 1, PCI_DMA_TODEVICE);
+       pTxD->SDLen1 =3D pTxBlk->SrcBufLen;
+       pTxD->LastSec0 =3D 0;
+       pTxD->LastSec1 =3D (bIsLast) ? 1 : 0;
+@@ -215,7 +215,7 @@ u16 RtmpPCI_WriteMultiTxResource(struct rt_rtmp_adapt=
+er *pAd,
+=20
+       pTxD->SDPtr0 =3D BufBasePaLow;
+       pTxD->SDLen0 =3D firstDMALen;   /* include padding */
+-      pTxD->SDPtr1 =3D PCI_MAP_SINGLE(pAd, pTxBlk, 0, 1, PCI_DMA_TODEVICE);;
++      pTxD->SDPtr1 =3D PCI_MAP_SINGLE(pAd, pTxBlk, 0, 1, PCI_DMA_TODEVICE);
+       pTxD->SDLen1 =3D pTxBlk->SrcBufLen;
+       pTxD->LastSec0 =3D 0;
+       pTxD->LastSec1 =3D (bIsLast) ? 1 : 0;
+diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/r=
+t_linux.c
+index abfeea1..7dad6ee 100644
+--- a/drivers/staging/rt2860/rt_linux.c
++++ b/drivers/staging/rt2860/rt_linux.c
+@@ -854,7 +854,7 @@ void send_monitor_packets(struct rt_rtmp_adapter *pAd=
+, struct rt_rx_blk *pRxBlk)
+                                                                        RSSI1,
+                                                                        RSSI_1),
+                                   ConvertToRssi(pAd, pRxBlk->pRxWI->RSSI2,
+-                                                RSSI_2));;
++                                                RSSI_2));
+=20
+       ph->signal.did =3D DIDmsg_lnxind_wlansniffrm_signal;
+       ph->signal.status =3D 0;
+diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.=
+h
+index ca54e53..26cc823 100644
+--- a/drivers/staging/rt2860/rtmp.h
++++ b/drivers/staging/rt2860/rtmp.h
+@@ -2978,7 +2978,7 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLE=
+AN IsReqFromAP);
+=20
+ void IterateOnBssTab(struct rt_rtmp_adapter *pAd);
+=20
+-void IterateOnBssTab2(struct rt_rtmp_adapter *pAd);;
++void IterateOnBssTab2(struct rt_rtmp_adapter *pAd);
+=20
+ void JoinParmFill(struct rt_rtmp_adapter *pAd,
+                 struct rt_mlme_join_req *JoinReq, unsigned long BssIdx);
+diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c b/drivers/=
+staging/rtl8192e/ieee80211/ieee80211_tx.c
+index dd8a221..b26b5a8 100644
+--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
++++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
+@@ -822,7 +822,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct ne=
+t_device *dev)
+               {
+                       txb->queue_index =3D UP2AC(skb->priority);
+               } else {
+-                      txb->queue_index =3D WME_AC_BK;;
++                      txb->queue_index =3D WME_AC_BK;
+               }
+=20
+=20
+diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8=
+192e/r819xE_phy.c
+index d83bcbc..50cd0e5 100644
+--- a/drivers/staging/rtl8192e/r819xE_phy.c
++++ b/drivers/staging/rtl8192e/r819xE_phy.c
+@@ -2596,7 +2596,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_de=
+vice* dev, RF90_RADIO_PATH_E
+                       break;
+       }
+=20
+-      return ret;;
++      return ret;
+=20
+ }
+ /***********************************************************************=
+*******
+diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/=
+staging/rtl8192u/ieee80211/ieee80211_tx.c
+index 81aa2ed..ec7845e 100644
+--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+@@ -754,7 +754,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_de=
+vice *dev)
+               {
+                       txb->queue_index =3D UP2AC(skb->priority);
+               } else {
+-                      txb->queue_index =3D WME_AC_BK;;
++                      txb->queue_index =3D WME_AC_BK;
+               }
+=20
+=20
+diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl=
+8192u/r8192U_core.c
+index 494f180..1139a27 100644
+--- a/drivers/staging/rtl8192u/r8192U_core.c
++++ b/drivers/staging/rtl8192u/r8192U_core.c
+@@ -5085,7 +5085,7 @@ static void rtl8192_query_rxphystatus(
+                       //Get Rx snr value in DB
+                       tmp_rxsnr =3D   pofdm_buf->rxsnr_X[i];
+                       rx_snrX =3D (char)(tmp_rxsnr);
+-                      //rx_snrX >>=3D 1;;
++                      //rx_snrX >>=3D 1;
+                       rx_snrX /=3D 2;
+                       priv->stats.rxSNRdB[i] =3D (long)rx_snrX;
+=20
+diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8=
+192u/r819xU_phy.c
+index a3adaed..8e10992 100644
+--- a/drivers/staging/rtl8192u/r819xU_phy.c
++++ b/drivers/staging/rtl8192u/r819xU_phy.c
+@@ -1011,7 +1011,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_de=
+vice* dev, RF90_RADIO_PATH_E
+                       break;
+       }
+=20
+-      return ret;;
++      return ret;
+=20
+ }
+ /***********************************************************************=
+*******
+diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rt=
+l8712/rtl8712_efuse.c
+index 9730ae1..1dc12b7 100644
+--- a/drivers/staging/rtl8712/rtl8712_efuse.c
++++ b/drivers/staging/rtl8712/rtl8712_efuse.c
+@@ -428,7 +428,7 @@ u8 r8712_efuse_access(struct _adapter *padapter, u8 b=
+Read, u16 start_addr,
+                     u16 cnts, u8 *data)
+ {
+       int i;
+-      u8 res =3D true;;
++      u8 res =3D true;
+=20
+       if (start_addr > EFUSE_MAX_SIZE)
+               return false;
+diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl=
+8712/rtl8712_xmit.c
+index 8edc518..88a1504 100644
+--- a/drivers/staging/rtl8712/rtl8712_xmit.c
++++ b/drivers/staging/rtl8712/rtl8712_xmit.c
+@@ -148,7 +148,7 @@ static u32 get_ff_hwaddr(struct xmit_frame *pxmitfram=
+e)
+               case 0x11:
+               case 0x12:
+               case 0x13:
+-                      addr =3D RTL8712_DMA_H2CCMD;;
++                      addr =3D RTL8712_DMA_H2CCMD;
+                       break;
+               default:
+                       addr =3D RTL8712_DMA_BEQ;/*RTL8712_EP_LO;*/
+diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl=
+8712/rtl871x_xmit.c
+index b8195e3..75f1a6b 100644
+--- a/drivers/staging/rtl8712/rtl871x_xmit.c
++++ b/drivers/staging/rtl8712/rtl871x_xmit.c
+@@ -372,7 +372,7 @@ static sint xmitframe_addmic(struct _adapter *padapte=
+r,
+                                          0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+                                          0x0, 0x0};
+                       datalen =3D pattrib->pktlen - pattrib->hdrlen;
+-                      pframe =3D pxmitframe->buf_addr + TXDESC_OFFSET;;
++                      pframe =3D pxmitframe->buf_addr + TXDESC_OFFSET;
+                       if (bmcst) {
+                               if (!memcmp(psecuritypriv->XGrptxmickey
+                                  [psecuritypriv->XGrpKeyid].skey,
+diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/stag=
+ing/tidspbridge/core/tiomap3430.c
+index 1be081f..a3b0a18 100644
+--- a/drivers/staging/tidspbridge/core/tiomap3430.c
++++ b/drivers/staging/tidspbridge/core/tiomap3430.c
+@@ -596,7 +596,7 @@ static int bridge_brd_start(struct bridge_dev_context=
+ *dev_ctxt,
+               dev_dbg(bridge, "DSP c_int00 Address =3D  0x%x\n", dsp_addr);
+               if (dsp_debug)
+                       while (__raw_readw(dw_sync_addr))
+-                              ;;
++                              ;
+=20
+               /* Wait for DSP to clear word in shared memory */
+               /* Read the Location */
+@@ -1671,7 +1671,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 p=
+a, u32 va,
+                       /* Find a free L2 PT. */
+                       for (i =3D 0; (i < pt->l2_num_pages) &&
+                            (pt->pg_info[i].num_entries !=3D 0); i++)
+-                              ;;
++                              ;
+                       if (i < pt->l2_num_pages) {
+                               l2_page_num =3D i;
+                               l2_base_pa =3D pt->l2_base_pa + (l2_page_num *
+diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/ti=
+dspbridge/rmgr/nldr.c
+index a6ae007..28354bb 100644
+--- a/drivers/staging/tidspbridge/rmgr/nldr.c
++++ b/drivers/staging/tidspbridge/rmgr/nldr.c
+@@ -943,7 +943,7 @@ static int add_ovly_info(void *handle, struct dbll_se=
+ct_info *sect_info,
+=20
+       /* Determine which phase this section belongs to */
+       for (pch =3D sect_name + 1; *pch && *pch !=3D seps; pch++)
+-              ;;
++              ;
+=20
+       if (*pch) {
+               pch++;          /* Skip over the ':' */
+diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.=
+c
+index 32d095c..951a3a8 100644
+--- a/drivers/staging/vt6655/card.c
++++ b/drivers/staging/vt6655/card.c
+@@ -2058,7 +2058,7 @@ bool CARDbSoftwareReset (void *pDeviceHandler)
+ QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwT=
+SF2)
+ {
+     QWORD   qwTSFOffset;
+-    unsigned short wRxBcnTSFOffst=3D 0;;
++    unsigned short wRxBcnTSFOffst=3D 0;
+=20
+     HIDWORD(qwTSFOffset) =3D 0;
+     LODWORD(qwTSFOffset) =3D 0;
+diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwct=
+l.c
+index 92e3399..5e425d1 100644
+--- a/drivers/staging/vt6655/iwctl.c
++++ b/drivers/staging/vt6655/iwctl.c
+@@ -2073,7 +2073,7 @@ int iwctl_giwencodeext(struct net_device *dev,
+              struct iw_point *wrq,
+              char *extra)
+ {
+-              return -EOPNOTSUPP;;
++              return -EOPNOTSUPP;
+ }
+=20
+ int iwctl_siwmlme(struct net_device *dev,
+diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.=
+c
+index 805164b..744799c 100644
+--- a/drivers/staging/vt6655/wpa2.c
++++ b/drivers/staging/vt6655/wpa2.c
+@@ -216,7 +216,7 @@ WPA2vParseRSN (
+         m =3D *((unsigned short *) &(pRSN->abyRSN[4]));
+=20
+         if (pRSN->len >=3D 10+m*4) { // ver(2) + GK(4) + PK count(2) + P=
+KS(4*m) + AKMSS count(2)
+-            pBSSNode->wAKMSSAuthCount =3D *((unsigned short *) &(pRSN->a=
+byRSN[6+4*m]));;
++            pBSSNode->wAKMSSAuthCount =3D *((unsigned short *) &(pRSN->a=
+byRSN[6+4*m]));
+             j =3D 0;
+             pbyOUI =3D &(pRSN->abyRSN[8+4*m]);
+             for (i =3D 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof=
+(pBSSNode->abyAKMSSAuthType)/sizeof(unsigned char)); i++) {
+@@ -235,7 +235,7 @@ WPA2vParseRSN (
+             pBSSNode->wAKMSSAuthCount =3D (unsigned short)j;
+             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", p=
+BSSNode->wAKMSSAuthCount);
+=20
+-            n =3D *((unsigned short *) &(pRSN->abyRSN[6+4*m]));;
++            n =3D *((unsigned short *) &(pRSN->abyRSN[6+4*m]));
+             if (pRSN->len >=3D 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PK=
+S(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2)
+                 pBSSNode->sRSNCapObj.bRSNCapExist =3D true;
+                 pBSSNode->sRSNCapObj.wRSNCap =3D *((unsigned short *) &(=
+pRSN->abyRSN[8+4*m+4*n]));
+diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/b=
+aseband.c
+index e5add20..0d11147 100644
+--- a/drivers/staging/vt6656/baseband.c
++++ b/drivers/staging/vt6656/baseband.c
+@@ -963,7 +963,7 @@ BBvSetAntennaMode (PSDevice pDevice, BYTE byAntennaMo=
+de)
+             break;
+         case ANT_RXB:
+             pDevice->byBBRxConf &=3D 0xFE;
+-            pDevice->byBBRxConf |=3D 0x02;;
++            pDevice->byBBRxConf |=3D 0x02;
+             break;
+     }
+=20
+diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwct=
+l.c
+index 0004be8..2121205 100644
+--- a/drivers/staging/vt6656/iwctl.c
++++ b/drivers/staging/vt6656/iwctl.c
+@@ -1883,7 +1883,7 @@ int iwctl_giwencodeext(struct net_device *dev,
+              struct iw_point *wrq,
+              char *extra)
+ {
+-              return -EOPNOTSUPP;;
++              return -EOPNOTSUPP;
+ }
+=20
+ int iwctl_siwmlme(struct net_device *dev,
+diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/powe=
+r.c
+index 0c12fd3..e8c1b35 100644
+--- a/drivers/staging/vt6656/power.c
++++ b/drivers/staging/vt6656/power.c
+@@ -192,7 +192,7 @@ BOOL PSbConsiderPowerDown(void *hDeviceContext,
+     // check if already in Doze mode
+     ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &by=
+Data);
+     if ( (byData & PSCTL_PS) !=3D 0 )
+-        return TRUE;;
++        return TRUE;
+=20
+     if (pMgmt->eCurrMode !=3D WMAC_MODE_IBSS_STA) {
+         // check if in TIM wake period
+diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.=
+c
+index 6d13190..d4f3f75 100644
+--- a/drivers/staging/vt6656/wpa2.c
++++ b/drivers/staging/vt6656/wpa2.c
+@@ -215,7 +215,7 @@ WPA2vParseRSN (
+         m =3D *((PWORD) &(pRSN->abyRSN[4]));
+=20
+         if (pRSN->len >=3D 10+m*4) { // ver(2) + GK(4) + PK count(2) + P=
+KS(4*m) + AKMSS count(2)
+-            pBSSNode->wAKMSSAuthCount =3D *((PWORD) &(pRSN->abyRSN[6+4*m=
+]));;
++            pBSSNode->wAKMSSAuthCount =3D *((PWORD) &(pRSN->abyRSN[6+4*m=
+]));
+             j =3D 0;
+             pbyOUI =3D &(pRSN->abyRSN[8+4*m]);
+             for (i =3D 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof=
+(pBSSNode->abyAKMSSAuthType)/sizeof(BYTE)); i++) {
+@@ -234,7 +234,7 @@ WPA2vParseRSN (
+             pBSSNode->wAKMSSAuthCount =3D (WORD)j;
+             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", p=
+BSSNode->wAKMSSAuthCount);
+=20
+-            n =3D *((PWORD) &(pRSN->abyRSN[6+4*m]));;
++            n =3D *((PWORD) &(pRSN->abyRSN[6+4*m]));
+             if (pRSN->len >=3D 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PK=
+S(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2)
+                 pBSSNode->sRSNCapObj.bRSNCapExist =3D TRUE;
+                 pBSSNode->sRSNCapObj.wRSNCap =3D *((PWORD) &(pRSN->abyRS=
+N[8+4*m+4*n]));
+--=20
+1.7.3.1.g432b3.dirty
+
+
+--===============1088501263==
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+_______________________________________________
+devel mailing list
+devel@linuxdriverproject.org
+http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
+
+--===============1088501263==--
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002268:2, b/test/corpora/lkml/cur/1382298793.002268:2,
new file mode 100644 (file)
index 0000000..116de34
--- /dev/null
@@ -0,0 +1,66 @@
+From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+Subject: [PATCH 42/44] net/sunrpc/addr.c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:05:01 -0800
+Lines: 26
+Message-ID: <aca92092a705e0d21176b5ac7d3581c4f9140dbc.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
+       Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>,
+       Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
+       "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
+       netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Jiri Kosina <trivial-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
+X-From: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Nov 15 04:07:25 2010
+Return-path: <linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glN-linux-nfs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1PHpPh-0001H8-D9
+       for glN-linux-nfs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 15 Nov 2010 04:07:25 +0100
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S932828Ab0KODGd (ORCPT <rfc822;glN-linux-nfs@m.gmane.org>);
+       Sun, 14 Nov 2010 22:06:33 -0500
+Received: from mail.perches.com ([173.55.12.10]:1267 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932988Ab0KODGD (ORCPT <rfc822;linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Sun, 14 Nov 2010 22:06:03 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 3EB452436E;
+       Sun, 14 Nov 2010 19:04:30 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-nfs.vger.kernel.org>
+X-Mailing-List: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062287>
+
+Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+---
+ net/sunrpc/addr.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c
+index 1419d0c..4195233 100644
+--- a/net/sunrpc/addr.c
++++ b/net/sunrpc/addr.c
+@@ -151,7 +151,7 @@ static size_t rpc_pton4(const char *buf, const size_t buflen,
+               return 0;
+       sin->sin_family = AF_INET;
+-      return sizeof(struct sockaddr_in);;
++      return sizeof(struct sockaddr_in);
+ }
+ #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
+the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002269:2, b/test/corpora/lkml/cur/1382298793.002269:2,
new file mode 100644 (file)
index 0000000..2e2652a
--- /dev/null
@@ -0,0 +1,74 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 32/44] fs/9p: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:51 -0800
+Lines: 35
+Message-ID: <f6ae29dfdd0b9ad401f5eb77ae670212689ee921.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Eric Van Hensbergen <ericvh@gmail.com>,
+       Ron Minnich <rminnich@sandia.gov>,
+       Latchesar Ionkov <lucho@ionkov.net>,
+       v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:07:26 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpPg-0001H8-Sy
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:07:25 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932992Ab0KODGD (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:06:03 -0500
+Received: from mail.perches.com ([173.55.12.10]:1227 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932846Ab0KODF4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:56 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id C9F2E2436F;
+       Sun, 14 Nov 2010 19:04:23 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062288>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/9p/acl.c   |    2 +-
+ fs/9p/xattr.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fs/9p/acl.c b/fs/9p/acl.c
+index 12d6023..bc4da9a 100644
+--- a/fs/9p/acl.c
++++ b/fs/9p/acl.c
+@@ -28,7 +28,7 @@ static struct posix_acl *__v9fs_get_acl(struct p9_fid *fid, char *name)
+ {
+       ssize_t size;
+       void *value = NULL;
+-      struct posix_acl *acl = NULL;;
++      struct posix_acl *acl = NULL;
+       size = v9fs_fid_xattr_get(fid, name, NULL, 0);
+       if (size > 0) {
+diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
+index 43ec7df..d288773 100644
+--- a/fs/9p/xattr.c
++++ b/fs/9p/xattr.c
+@@ -133,7 +133,7 @@ int v9fs_xattr_set(struct dentry *dentry, const char *name,
+                       "p9_client_xattrcreate failed %d\n", retval);
+               goto error;
+       }
+-      msize = fid->clnt->msize;;
++      msize = fid->clnt->msize;
+       while (value_len) {
+               if (value_len > (msize - P9_IOHDRSZ))
+                       write_count = msize - P9_IOHDRSZ;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002270:2, b/test/corpora/lkml/cur/1382298793.002270:2,
new file mode 100644 (file)
index 0000000..8e09306
--- /dev/null
@@ -0,0 +1,68 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 41/44] net/ipv6/mcast.c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:05:00 -0800
+Lines: 26
+Message-ID: <1f3e1f7e454f3c62b66fc5f3e1e1ed90d62b7fb0.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: "David S. Miller" <davem@davemloft.net>,
+       Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
+       "Pekka Savola (ipv6)" <pekkas@netcore.fi>,
+       James Morris <jmorris@namei.org>,
+       Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
+       Patrick McHardy <kaber@trash.net>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: netdev-owner@vger.kernel.org Mon Nov 15 04:07:30 2010
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PHpPi-0001H8-UT
+       for linux-netdev-2@lo.gmane.org; Mon, 15 Nov 2010 04:07:27 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933051Ab0KODGq (ORCPT <rfc822;linux-netdev-2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:06:46 -0500
+Received: from mail.perches.com ([173.55.12.10]:1258 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932980Ab0KODGC (ORCPT <rfc822;netdev@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:06:02 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 8F37A24377;
+       Sun, 14 Nov 2010 19:04:29 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062289>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ net/ipv6/mcast.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
+index d1444b9..9c50745 100644
+--- a/net/ipv6/mcast.c
++++ b/net/ipv6/mcast.c
+@@ -257,7 +257,7 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net,
+               return NULL;
+       idev = __in6_dev_get(dev);
+       if (!idev)
+-              return NULL;;
++              return NULL;
+       read_lock_bh(&idev->lock);
+       if (idev->dead) {
+               read_unlock_bh(&idev->lock);
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002271:2, b/test/corpora/lkml/cur/1382298793.002271:2,
new file mode 100644 (file)
index 0000000..144fc89
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 38/44] include/linux/if_macvlan.h: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:57 -0800
+Lines: 21
+Message-ID: <186ca914f887b2354ea3178696edc81cacbb28c6.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Patrick McHardy <kaber@trash.net>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:08:18 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpQX-0001fQ-U4
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:08:18 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933080Ab0KODHz (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:07:55 -0500
+Received: from mail.perches.com ([173.55.12.10]:1249 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932730Ab0KODGA (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:06:00 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id AAEDA24375;
+       Sun, 14 Nov 2010 19:04:27 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062290>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ include/linux/if_macvlan.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
+index 8a2fd66..ac96a2d 100644
+--- a/include/linux/if_macvlan.h
++++ b/include/linux/if_macvlan.h
+@@ -69,7 +69,7 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
+       rx_stats = this_cpu_ptr(vlan->rx_stats);
+       if (likely(success)) {
+               u64_stats_update_begin(&rx_stats->syncp);
+-              rx_stats->rx_packets++;;
++              rx_stats->rx_packets++;
+               rx_stats->rx_bytes += len;
+               if (multicast)
+                       rx_stats->rx_multicast++;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002272:2, b/test/corpora/lkml/cur/1382298793.002272:2,
new file mode 100644 (file)
index 0000000..f276bb4
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 37/44] fs/ubifs: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:56 -0800
+Lines: 21
+Message-ID: <902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Artem Bityutskiy <dedekind1@gmail.com>,
+       Adrian Hunter <adrian.hunter@nokia.com>,
+       linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:08:19 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpQY-0001fQ-EH
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:08:18 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933129Ab0KODH5 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:07:57 -0500
+Received: from mail.perches.com ([173.55.12.10]:1247 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932907Ab0KODF7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:59 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 0CF9424374;
+       Sun, 14 Nov 2010 19:04:27 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062291>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/ubifs/scan.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
+index 3e1ee57..36216b4 100644
+--- a/fs/ubifs/scan.c
++++ b/fs/ubifs/scan.c
+@@ -328,7 +328,7 @@ struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum,
+               if (!quiet)
+                       ubifs_err("empty space starts at non-aligned offset %d",
+                                 offs);
+-              goto corrupted;;
++              goto corrupted;
+       }
+       ubifs_end_scan(c, sleb, lnum, offs);
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002273:2, b/test/corpora/lkml/cur/1382298793.002273:2,
new file mode 100644 (file)
index 0000000..d5eca3b
--- /dev/null
@@ -0,0 +1,64 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 39/44] include/net/caif/cfctrl.h: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:58 -0800
+Lines: 26
+Message-ID: <35914cfea1bd0ab3963e632d02b1fdd52a9d2bc8.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Sjur Braendeland <sjur.brandeland@stericsson.com>,
+       "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: netdev-owner@vger.kernel.org Mon Nov 15 04:08:21 2010
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PHpQW-0001fQ-TC
+       for linux-netdev-2@lo.gmane.org; Mon, 15 Nov 2010 04:08:17 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932988Ab0KODHd (ORCPT <rfc822;linux-netdev-2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:07:33 -0500
+Received: from mail.perches.com ([173.55.12.10]:1252 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932944Ab0KODGB (ORCPT <rfc822;netdev@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:06:01 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 4F8E124376;
+       Sun, 14 Nov 2010 19:04:28 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062292>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ include/net/caif/cfctrl.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/net/caif/cfctrl.h b/include/net/caif/cfctrl.h
+index 9402543..e54f639 100644
+--- a/include/net/caif/cfctrl.h
++++ b/include/net/caif/cfctrl.h
+@@ -51,7 +51,7 @@ struct cfctrl_rsp {
+       void (*restart_rsp)(void);
+       void (*radioset_rsp)(void);
+       void (*reject_rsp)(struct cflayer *layer, u8 linkid,
+-                              struct cflayer *client_layer);;
++                              struct cflayer *client_layer);
+ };
+ /* Link Setup Parameters for CAIF-Links. */
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002274:2, b/test/corpora/lkml/cur/1382298793.002274:2,
new file mode 100644 (file)
index 0000000..087ddf2
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 30/44] drivers/usb/gadget: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:49 -0800
+Lines: 21
+Message-ID: <cdc48b6ab9446585f304c801cca45a2a9d1e37ec.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>,
+       Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:08:56 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpR9-0001sn-P6
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:08:56 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932917Ab0KODF7 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:59 -0500
+Received: from mail.perches.com ([173.55.12.10]:1216 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932842Ab0KODFz (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:55 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 6C4A92436C;
+       Sun, 14 Nov 2010 19:04:22 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062293>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/usb/gadget/f_fs.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
+index 4a830df..38bb200 100644
+--- a/drivers/usb/gadget/f_fs.c
++++ b/drivers/usb/gadget/f_fs.c
+@@ -2096,7 +2096,7 @@ static int __ffs_func_bind_do_descs(enum ffs_entity_type type, u8 *valuep,
+               ep = usb_ep_autoconfig(func->gadget, ds);
+               if (unlikely(!ep))
+                       return -ENOTSUPP;
+-              ep->driver_data = func->eps + idx;;
++              ep->driver_data = func->eps + idx;
+               req = usb_ep_alloc_request(ep, GFP_KERNEL);
+               if (unlikely(!req))
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002275:2, b/test/corpora/lkml/cur/1382298793.002275:2,
new file mode 100644 (file)
index 0000000..32fa526
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 36/44] fs/ocfs2: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:55 -0800
+Lines: 21
+Message-ID: <e32409b17aaa1a54fec85f3654583ef08fcf851c.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Mark Fasheh <mfasheh@suse.com>,
+       Joel Becker <joel.becker@oracle.com>,
+       ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:08:57 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpRA-0001sn-Pm
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:08:57 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933007Ab0KODI2 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:08:28 -0500
+Received: from mail.perches.com ([173.55.12.10]:1239 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932884Ab0KODF7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:59 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 54CEB24372;
+       Sun, 14 Nov 2010 19:04:26 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062294>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/ocfs2/refcounttree.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
+index b5f9160..da14a42 100644
+--- a/fs/ocfs2/refcounttree.c
++++ b/fs/ocfs2/refcounttree.c
+@@ -3704,7 +3704,7 @@ int ocfs2_refcount_cow_xattr(struct inode *inode,
+       context->cow_start = cow_start;
+       context->cow_len = cow_len;
+       context->ref_tree = ref_tree;
+-      context->ref_root_bh = ref_root_bh;;
++      context->ref_root_bh = ref_root_bh;
+       context->cow_object = xv;
+       context->cow_duplicate_clusters = ocfs2_duplicate_clusters_by_jbd;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002276:2, b/test/corpora/lkml/cur/1382298793.002276:2,
new file mode 100644 (file)
index 0000000..9e318aa
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 35/44] fs/nfs: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:54 -0800
+Lines: 21
+Message-ID: <ec29c2321578915d1d219f5ad00b876a3ff1a105.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
+       linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:09:03 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpRB-0001sn-9x
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:08:57 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933153Ab0KODIl (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:08:41 -0500
+Received: from mail.perches.com ([173.55.12.10]:1236 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932876Ab0KODF6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:58 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 8DCD324371;
+       Sun, 14 Nov 2010 19:04:25 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062295>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/nfs/getroot.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
+index ac7b814..e17f628 100644
+--- a/fs/nfs/getroot.c
++++ b/fs/nfs/getroot.c
+@@ -190,7 +190,7 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
+       fattr = nfs_alloc_fattr();
+       if (fattr == NULL)
+-              return ERR_PTR(-ENOMEM);;
++              return ERR_PTR(-ENOMEM);
+       /* get the actual root for this mount */
+       error = server->nfs_client->rpc_ops->getattr(server, mntfh, fattr);
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002277:2, b/test/corpora/lkml/cur/1382298793.002277:2,
new file mode 100644 (file)
index 0000000..7fb2d9a
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 34/44] fs/logfs: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:53 -0800
+Lines: 21
+Message-ID: <0c990bdacb2f9bf256acbb06ca59130585f600b7.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Joern Engel <joern@logfs.org>, logfs@logfs.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:09:34 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpRl-000297-1j
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:09:33 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933187Ab0KODI4 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:08:56 -0500
+Received: from mail.perches.com ([173.55.12.10]:1234 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932859Ab0KODF5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:57 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 0339024370;
+       Sun, 14 Nov 2010 19:04:25 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062296>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/logfs/readwrite.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
+index 6127baf..b4304f2 100644
+--- a/fs/logfs/readwrite.c
++++ b/fs/logfs/readwrite.c
+@@ -481,7 +481,7 @@ static int inode_write_alias(struct super_block *sb,
+                       val = inode_val0(inode);
+                       break;
+               case INODE_USED_OFS:
+-                      val = cpu_to_be64(li->li_used_bytes);;
++                      val = cpu_to_be64(li->li_used_bytes);
+                       break;
+               case INODE_SIZE_OFS:
+                       val = cpu_to_be64(i_size_read(inode));
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002278:2, b/test/corpora/lkml/cur/1382298793.002278:2,
new file mode 100644 (file)
index 0000000..3048c16
--- /dev/null
@@ -0,0 +1,63 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 33/44] fs/ceph: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:52 -0800
+Lines: 26
+Message-ID: <e01252afc842668a94fb0549e2d1833d77a6411f.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Sage Weil <sage@newdream.net>, ceph-devel@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: ceph-devel-owner@vger.kernel.org Mon Nov 15 04:09:34 2010
+Return-path: <ceph-devel-owner@vger.kernel.org>
+Envelope-to: gcfcd-ceph-devel3-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <ceph-devel-owner@vger.kernel.org>)
+       id 1PHpRl-000297-Hx
+       for gcfcd-ceph-devel3-2@lo.gmane.org; Mon, 15 Nov 2010 04:09:33 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932690Ab0KODJN (ORCPT <rfc822;gcfcd-ceph-devel3-2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:09:13 -0500
+Received: from mail.perches.com ([173.55.12.10]:1231 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932849Ab0KODF5 (ORCPT <rfc822;ceph-devel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:57 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 69DEF2436B;
+       Sun, 14 Nov 2010 19:04:24 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: ceph-devel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <ceph-devel.vger.kernel.org>
+X-Mailing-List: ceph-devel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062297>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ fs/ceph/mds_client.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
+index 3142b15..931124c 100644
+--- a/fs/ceph/mds_client.c
++++ b/fs/ceph/mds_client.c
+@@ -2023,7 +2023,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
+               } else  {
+                       struct ceph_inode_info *ci = ceph_inode(req->r_inode);
+                       struct ceph_cap *cap =
+-                              ceph_get_cap_for_mds(ci, req->r_mds);;
++                              ceph_get_cap_for_mds(ci, req->r_mds);
+                       dout("already using auth");
+                       if ((!cap || cap != ci->i_auth_cap) ||
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002279:2, b/test/corpora/lkml/cur/1382298793.002279:2,
new file mode 100644 (file)
index 0000000..1dbe4c3
--- /dev/null
@@ -0,0 +1,88 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 26/44] drivers/scsi/qla2xxx: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:45 -0800
+Lines: 49
+Message-ID: <40854ce1b1e958e2c0bb9b79911d89b45b5e5f27.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>,
+       linux-driver@qlogic.com,
+       "James E.J. Bottomley" <James.Bottomley@suse.de>,
+       linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-scsi-owner@vger.kernel.org Mon Nov 15 04:10:09 2010
+Return-path: <linux-scsi-owner@vger.kernel.org>
+Envelope-to: lnx-linux-scsi@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-scsi-owner@vger.kernel.org>)
+       id 1PHpSK-0002RT-EP
+       for lnx-linux-scsi@lo.gmane.org; Mon, 15 Nov 2010 04:10:08 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932860Ab0KODJt (ORCPT <rfc822;lnx-linux-scsi@m.gmane.org>);
+       Sun, 14 Nov 2010 22:09:49 -0500
+Received: from mail.perches.com ([173.55.12.10]:1202 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932797Ab0KODFo (ORCPT <rfc822;linux-scsi@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:44 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id E65A02436B;
+       Sun, 14 Nov 2010 19:04:11 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-scsi-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-scsi.vger.kernel.org>
+X-Mailing-List: linux-scsi@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062298>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/scsi/qla2xxx/qla_isr.c |    4 ++--
+ drivers/scsi/qla2xxx/qla_nx.c  |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
+index 1f06ddd..59c4870 100644
+--- a/drivers/scsi/qla2xxx/qla_isr.c
++++ b/drivers/scsi/qla2xxx/qla_isr.c
+@@ -1049,7 +1049,7 @@ qla2x00_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
+               }
+               DEBUG2(qla2x00_dump_buffer((uint8_t *)pkt, sizeof(*pkt)));
+       } else {
+-              bsg_job->reply->result =  DID_OK << 16;;
++              bsg_job->reply->result =  DID_OK << 16;
+               bsg_job->reply->reply_payload_rcv_len =
+                   bsg_job->reply_payload.payload_len;
+               bsg_job->reply_len = 0;
+@@ -1144,7 +1144,7 @@ qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
+               DEBUG2(qla2x00_dump_buffer((uint8_t *)pkt, sizeof(*pkt)));
+       }
+       else {
+-              bsg_job->reply->result =  DID_OK << 16;;
++              bsg_job->reply->result =  DID_OK << 16;
+               bsg_job->reply->reply_payload_rcv_len = bsg_job->reply_payload.payload_len;
+               bsg_job->reply_len = 0;
+       }
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
+index 8d9edfb..de2d1eb 100644
+--- a/drivers/scsi/qla2xxx/qla_nx.c
++++ b/drivers/scsi/qla2xxx/qla_nx.c
+@@ -1022,7 +1022,7 @@ ql82xx_rom_lock_d(struct qla_hw_data *ha)
+               qla_printk(KERN_WARNING, ha, "ROM lock failed\n");
+               return -1;
+       }
+-      return 0;;
++      return 0;
+ }
+ static int
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002280:2, b/test/corpora/lkml/cur/1382298793.002280:2,
new file mode 100644 (file)
index 0000000..f8961e7
--- /dev/null
@@ -0,0 +1,57 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 27/44] drivers/serial: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:46 -0800
+Lines: 21
+Message-ID: <57c2393ee99b62bca43fa1c510cae832795069ba.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:10:10 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpSJ-0002RT-DE
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:10:07 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932970Ab0KODJh (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:09:37 -0500
+Received: from mail.perches.com ([173.55.12.10]:1204 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932802Ab0KODFp (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:45 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 7FB8224371;
+       Sun, 14 Nov 2010 19:04:12 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062299>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/serial/mrst_max3110.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/serial/mrst_max3110.c b/drivers/serial/mrst_max3110.c
+index b62857b..00d284c 100644
+--- a/drivers/serial/mrst_max3110.c
++++ b/drivers/serial/mrst_max3110.c
+@@ -56,7 +56,7 @@ struct uart_max3110 {
+       wait_queue_head_t wq;
+       struct task_struct *main_thread;
+       struct task_struct *read_thread;
+-      struct mutex thread_mutex;;
++      struct mutex thread_mutex;
+       u32 baud;
+       u16 cur_conf;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002281:2, b/test/corpora/lkml/cur/1382298793.002281:2,
new file mode 100644 (file)
index 0000000..a1349a9
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 24/44] drivers/scsi/lpfc: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:43 -0800
+Lines: 21
+Message-ID: <1a0612305d3b141f85a6aeef6d91cd6829a80bae.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: James Smart <james.smart@emulex.com>,
+       "James E.J. Bottomley" <James.Bottomley@suse.de>,
+       linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:10:40 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpSn-0002jF-BC
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:10:37 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933110Ab0KODKE (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:10:04 -0500
+Received: from mail.perches.com ([173.55.12.10]:1195 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932782Ab0KODFn (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:43 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 86AD42436E;
+       Sun, 14 Nov 2010 19:04:10 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062300>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/scsi/lpfc/lpfc_bsg.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
+index 7260c3a..9e2c652 100644
+--- a/drivers/scsi/lpfc/lpfc_bsg.c
++++ b/drivers/scsi/lpfc/lpfc_bsg.c
+@@ -617,7 +617,7 @@ lpfc_bsg_rport_els(struct fc_bsg_job *job)
+       dd_data->context_un.iocb.cmdiocbq = cmdiocbq;
+       dd_data->context_un.iocb.rspiocbq = rspiocbq;
+       dd_data->context_un.iocb.set_job = job;
+-      dd_data->context_un.iocb.bmp = NULL;;
++      dd_data->context_un.iocb.bmp = NULL;
+       dd_data->context_un.iocb.ndlp = ndlp;
+       if (phba->cfg_poll & DISABLE_FCP_RING_INT) {
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002282:2, b/test/corpora/lkml/cur/1382298793.002282:2,
new file mode 100644 (file)
index 0000000..49db122
--- /dev/null
@@ -0,0 +1,59 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 23/44] drivers/scsi/bfa: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:42 -0800
+Lines: 21
+Message-ID: <71d0d7db4197f7b6f6b946a295648dc18bd559e0.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Jing Huang <huangj@brocade.com>,
+       "James E.J. Bottomley" <James.Bottomley@suse.de>,
+       linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:10:53 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpT0-0002p1-2I
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:10:50 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932981Ab0KODKh (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:10:37 -0500
+Received: from mail.perches.com ([173.55.12.10]:1192 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932746Ab0KODFm (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:42 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id EFB872436B;
+       Sun, 14 Nov 2010 19:04:09 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062301>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/scsi/bfa/bfa_fcs_lport.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
+index 377cbff..55b3f74 100644
+--- a/drivers/scsi/bfa/bfa_fcs_lport.c
++++ b/drivers/scsi/bfa/bfa_fcs_lport.c
+@@ -1683,7 +1683,7 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
+       memcpy(attr->value, fcs_hba_attr->driver_version, attr->len);
+       attr->len = fc_roundup(attr->len, sizeof(u32));
+       curr_ptr += sizeof(attr->type) + sizeof(attr->len) + attr->len;
+-      len += attr->len;;
++      len += attr->len;
+       count++;
+       attr->len = cpu_to_be16(attr->len + sizeof(attr->type) +
+                            sizeof(attr->len));
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002283:2, b/test/corpora/lkml/cur/1382298793.002283:2,
new file mode 100644 (file)
index 0000000..6b6c939
--- /dev/null
@@ -0,0 +1,68 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 22/44] drivers/scsi/be2iscsi: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:41 -0800
+Lines: 30
+Message-ID: <7d4fbb8d3ac34861808dac24efeebe05011f6b0c.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Jayamohan Kallickal <jayamohank@serverengines.com>,
+       "James E.J. Bottomley" <James.Bottomley@suse.de>,
+       linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:10:52 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpSz-0002p1-Hv
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:10:49 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932862Ab0KODKi (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:10:38 -0500
+Received: from mail.perches.com ([173.55.12.10]:1188 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932757Ab0KODFm (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:42 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 610FF24371;
+       Sun, 14 Nov 2010 19:04:09 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062302>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/scsi/be2iscsi/be_main.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
+index 75a85aa..db60563 100644
+--- a/drivers/scsi/be2iscsi/be_main.c
++++ b/drivers/scsi/be2iscsi/be_main.c
+@@ -618,7 +618,7 @@ static void beiscsi_get_params(struct beiscsi_hba *phba)
+                                   + BE2_NOPOUT_REQ));
+       phba->params.cxns_per_ctrl = phba->fw_config.iscsi_cid_count;
+       phba->params.asyncpdus_per_ctrl = phba->fw_config.iscsi_cid_count * 2;
+-      phba->params.icds_per_ctrl = phba->fw_config.iscsi_icd_count;;
++      phba->params.icds_per_ctrl = phba->fw_config.iscsi_icd_count;
+       phba->params.num_sge_per_io = BE2_SGE;
+       phba->params.defpdu_hdr_sz = BE2_DEFPDU_HDR_SZ;
+       phba->params.defpdu_data_sz = BE2_DEFPDU_DATA_SZ;
+@@ -781,7 +781,7 @@ static irqreturn_t be_isr(int irq, void *dev_id)
+       int isr;
+       phba = dev_id;
+-      ctrl = &phba->ctrl;;
++      ctrl = &phba->ctrl;
+       isr = ioread32(ctrl->csr + CEV_ISR0_OFFSET +
+                      (PCI_FUNC(ctrl->pdev->devfn) * CEV_ISR_SIZE));
+       if (!isr)
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002284:2, b/test/corpora/lkml/cur/1382298793.002284:2,
new file mode 100644 (file)
index 0000000..315c1be
--- /dev/null
@@ -0,0 +1,61 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 15/44] drivers/net/vxge: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:34 -0800
+Lines: 21
+Message-ID: <e86e79a18106cc38715136bfb2e880b38f5ac764.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>,
+       Sivakumar Subramani <sivakumar.subramani@exar.com>,
+       Sreenivasa Honnur <sreenivasa.honnur@exar.com>,
+       Jon Mason <jon.mason@exar.com>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:11:16 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpTP-00032R-QK
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:11:16 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932740Ab0KODFk (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:40 -0500
+Received: from mail.perches.com ([173.55.12.10]:1166 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932690Ab0KODFh (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:37 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id BAAD824377;
+       Sun, 14 Nov 2010 19:04:04 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062303>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/vxge/vxge-main.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
+index 813829f..93e80c5 100644
+--- a/drivers/net/vxge/vxge-main.c
++++ b/drivers/net/vxge/vxge-main.c
+@@ -2062,7 +2062,7 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)
+       struct __vxge_hw_device *hldev;
+       u64 reason;
+       enum vxge_hw_status status;
+-      struct vxgedev *vdev = (struct vxgedev *) dev_id;;
++      struct vxgedev *vdev = (struct vxgedev *)dev_id;
+       vxge_debug_intr(VXGE_TRACE, "%s:%d", __func__, __LINE__);
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002285:2, b/test/corpora/lkml/cur/1382298793.002285:2,
new file mode 100644 (file)
index 0000000..80ec0f9
--- /dev/null
@@ -0,0 +1,61 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 21/44] drivers/s390/net: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:40 -0800
+Lines: 21
+Message-ID: <ea09773876fb36a52a9a750110b381d20767ac12.1289789605.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Ursula Braun <ursula.braun@de.ibm.com>,
+       Frank Blaschka <blaschka@linux.vnet.ibm.com>,
+       linux390@de.ibm.com, Martin Schwidefsky <schwidefsky@de.ibm.com>,
+       Heiko Carstens <heiko.carstens@de.ibm.com>,
+       linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:11:19 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpTR-00032R-T3
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:11:18 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932825Ab0KODLK (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:11:10 -0500
+Received: from mail.perches.com ([173.55.12.10]:1186 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932749Ab0KODFl (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:41 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id C07A924370;
+       Sun, 14 Nov 2010 19:04:08 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062304>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/s390/net/qeth_core_sys.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c
+index 42fa783..b5e967c 100644
+--- a/drivers/s390/net/qeth_core_sys.c
++++ b/drivers/s390/net/qeth_core_sys.c
+@@ -372,7 +372,7 @@ static ssize_t qeth_dev_performance_stats_store(struct device *dev,
+       i = simple_strtoul(buf, &tmp, 16);
+       if ((i == 0) || (i == 1)) {
+               if (i == card->options.performance_stats)
+-                      goto out;;
++                      goto out;
+               card->options.performance_stats = i;
+               if (i == 0)
+                       memset(&card->perf_stats, 0,
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002286:2, b/test/corpora/lkml/cur/1382298793.002286:2,
new file mode 100644 (file)
index 0000000..9045476
--- /dev/null
@@ -0,0 +1,62 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 17/44] drivers/net/wireless/iwlwifi: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:36 -0800
+Lines: 21
+Message-ID: <6beaab935c2c511a5833e855db527976ef05e2dc.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Reinette Chatre <reinette.chatre@intel.com>,
+       Wey-Yi Guy <wey-yi.w.guy@intel.com>,
+       Intel Linux Wireless <ilw@linux.intel.com>,
+       "John W. Linville" <linville@tuxdriver.com>,
+       linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:11:41 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpTn-0003Ei-3m
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:11:39 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933222Ab0KODLe (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:11:34 -0500
+Received: from mail.perches.com ([173.55.12.10]:1174 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932718Ab0KODFj (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:39 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 3C0E524379;
+       Sun, 14 Nov 2010 19:04:06 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062305>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/wireless/iwlwifi/iwl-agn.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
+index c2636a7..f293fb6 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
+@@ -2420,7 +2420,7 @@ static const char *desc_lookup(u32 num)
+       max = ARRAY_SIZE(advanced_lookup) - 1;
+       for (i = 0; i < max; i++) {
+               if (advanced_lookup[i].num == num)
+-                      break;;
++                      break;
+       }
+       return advanced_lookup[i].name;
+ }
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002287:2, b/test/corpora/lkml/cur/1382298793.002287:2,
new file mode 100644 (file)
index 0000000..4fa3cef
--- /dev/null
@@ -0,0 +1,57 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 18/44] drivers/net/cnic.c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:37 -0800
+Lines: 21
+Message-ID: <950331e47b16c2ad28d73502f30f5a0f017b5493.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:12:07 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpUF-0003Pl-09
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:12:07 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933052Ab0KODLd (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:11:33 -0500
+Received: from mail.perches.com ([173.55.12.10]:1176 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932652Ab0KODFj (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:39 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id D093A24378;
+       Sun, 14 Nov 2010 19:04:06 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062306>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/cnic.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
+index 92bac19..594ca9c 100644
+--- a/drivers/net/cnic.c
++++ b/drivers/net/cnic.c
+@@ -1695,7 +1695,7 @@ static int cnic_bnx2x_iscsi_ofld1(struct cnic_dev *dev, struct kwqe *wqes[],
+               *work = num;
+               return -EINVAL;
+       }
+-      *work = 2 + req2->num_additional_wqes;;
++      *work = 2 + req2->num_additional_wqes;
+       l5_cid = req1->iscsi_conn_id;
+       if (l5_cid >= MAX_ISCSI_TBL_SZ)
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002288:2, b/test/corpora/lkml/cur/1382298793.002288:2,
new file mode 100644 (file)
index 0000000..5b1515a
--- /dev/null
@@ -0,0 +1,63 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 16/44] drivers/net/wireless/ath: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:35 -0800
+Lines: 21
+Message-ID: <c375cdc1175018f00066e2220f1d659ca70cde16.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
+       Jouni Malinen <jmalinen@atheros.com>,
+       Vasanthakumar Thiagarajan <vasanth@atheros.com>,
+       Senthil Balasubramanian <senthilkumar@atheros.com>,
+       "John W. Linville" <linville@tuxdriver.com>,
+       linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
+       netdev@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:12:48 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpUt-0003ie-NF
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:12:48 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932786Ab0KODMQ (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:12:16 -0500
+Received: from mail.perches.com ([173.55.12.10]:1169 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932695Ab0KODFi (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:38 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 6AD192437A;
+       Sun, 14 Nov 2010 19:04:05 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062307>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/wireless/ath/ath9k/htc.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
+index 75ecf6a..4c98b93 100644
+--- a/drivers/net/wireless/ath/ath9k/htc.h
++++ b/drivers/net/wireless/ath/ath9k/htc.h
+@@ -434,7 +434,7 @@ void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb,
+ void ath9k_htc_station_work(struct work_struct *work);
+ void ath9k_htc_aggr_work(struct work_struct *work);
+-void ath9k_ani_work(struct work_struct *work);;
++void ath9k_ani_work(struct work_struct *work);
+ int ath9k_tx_init(struct ath9k_htc_priv *priv);
+ void ath9k_tx_tasklet(unsigned long data);
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002289:2, b/test/corpora/lkml/cur/1382298793.002289:2,
new file mode 100644 (file)
index 0000000..a6111d4
--- /dev/null
@@ -0,0 +1,86 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 09/44] drivers/media/video: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:28 -0800
+Lines: 49
+Message-ID: <d7cec5e05200050ee2c7f624eef8c571193b4d92.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
+       linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-media-owner@vger.kernel.org Mon Nov 15 04:13:25 2010
+Return-path: <linux-media-owner@vger.kernel.org>
+Envelope-to: gldv-linux-media@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-media-owner@vger.kernel.org>)
+       id 1PHpVT-00042L-DI
+       for gldv-linux-media@lo.gmane.org; Mon, 15 Nov 2010 04:13:23 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932630Ab0KODFd (ORCPT <rfc822;gldv-linux-media@m.gmane.org>);
+       Sun, 14 Nov 2010 22:05:33 -0500
+Received: from mail.perches.com ([173.55.12.10]:1148 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932627Ab0KODFd (ORCPT <rfc822;linux-media@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:33 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 873E324371;
+       Sun, 14 Nov 2010 19:04:00 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-media-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-media.vger.kernel.org>
+X-Mailing-List: linux-media@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062308>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/media/video/cx88/cx88-blackbird.c  |    2 +-
+ drivers/media/video/davinci/vpfe_capture.c |    2 +-
+ drivers/media/video/em28xx/em28xx-cards.c  |    2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
+index 417d1d5..14b2546 100644
+--- a/drivers/media/video/cx88/cx88-blackbird.c
++++ b/drivers/media/video/cx88/cx88-blackbird.c
+@@ -1065,7 +1065,7 @@ static int mpeg_open(struct file *file)
+               err = drv->request_acquire(drv);
+               if(err != 0) {
+                       dprintk(1,"%s: Unable to acquire hardware, %d\n", __func__, err);
+-                      mutex_unlock(&dev->core->lock);;
++                      mutex_unlock(&dev->core->lock);
+                       return err;
+               }
+       }
+diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c
+index d8e38cc..14f3d54 100644
+--- a/drivers/media/video/davinci/vpfe_capture.c
++++ b/drivers/media/video/davinci/vpfe_capture.c
+@@ -1276,7 +1276,7 @@ static int vpfe_videobuf_prepare(struct videobuf_queue *vq,
+               vb->size = vpfe_dev->fmt.fmt.pix.sizeimage;
+               vb->field = field;
+-              ret = videobuf_iolock(vq, vb, NULL);;
++              ret = videobuf_iolock(vq, vb, NULL);
+               if (ret < 0)
+                       return ret;
+diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
+index 5485923..7aee7f0 100644
+--- a/drivers/media/video/em28xx/em28xx-cards.c
++++ b/drivers/media/video/em28xx/em28xx-cards.c
+@@ -2408,7 +2408,7 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
+               dev->init_data.get_key = em28xx_get_key_em_haup;
+               dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
+       case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
+-              dev->init_data.ir_codes = RC_MAP_WINFAST_USBII_DELUXE;;
++              dev->init_data.ir_codes = RC_MAP_WINFAST_USBII_DELUXE;
+               dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe;
+               dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)";
+               break;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002290:2, b/test/corpora/lkml/cur/1382298793.002290:2,
new file mode 100644 (file)
index 0000000..bf05cb1
--- /dev/null
@@ -0,0 +1,81 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 12/44] drivers/net/bnx2x: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:31 -0800
+Lines: 44
+Message-ID: <2bfaf1f1fe5d503a8a386a433b5187997819d771.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Eilon Greenstein <eilong@broadcom.com>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:13:27 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpVW-00042L-1L
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:13:26 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932754Ab0KODMy (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:12:54 -0500
+Received: from mail.perches.com ([173.55.12.10]:1156 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932660Ab0KODFf (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:35 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id AB58824375;
+       Sun, 14 Nov 2010 19:04:02 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062309>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/net/bnx2x/bnx2x_link.c |    4 ++--
+ drivers/net/bnx2x/bnx2x_main.c |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
+index 5809196..38aeffe 100644
+--- a/drivers/net/bnx2x/bnx2x_link.c
++++ b/drivers/net/bnx2x/bnx2x_link.c
+@@ -3904,7 +3904,7 @@ static u8 bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy,
+                             MDIO_PMA_REG_SFP_TWO_WIRE_CTRL, &val);
+               if ((val & MDIO_PMA_REG_SFP_TWO_WIRE_CTRL_STATUS_MASK) ==
+                   MDIO_PMA_REG_SFP_TWO_WIRE_STATUS_IDLE)
+-                      return 0;;
++                      return 0;
+               msleep(1);
+       }
+       return -EINVAL;
+@@ -3988,7 +3988,7 @@ static u8 bnx2x_8727_read_sfp_module_eeprom(struct bnx2x_phy *phy,
+                             MDIO_PMA_REG_SFP_TWO_WIRE_CTRL, &val);
+               if ((val & MDIO_PMA_REG_SFP_TWO_WIRE_CTRL_STATUS_MASK) ==
+                   MDIO_PMA_REG_SFP_TWO_WIRE_STATUS_IDLE)
+-                      return 0;;
++                      return 0;
+               msleep(1);
+       }
+diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
+index e9ad16f..7ffcb08 100644
+--- a/drivers/net/bnx2x/bnx2x_main.c
++++ b/drivers/net/bnx2x/bnx2x_main.c
+@@ -8078,7 +8078,7 @@ static void __devinit bnx2x_get_port_hwinfo(struct bnx2x *bp)
+       int port = BP_PORT(bp);
+       u32 val, val2;
+       u32 config;
+-      u32 ext_phy_type, ext_phy_config;;
++      u32 ext_phy_type, ext_phy_config;
+       bp->link_params.bp = bp;
+       bp->link_params.port = port;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002292:2, b/test/corpora/lkml/cur/1382298793.002292:2,
new file mode 100644 (file)
index 0000000..3aceed7
--- /dev/null
@@ -0,0 +1,71 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 10/44] drivers/misc: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:29 -0800
+Lines: 35
+Message-ID: <f1f1ff72045c075062d3fbe8d2bfcf67bdb1571d.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:14:21 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpWA-0004SF-ER
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:14:06 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932800Ab0KODNW (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:13:22 -0500
+Received: from mail.perches.com ([173.55.12.10]:1151 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932629Ab0KODFd (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:33 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 4E7E024372;
+       Sun, 14 Nov 2010 19:04:01 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062311>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/misc/bmp085.c   |    2 +-
+ drivers/misc/isl29020.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c
+index 63ee4c1..6b8a394 100644
+--- a/drivers/misc/bmp085.c
++++ b/drivers/misc/bmp085.c
+@@ -216,7 +216,7 @@ static s32 bmp085_get_temperature(struct bmp085_data *data, int *temperature)
+               *temperature = (x1+x2+8) >> 4;
+ exit:
+-      return status;;
++      return status;
+ }
+ /*
+diff --git a/drivers/misc/isl29020.c b/drivers/misc/isl29020.c
+index ca47e62..e6bbf13 100644
+--- a/drivers/misc/isl29020.c
++++ b/drivers/misc/isl29020.c
+@@ -158,7 +158,7 @@ static int als_set_default_config(struct i2c_client *client)
+               dev_err(&client->dev, "default write failed.");
+               return retval;
+       }
+-      return 0;;
++      return 0;
+ }
+ static int  isl29020_probe(struct i2c_client *client,
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002293:2, b/test/corpora/lkml/cur/1382298793.002293:2,
new file mode 100644 (file)
index 0000000..a547a9b
--- /dev/null
@@ -0,0 +1,57 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 08/44] drivers/leds: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:27 -0800
+Lines: 21
+Message-ID: <054f6857b7472d9f4c540c298cef0aa77bce6962.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Richard Purdie <rpurdie@rpsys.net>, linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:14:24 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpWB-0004SF-F9
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:14:07 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932958Ab0KODNw (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:13:52 -0500
+Received: from mail.perches.com ([173.55.12.10]:1145 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932602Ab0KODFc (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:32 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 92C3F24370;
+       Sun, 14 Nov 2010 19:03:59 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062312>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/leds/leds-mc13783.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c
+index f05bb08..f369e56 100644
+--- a/drivers/leds/leds-mc13783.c
++++ b/drivers/leds/leds-mc13783.c
+@@ -234,7 +234,7 @@ static int __devinit mc13783_leds_prepare(struct platform_device *pdev)
+                                                       MC13783_LED_Cx_PERIOD;
+       if (pdata->flags & MC13783_LED_TRIODE_TC3)
+-              reg |= MC13783_LED_Cx_TRIODE_TC_BIT;;
++              reg |= MC13783_LED_Cx_TRIODE_TC_BIT;
+       ret = mc13783_reg_write(dev, MC13783_REG_LED_CONTROL_5, reg);
+       if (ret)
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002294:2, b/test/corpora/lkml/cur/1382298793.002294:2,
new file mode 100644 (file)
index 0000000..aa5821b
--- /dev/null
@@ -0,0 +1,63 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 04/44] drivers/cpufreq: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:23 -0800
+Lines: 26
+Message-ID: <a4bef9c18ce34e80870a07c728ee25e8efac6d9d.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Dave Jones <davej@redhat.com>, cpufreq@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: cpufreq-owner@vger.kernel.org Mon Nov 15 04:16:07 2010
+Return-path: <cpufreq-owner@vger.kernel.org>
+Envelope-to: glkc-cpufreq2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <cpufreq-owner@vger.kernel.org>)
+       id 1PHpY5-0005lg-O4
+       for glkc-cpufreq2@lo.gmane.org; Mon, 15 Nov 2010 04:16:06 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932680Ab0KODO4 (ORCPT <rfc822;glkc-cpufreq2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:14:56 -0500
+Received: from mail.perches.com ([173.55.12.10]:1127 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1757376Ab0KODF3 (ORCPT <rfc822;cpufreq@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:29 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 1F49D2436E;
+       Sun, 14 Nov 2010 19:03:57 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: cpufreq-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <cpufreq.vger.kernel.org>
+X-Mailing-List: cpufreq@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062313>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/cpufreq/cpufreq_conservative.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
+index 526bfbf..b0d8f3d 100644
+--- a/drivers/cpufreq/cpufreq_conservative.c
++++ b/drivers/cpufreq/cpufreq_conservative.c
+@@ -118,7 +118,7 @@ static inline cputime64_t get_cpu_idle_time_jiffy(unsigned int cpu,
+       if (wall)
+               *wall = (cputime64_t)jiffies_to_usecs(cur_wall_time);
+-      return (cputime64_t)jiffies_to_usecs(idle_time);;
++      return (cputime64_t)jiffies_to_usecs(idle_time);
+ }
+ static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall)
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe cpufreq" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002296:2, b/test/corpora/lkml/cur/1382298793.002296:2,
new file mode 100644 (file)
index 0000000..4d337c7
--- /dev/null
@@ -0,0 +1,148 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 01/44] arch/arm: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:20 -0800
+Lines: 105
+Message-ID: <b6d517c8da3ca0d50c836736e76059c89d692b6e.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Russell King <linux@arm.linux.org.uk>,
+       Wan ZongShun <mcuos.com@gmail.com>,
+       Colin Cross <ccross@android.com>,
+       Erik Gilling <konkers@android.com>,
+       Olof Johansson <olof@lixom.net>,
+       Sascha Hauer <kernel@pengutronix.de>,
+       linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,
+       linux-tegra@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:16:10 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpY9-0005lg-2R
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:16:09 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933240Ab0KODPt (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:15:49 -0500
+Received: from mail.perches.com ([173.55.12.10]:1125 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1757314Ab0KODF2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:28 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 4C0C32436B;
+       Sun, 14 Nov 2010 19:03:55 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062315>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ arch/arm/mach-at91/at91cap9_devices.c    |    2 +-
+ arch/arm/mach-at91/at91sam9g45_devices.c |    2 +-
+ arch/arm/mach-at91/at91sam9rl_devices.c  |    2 +-
+ arch/arm/mach-nuc93x/time.c              |    2 +-
+ arch/arm/mach-tegra/tegra2_clocks.c      |    2 +-
+ arch/arm/mach-w90x900/cpu.c              |    2 +-
+ arch/arm/plat-mxc/irq.c                  |    2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
+index d1f775e..308ce7a 100644
+--- a/arch/arm/mach-at91/at91cap9_devices.c
++++ b/arch/arm/mach-at91/at91cap9_devices.c
+@@ -171,7 +171,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
+        */
+       usba_udc_data.pdata.vbus_pin = -EINVAL;
+       usba_udc_data.pdata.num_ep = ARRAY_SIZE(usba_udc_ep);
+-      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));;
++      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));
+       if (data && data->vbus_pin > 0) {
+               at91_set_gpio_input(data->vbus_pin, 0);
+diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
+index 1e8f275..5e9f8a4 100644
+--- a/arch/arm/mach-at91/at91sam9g45_devices.c
++++ b/arch/arm/mach-at91/at91sam9g45_devices.c
+@@ -256,7 +256,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
+ {
+       usba_udc_data.pdata.vbus_pin = -EINVAL;
+       usba_udc_data.pdata.num_ep = ARRAY_SIZE(usba_udc_ep);
+-      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));;
++      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));
+       if (data && data->vbus_pin > 0) {
+               at91_set_gpio_input(data->vbus_pin, 0);
+diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
+index 53aaa94..c49262b 100644
+--- a/arch/arm/mach-at91/at91sam9rl_devices.c
++++ b/arch/arm/mach-at91/at91sam9rl_devices.c
+@@ -145,7 +145,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
+        */
+       usba_udc_data.pdata.vbus_pin = -EINVAL;
+       usba_udc_data.pdata.num_ep = ARRAY_SIZE(usba_udc_ep);
+-      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));;
++      memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep));
+       if (data && data->vbus_pin > 0) {
+               at91_set_gpio_input(data->vbus_pin, 0);
+diff --git a/arch/arm/mach-nuc93x/time.c b/arch/arm/mach-nuc93x/time.c
+index 2f90f9d..f9807c0 100644
+--- a/arch/arm/mach-nuc93x/time.c
++++ b/arch/arm/mach-nuc93x/time.c
+@@ -82,7 +82,7 @@ static void nuc93x_timer_setup(void)
+       timer0_load = (rate / TICKS_PER_SEC);
+       __raw_writel(timer0_load, REG_TICR0);
+-      val |= (PERIOD | COUNTEN | INTEN | PRESCALE);;
++      val |= (PERIOD | COUNTEN | INTEN | PRESCALE);
+       __raw_writel(val, REG_TCSR0);
+ }
+diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c
+index ae3b308..7f9d2252 100644
+--- a/arch/arm/mach-tegra/tegra2_clocks.c
++++ b/arch/arm/mach-tegra/tegra2_clocks.c
+@@ -293,7 +293,7 @@ static int tegra2_super_clk_set_parent(struct clk *c, struct clk *p)
+       const struct clk_mux_sel *sel;
+       int shift;
+-      val = clk_readl(c->reg + SUPER_CLK_MUX);;
++      val = clk_readl(c->reg + SUPER_CLK_MUX);
+       BUG_ON(((val & SUPER_STATE_MASK) != SUPER_STATE_RUN) &&
+               ((val & SUPER_STATE_MASK) != SUPER_STATE_IDLE));
+       shift = ((val & SUPER_STATE_MASK) == SUPER_STATE_IDLE) ?
+diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
+index 83c5632..0a235e5 100644
+--- a/arch/arm/mach-w90x900/cpu.c
++++ b/arch/arm/mach-w90x900/cpu.c
+@@ -60,7 +60,7 @@ static DEFINE_CLK(emc, 7);
+ static DEFINE_SUBCLK(rmii, 2);
+ static DEFINE_CLK(usbd, 8);
+ static DEFINE_CLK(usbh, 9);
+-static DEFINE_CLK(g2d, 10);;
++static DEFINE_CLK(g2d, 10);
+ static DEFINE_CLK(pwm, 18);
+ static DEFINE_CLK(ps2, 24);
+ static DEFINE_CLK(kpi, 25);
+diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c
+index 7331f2a..d7809d0 100644
+--- a/arch/arm/plat-mxc/irq.c
++++ b/arch/arm/plat-mxc/irq.c
+@@ -53,7 +53,7 @@ int imx_irq_set_priority(unsigned char irq, unsigned char prio)
+       unsigned int mask = 0x0F << irq % 8 * 4;
+       if (irq >= MXC_INTERNAL_IRQS)
+-              return -EINVAL;;
++              return -EINVAL;
+       temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8));
+       temp &= ~mask;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002297:2, b/test/corpora/lkml/cur/1382298793.002297:2,
new file mode 100644 (file)
index 0000000..48a49c4
--- /dev/null
@@ -0,0 +1,58 @@
+From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+Subject: [PATCH 06/44] drivers/i2c: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:25 -0800
+Lines: 21
+Message-ID: <04cfa2beee1ed9656e550bb13076b9c57899542e.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: "Jean Delvare (PC drivers, core)" <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
+       "Ben Dooks (embedded platforms)" <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
+       linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+To: Jiri Kosina <trivial-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
+X-From: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Nov 15 04:15:07 2010
+Return-path: <linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: gldi-i2c-1-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1PHpX8-0005AO-Oy
+       for gldi-i2c-1-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 15 Nov 2010 04:15:07 +0100
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S932641Ab0KODOb (ORCPT <rfc822;gldi-i2c-1@m.gmane.org>);
+       Sun, 14 Nov 2010 22:14:31 -0500
+Received: from mail.perches.com ([173.55.12.10]:1138 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932562Ab0KODFa (ORCPT <rfc822;linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Sun, 14 Nov 2010 22:05:30 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 39B6A2436C;
+       Sun, 14 Nov 2010 19:03:58 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-i2c.vger.kernel.org>
+X-Mailing-List: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+
+Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
+---
+ drivers/i2c/busses/i2c-designware.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
+index b664ed8..a93922d 100644
+--- a/drivers/i2c/busses/i2c-designware.c
++++ b/drivers/i2c/busses/i2c-designware.c
+@@ -390,7 +390,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
+       int tx_limit, rx_limit;
+       u32 addr = msgs[dev->msg_write_idx].addr;
+       u32 buf_len = dev->tx_buf_len;
+-      u8 *buf = dev->tx_buf;;
++      u8 *buf = dev->tx_buf;
+       intr_mask = DW_IC_INTR_DEFAULT_MASK;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002298:2, b/test/corpora/lkml/cur/1382298793.002298:2,
new file mode 100644 (file)
index 0000000..4aa3f38
--- /dev/null
@@ -0,0 +1,85 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 07/44] drivers/isdn: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:26 -0800
+Lines: 49
+Message-ID: <c7a38f65340aafb208d50fc3a781602c07aebb0c.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: Karsten Keil <isdn@linux-pingi.de>, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: netdev-owner@vger.kernel.org Mon Nov 15 04:15:06 2010
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PHpX7-0005AO-Lc
+       for linux-netdev-2@lo.gmane.org; Mon, 15 Nov 2010 04:15:06 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932642Ab0KODOJ (ORCPT <rfc822;linux-netdev-2@m.gmane.org>);
+       Sun, 14 Nov 2010 22:14:09 -0500
+Received: from mail.perches.com ([173.55.12.10]:1142 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932587Ab0KODFb (ORCPT <rfc822;netdev@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:31 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 036B82436F;
+       Sun, 14 Nov 2010 19:03:59 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/isdn/hardware/mISDN/mISDNinfineon.c |    4 ++--
+ drivers/isdn/hardware/mISDN/mISDNisar.c     |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+index e90db88..bc0529a 100644
+--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
++++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+@@ -420,7 +420,7 @@ enable_hwirq(struct inf_hw *hw)
+               break;
+       case INF_NICCY:
+               val = inl((u32)hw->cfg.start + NICCY_IRQ_CTRL_REG);
+-              val |= NICCY_IRQ_ENABLE;;
++              val |= NICCY_IRQ_ENABLE;
+               outl(val, (u32)hw->cfg.start + NICCY_IRQ_CTRL_REG);
+               break;
+       case INF_SCT_1:
+@@ -924,7 +924,7 @@ setup_instance(struct inf_hw *card)
+               mISDNipac_init(&card->ipac, card);
+       if (card->ipac.isac.dch.dev.Bprotocols == 0)
+-              goto error_setup;;
++              goto error_setup;
+       err = mISDN_register_device(&card->ipac.isac.dch.dev,
+               &card->pdev->dev, card->name);
+diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c
+index 38eb314..d13fa5b 100644
+--- a/drivers/isdn/hardware/mISDN/mISDNisar.c
++++ b/drivers/isdn/hardware/mISDN/mISDNisar.c
+@@ -264,7 +264,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
+                       while (noc) {
+                               val = le16_to_cpu(*sp++);
+                               *mp++ = val >> 8;
+-                              *mp++ = val & 0xFF;;
++                              *mp++ = val & 0xFF;
+                               noc--;
+                       }
+                       spin_lock_irqsave(isar->hwlock, flags);
+-- 
+1.7.3.1.g432b3.dirty
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002299:2, b/test/corpora/lkml/cur/1382298793.002299:2,
new file mode 100644 (file)
index 0000000..dc35b93
--- /dev/null
@@ -0,0 +1,56 @@
+From: Joe Perches <joe@perches.com>
+Subject: [PATCH 05/44] drivers/gpio: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 19:04:24 -0800
+Lines: 21
+Message-ID: <a04f2c16a94e214f0a1828c4cea95f815a816853.1289789604.git.joe@perches.com>
+References: <cover.1289789604.git.joe@perches.com>
+Cc: linux-kernel@vger.kernel.org
+To: Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:15:13 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHpX9-0005AO-Pv
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:15:08 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933055Ab0KODOp (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:14:45 -0500
+Received: from mail.perches.com ([173.55.12.10]:1136 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932550Ab0KODFa (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:05:30 -0500
+Received: from Joe-Laptop.home (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id A81642436F;
+       Sun, 14 Nov 2010 19:03:57 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1.g432b3.dirty
+In-Reply-To: <cover.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+ drivers/gpio/langwell_gpio.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c
+index 64db9dc..ed05ecb 100644
+--- a/drivers/gpio/langwell_gpio.c
++++ b/drivers/gpio/langwell_gpio.c
+@@ -122,7 +122,7 @@ static int lnw_gpio_direction_output(struct gpio_chip *chip,
+       lnw_gpio_set(chip, offset, value);
+       spin_lock_irqsave(&lnw->lock, flags);
+       value = readl(gpdr);
+-      value |= BIT(offset % 32);;
++      value |= BIT(offset % 32);
+       writel(value, gpdr);
+       spin_unlock_irqrestore(&lnw->lock, flags);
+       return 0;
+-- 
+1.7.3.1.g432b3.dirty
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002302:2, b/test/corpora/lkml/cur/1382298793.002302:2,
new file mode 100644 (file)
index 0000000..7ee679f
--- /dev/null
@@ -0,0 +1,85 @@
+From: "Jack Wang" <jack_wang@usish.com>
+Subject: RE: [PATCH 25/44] drivers/scsi/pm8001: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:27:32 +0800
+Lines: 33
+Message-ID: <1671200DA80140558ED0D17FB55585AD@usish.com.cn>
+References: <cover.1289789604.git.joe@perches.com> <20b352f91642ca45ad730d8eeec0bbd323d26626.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=gb2312
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: <lindar_liu@usish.com>,
+       "'James E.J. Bottomley'" <James.Bottomley@suse.de>,
+       <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
+To: "'Joe Perches'" <joe@perches.com>,
+       "'Jiri Kosina'" <trivial@kernel.org>
+X-From: linux-scsi-owner@vger.kernel.org Mon Nov 15 04:28:10 2010
+Return-path: <linux-scsi-owner@vger.kernel.org>
+Envelope-to: lnx-linux-scsi@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-scsi-owner@vger.kernel.org>)
+       id 1PHpjl-0002I8-68
+       for lnx-linux-scsi@lo.gmane.org; Mon, 15 Nov 2010 04:28:09 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932669Ab0KOD15 convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;lnx-linux-scsi@m.gmane.org>); Sun, 14 Nov 2010 22:27:57 -0500
+Received: from sr-smtp.usish.com ([210.5.144.203]:58240 "EHLO
+       sr-smtp.usish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S932514Ab0KOD14 convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-scsi@vger.kernel.org>); Sun, 14 Nov 2010 22:27:56 -0500
+Received: from outbound.usish.com (unknown [192.168.40.103])
+       by sr-smtp.usish.com (Postfix) with ESMTP id 782BE778067;
+       Mon, 15 Nov 2010 11:20:06 +0800 (CST)
+Received: from outbound.usish.com (outbound.usish.com [127.0.0.1])
+       by postfix.imss70 (Postfix) with ESMTP id 8E538428070;
+       Mon, 15 Nov 2010 11:27:48 +0800 (CST)
+Received: from usishe7a1977d2 (unknown [192.168.58.33])
+       (using TLSv1 with cipher RC4-MD5 (128/128 bits))
+       (No client certificate requested)
+       by outbound.usish.com (Postfix) with ESMTP id 5437142807A;
+       Mon, 15 Nov 2010 11:27:48 +0800 (CST)
+X-Mailer: Microsoft Office Outlook 11
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994
+Thread-Index: AcuEcgXhz8cjF31qQU6VXNE8zpGc0wAAnu4g
+In-Reply-To: <20b352f91642ca45ad730d8eeec0bbd323d26626.1289789605.git.joe@perches.com>
+Sender: linux-scsi-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-scsi.vger.kernel.org>
+X-Mailing-List: linux-scsi@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062321>
+
+>=20
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  drivers/scsi/pm8001/pm8001_init.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+>=20
+> diff --git a/drivers/scsi/pm8001/pm8001_init.c
+> b/drivers/scsi/pm8001/pm8001_init.c
+> index f8c86b2..be210dd 100644
+> --- a/drivers/scsi/pm8001/pm8001_init.c
+> +++ b/drivers/scsi/pm8001/pm8001_init.c
+> @@ -160,7 +160,7 @@ static void pm8001_free(struct pm8001_hba_info
+*pm8001_ha)
+>  static void pm8001_tasklet(unsigned long opaque)
+>  {
+>      struct pm8001_hba_info *pm8001_ha;
+> -    pm8001_ha =3D (struct pm8001_hba_info *)opaque;;
+> +    pm8001_ha =3D (struct pm8001_hba_info *)opaque;
+>      if (unlikely(!pm8001_ha))
+>              BUG_ON(1);
+>      PM8001_CHIP_DISP->isr(pm8001_ha);
+> --
+> 1.7.3.1.g432b3.dirty
+[Jack Wang] Acked-by: Jack Wang <jack_wang@usish.com>
+Thanks=A3=A1
+
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-scsi" i=
+n
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002309:2, b/test/corpora/lkml/cur/1382298793.002309:2,
new file mode 100644 (file)
index 0000000..64153b5
--- /dev/null
@@ -0,0 +1,93 @@
+From: Grant Likely <grant.likely@secretlab.ca>
+Subject: Re: [PATCH 28/44] drivers/spi: Remove unnecessary semicolons
+Date: Sun, 14 Nov 2010 20:57:42 -0700
+Lines: 41
+Message-ID: <20101115035742.GA19965@angua.secretlab.ca>
+References: <cover.1289789604.git.joe@perches.com>
+ <fe5e5e0efbd97eaa32530eef5ed47efdc3252dad.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Jiri Kosina <trivial@kernel.org>,
+       David Brownell <dbrownell@users.sourceforge.net>,
+       Wan ZongShun <mcuos.com@gmail.com>,
+       spi-devel-general@lists.sourceforge.net,
+       linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
+To: Joe Perches <joe@perches.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 04:58:26 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHqD3-0006P9-7p
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 04:58:25 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1757510Ab0KOD5r (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 14 Nov 2010 22:57:47 -0500
+Received: from mail-yx0-f174.google.com ([209.85.213.174]:43928 "EHLO
+       mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1754294Ab0KOD5q (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 14 Nov 2010 22:57:46 -0500
+Received: by yxn35 with SMTP id 35so916234yxn.19
+        for <linux-kernel@vger.kernel.org>; Sun, 14 Nov 2010 19:57:46 -0800 (PST)
+Received: by 10.91.10.20 with SMTP id n20mr7068735agi.56.1289793465914;
+        Sun, 14 Nov 2010 19:57:45 -0800 (PST)
+Received: from angua (S01060002b3d79728.cg.shawcable.net [70.72.87.49])
+        by mx.google.com with ESMTPS id d15sm3276149ana.20.2010.11.14.19.57.43
+        (version=TLSv1/SSLv3 cipher=RC4-MD5);
+        Sun, 14 Nov 2010 19:57:45 -0800 (PST)
+Received: by angua (Postfix, from userid 1000)
+       id 238853C00E5; Sun, 14 Nov 2010 20:57:42 -0700 (MST)
+Content-Disposition: inline
+In-Reply-To: <fe5e5e0efbd97eaa32530eef5ed47efdc3252dad.1289789605.git.joe@perches.com>
+User-Agent: Mutt/1.5.20 (2009-06-14)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062328>
+
+On Sun, Nov 14, 2010 at 07:04:47PM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+applied, thanks.
+
+g.
+
+> ---
+>  drivers/spi/amba-pl022.c |    2 +-
+>  drivers/spi/spi_nuc900.c |    2 +-
+>  2 files changed, 2 insertions(+), 2 deletions(-)
+> 
+> diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
+> index fb3d1b3..2e50631 100644
+> --- a/drivers/spi/amba-pl022.c
+> +++ b/drivers/spi/amba-pl022.c
+> @@ -956,7 +956,7 @@ static int configure_dma(struct pl022 *pl022)
+>              tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
+>              break;
+>      case WRITING_U32:
+> -            tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;;
+> +            tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+>              break;
+>      }
+>  
+> diff --git a/drivers/spi/spi_nuc900.c b/drivers/spi/spi_nuc900.c
+> index dff63be..d5be18b 100644
+> --- a/drivers/spi/spi_nuc900.c
+> +++ b/drivers/spi/spi_nuc900.c
+> @@ -449,7 +449,7 @@ err_iomap:
+>      release_mem_region(hw->res->start, resource_size(hw->res));
+>      kfree(hw->ioarea);
+>  err_pdata:
+> -    spi_master_put(hw->master);;
+> +    spi_master_put(hw->master);
+>  
+>  err_nomem:
+>      return err;
+> -- 
+> 1.7.3.1.g432b3.dirty
+> 
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002329:2, b/test/corpora/lkml/cur/1382298793.002329:2,
new file mode 100644 (file)
index 0000000..d91006a
--- /dev/null
@@ -0,0 +1,79 @@
+From: Michal Simek <monstr@monstr.eu>
+Subject: Re: [PATCH 02/44] arch/microblaze: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 07:37:39 +0100
+Lines: 32
+Message-ID: <4CE0D533.1010407@monstr.eu>
+References: <cover.1289789604.git.joe@perches.com> <5d57b90b488b4338bcdc3f0fbf5f6996842bd44d.1289789604.git.joe@perches.com>
+Reply-To: monstr@monstr.eu
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       microblaze-uclinux@itee.uq.edu.au, linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 07:38:12 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHshf-0005Kt-RF
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 07:38:12 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755918Ab0KOGhs (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 01:37:48 -0500
+Received: from mail-fx0-f46.google.com ([209.85.161.46]:39130 "EHLO
+       mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1755187Ab0KOGhp (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 01:37:45 -0500
+Received: by fxm6 with SMTP id 6so1494962fxm.19
+        for <linux-kernel@vger.kernel.org>; Sun, 14 Nov 2010 22:37:43 -0800 (PST)
+Received: by 10.223.70.131 with SMTP id d3mr4100646faj.73.1289803062970;
+        Sun, 14 Nov 2010 22:37:42 -0800 (PST)
+Received: from monstr.eu ([178.23.216.97])
+        by mx.google.com with ESMTPS id l14sm735429fan.33.2010.11.14.22.37.40
+        (version=SSLv3 cipher=RC4-MD5);
+        Sun, 14 Nov 2010 22:37:41 -0800 (PST)
+User-Agent: Thunderbird 2.0.0.22 (X11/20090625)
+In-Reply-To: <5d57b90b488b4338bcdc3f0fbf5f6996842bd44d.1289789604.git.joe@perches.com>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062348>
+
+Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  arch/microblaze/lib/memmove.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+
+Applied.
+
+Thanks,
+Michal
+
+> 
+> diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c
+> index 123e361..810fd68 100644
+> --- a/arch/microblaze/lib/memmove.c
+> +++ b/arch/microblaze/lib/memmove.c
+> @@ -182,7 +182,7 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
+>                      for (; c >= 4; c -= 4) {
+>                              value = *--i_src;
+>                              *--i_dst = buf_hold | ((value & 0xFF000000)>> 24);
+> -                            buf_hold = (value & 0xFFFFFF) << 8;;
+> +                            buf_hold = (value & 0xFFFFFF) << 8;
+>                      }
+>  #endif
+>                      /* Realign the source */
+
+
+-- 
+Michal Simek, Ing. (M.Eng)
+w: www.monstr.eu p: +42-0-721842854
+Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
+Microblaze U-BOOT custodian
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002340:2, b/test/corpora/lkml/cur/1382298793.002340:2,
new file mode 100644 (file)
index 0000000..cee8581
--- /dev/null
@@ -0,0 +1,71 @@
+From: Sjur BRENDELAND <sjur.brandeland@stericsson.com>
+Subject: RE: [PATCH 39/44] include/net/caif/cfctrl.h: Remove unnecessary
+ semicolons
+Date: Mon, 15 Nov 2010 08:12:02 +0100
+Lines: 7
+Message-ID: <81C3A93C17462B4BBD7E272753C105791945C0C9AA@EXDCVYMBSTM005.EQ1STM.local>
+References: <cover.1289789604.git.joe@perches.com>
+ <35914cfea1bd0ab3963e632d02b1fdd52a9d2bc8.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 8BIT
+Cc: "David S. Miller" <davem@davemloft.net>,
+       "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
+       "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
+To: Joe Perches <joe@perches.com>, Jiri Kosina <trivial@kernel.org>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 08:12:47 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PHtF8-0003Ia-E9
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 08:12:46 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1757561Ab0KOHMn (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 02:12:43 -0500
+Received: from eu1sys200aog110.obsmtp.com ([207.126.144.129]:34651 "EHLO
+       eu1sys200aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S1755276Ab0KOHMk convert rfc822-to-8bit
+       (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 02:12:40 -0500
+Received: from source ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP
+       ID DSNKTODdXnF0LEMxKFzys6wWldAszZ/h5aGS@postini.com; Mon, 15 Nov 2010 07:12:40 UTC
+Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13])
+       by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id B201FFC;
+       Mon, 15 Nov 2010 07:12:06 +0000 (GMT)
+Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17])
+       by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id C1093569;
+       Mon, 15 Nov 2010 07:12:05 +0000 (GMT)
+Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61])
+       (using TLSv1 with cipher RC4-MD5 (128/128 bits))
+       (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified))
+       by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 2017C24C080;
+       Mon, 15 Nov 2010 08:12:01 +0100 (CET)
+Received: from EXDCVYMBSTM005.EQ1STM.local ([10.230.100.3]) by
+ exdcvycastm022.EQ1STM.local ([10.230.100.30]) with mapi; Mon, 15 Nov 2010
+ 08:12:04 +0100
+Thread-Topic: [PATCH 39/44] include/net/caif/cfctrl.h: Remove unnecessary
+ semicolons
+Thread-Index: AcuEcgmvXg9N7FIzS1KHGoGQuVf68gAIhhTQ
+In-Reply-To: <35914cfea1bd0ab3963e632d02b1fdd52a9d2bc8.1289789605.git.joe@perches.com>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+acceptlanguage: en-US
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062359>
+
+> 
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+
+Looks good to me.
+Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002400:2, b/test/corpora/lkml/cur/1382298793.002400:2,
new file mode 100644 (file)
index 0000000..a2eab51
--- /dev/null
@@ -0,0 +1,102 @@
+From: Mel Gorman <mel@csn.ul.ie>
+Subject: Re: [PATCH 40/44] mm/hugetlb.c: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 09:52:44 +0000
+Lines: 44
+Message-ID: <20101115095244.GI27362@csn.ul.ie>
+References: <cover.1289789604.git.joe@perches.com> <59705f848d35b12ace640f92afcffea02cee0976.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=iso-8859-15
+Cc: Jiri Kosina <trivial@kernel.org>, linux-mm@kvack.org,
+       linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: owner-linux-mm@kvack.org Mon Nov 15 10:53:02 2010
+Return-path: <owner-linux-mm@kvack.org>
+Envelope-to: glkm-linux-mm-2@m.gmane.org
+Received: from kanga.kvack.org ([205.233.56.17])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <owner-linux-mm@kvack.org>)
+       id 1PHvkD-0001DG-RE
+       for glkm-linux-mm-2@m.gmane.org; Mon, 15 Nov 2010 10:53:02 +0100
+Received: by kanga.kvack.org (Postfix)
+       id BA7DD8D0050; Mon, 15 Nov 2010 04:53:00 -0500 (EST)
+Delivered-To: linux-mm-outgoing@kvack.org
+Received: by kanga.kvack.org (Postfix, from userid 40)
+       id B3E4F8D0017; Mon, 15 Nov 2010 04:53:00 -0500 (EST)
+X-Original-To: int-list-linux-mm@kvack.org
+Delivered-To: int-list-linux-mm@kvack.org
+Received: by kanga.kvack.org (Postfix, from userid 63042)
+       id 985338D0050; Mon, 15 Nov 2010 04:53:00 -0500 (EST)
+X-Original-To: linux-mm@kvack.org
+Delivered-To: linux-mm@kvack.org
+Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51])
+       by kanga.kvack.org (Postfix) with ESMTP id 3FA8F8D0017
+       for <linux-mm@kvack.org>; Mon, 15 Nov 2010 04:53:00 -0500 (EST)
+X-VirusChecked: Checked
+X-Env-Sender: mel@csn.ul.ie
+X-Msg-Ref: server-6.tower-144.messagelabs.com!1289814777!96428158!1
+X-StarScan-Version: 6.2.9; banners=-,-,-
+X-Originating-IP: [193.1.99.77]
+X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
+Received: (qmail 13284 invoked from network); 15 Nov 2010 09:52:59 -0000
+Received: from gir.skynet.ie (HELO gir.skynet.ie) (193.1.99.77)
+  by server-6.tower-144.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 15 Nov 2010 09:52:59 -0000
+Received: from skynet.skynet.ie (skynet.skynet.ie [193.1.99.74])
+       by gir.skynet.ie (Postfix) with ESMTP id E3A5E1244B;
+       Mon, 15 Nov 2010 09:52:44 +0000 (GMT)
+Received: by skynet.skynet.ie (Postfix, from userid 2391)
+       id D7AF750911; Mon, 15 Nov 2010 09:52:44 +0000 (GMT)
+Content-Disposition: inline
+In-Reply-To: <59705f848d35b12ace640f92afcffea02cee0976.1289789605.git.joe@perches.com>
+User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
+X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
+Sender: owner-linux-mm@kvack.org
+Precedence: bulk
+X-Loop: owner-majordomo@kvack.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062420>
+
+On Sun, Nov 14, 2010 at 07:04:59PM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  mm/hugetlb.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+
+Acked-by: Mel Gorman <mel@csn.ul.ie>
+
+> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
+> index c4a3558..8875242 100644
+> --- a/mm/hugetlb.c
+> +++ b/mm/hugetlb.c
+> @@ -540,7 +540,7 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
+>  
+>      /* If reserves cannot be used, ensure enough pages are in the pool */
+>      if (avoid_reserve && h->free_huge_pages - h->resv_huge_pages == 0)
+> -            goto err;;
+> +            goto err;
+>  
+>      for_each_zone_zonelist_nodemask(zone, z, zonelist,
+>                                              MAX_NR_ZONES - 1, nodemask) {
+> -- 
+> 1.7.3.1.g432b3.dirty
+> 
+> --
+> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+> the body of a message to majordomo@vger.kernel.org
+> More majordomo info at  http://vger.kernel.org/majordomo-info.html
+> Please read the FAQ at  http://www.tux.org/lkml/
+> 
+
+-- 
+Mel Gorman
+Part-time Phd Student                          Linux Technology Center
+University of Limerick                         IBM Dublin Software Lab
+
+--
+To unsubscribe, send a message with 'unsubscribe linux-mm' in
+the body to majordomo@kvack.org.  For more info on Linux MM,
+see: http://www.linux-mm.org/ .
+Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
+Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002432:2, b/test/corpora/lkml/cur/1382298793.002432:2,
new file mode 100644 (file)
index 0000000..f8b72b6
--- /dev/null
@@ -0,0 +1,85 @@
+From: Liam Girdwood <lrg@slimlogic.co.uk>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 11:09:20 +0000
+Lines: 14
+Message-ID: <1289819360.3377.15.camel@odin>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Takashi@alsa-project.org,
+       Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 12:09:44 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PHwwS-0002x6-6X
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 12:09:44 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id D0E09103835; Mon, 15 Nov 2010 12:09:43 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: *
+X-Spam-Status: No, score=1.0 required=5.0 tests=PRX_BODY_40 autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 0AE19103845;
+       Mon, 15 Nov 2010 12:09:35 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id EA398103845; Mon, 15 Nov 2010 12:09:33 +0100 (CET)
+Received: from mail-wy0-f179.google.com (mail-wy0-f179.google.com
+       [74.125.82.179])
+       by alsa0.perex.cz (Postfix) with ESMTP id 8FD12103849
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 12:09:26 +0100 (CET)
+Received: by mail-wy0-f179.google.com with SMTP id 36so3482678wyg.38
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 03:09:26 -0800 (PST)
+Received: by 10.216.64.139 with SMTP id c11mr5392190wed.81.1289819366153;
+       Mon, 15 Nov 2010 03:09:26 -0800 (PST)
+Received: from [192.168.1.6] (host81-136-218-57.in-addr.btopenworld.com
+       [81.136.218.57])
+       by mx.google.com with ESMTPS id 7sm3626925wet.24.2010.11.15.03.09.21
+       (version=SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 03:09:24 -0800 (PST)
+In-Reply-To: <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+X-Mailer: Evolution 2.30.3 
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062453>
+
+On Sun, 2010-11-14 at 19:05 -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  sound/soc/codecs/wm8904.c  |    2 +-
+>  sound/soc/codecs/wm8940.c  |    1 -
+>  sound/soc/codecs/wm8993.c  |    2 +-
+>  sound/soc/codecs/wm_hubs.c |    2 +-
+>  4 files changed, 3 insertions(+), 4 deletions(-)
+
+Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
+-- 
+Freelance Developer, SlimLogic Ltd
+ASoC and Voltage Regulator Maintainer.
+http://www.slimlogic.co.uk
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002468:2, b/test/corpora/lkml/cur/1382298793.002468:2,
new file mode 100644 (file)
index 0000000..e06d389
--- /dev/null
@@ -0,0 +1,75 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 13:49:39 +0000
+Lines: 5
+Message-ID: <20101115134939.GC12986@rakim.wolfsonmicro.main>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 14:49:49 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PHzRN-0003qZ-C2
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 14:49:49 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id D24A2103851; Mon, 15 Nov 2010 14:49:48 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 53C91103853;
+       Mon, 15 Nov 2010 14:49:44 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 15C62103853; Mon, 15 Nov 2010 14:49:42 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 8DE08103851
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 14:49:41 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id E613E788028; 
+       Mon, 15 Nov 2010 13:49:40 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PHzRD-0004Lh-OM; Mon, 15 Nov 2010 13:49:39 +0000
+Content-Disposition: inline
+In-Reply-To: <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+X-Cookie: I like your SNOOPY POSTER!!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062489>
+
+On Sun, Nov 14, 2010 at 07:05:03PM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+This doesn't apply against current -next, could you please regenerate
+against that?
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002543:2, b/test/corpora/lkml/cur/1382298793.002543:2,
new file mode 100644 (file)
index 0000000..aebfe25
--- /dev/null
@@ -0,0 +1,132 @@
+From: "Rose, Gregory V" <gregory.v.rose@intel.com>
+Subject: Re: [PATCH 14/44] drivers/net/ixgbe: Remove
+       unnecessary semicolons
+Date: Mon, 15 Nov 2010 08:24:22 -0800
+Lines: 48
+Message-ID: <43F901BD926A4E43B106BF17856F0755013080DEFF@orsmsx508.amr.corp.intel.com>
+References: <cover.1289789604.git.joe@perches.com>
+       <7d2c334daa75c5221946a17d45c9de1901cf06e7.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: "e1000-devel@lists.sourceforge.net" <e1000-devel@lists.sourceforge.net>,
+       "Allan, Bruce W" <bruce.w.allan@intel.com>, "Brandeburg,
+       Jesse" <jesse.brandeburg@intel.com>,
+       "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
+       "Ronciak, John" <john.ronciak@intel.com>, "Kirsher,
+       Jeffrey T" <jeffrey.t.kirsher@intel.com>,
+       "netdev@vger.kernel.org" <netdev@vger.kernel.org>
+To: Joe Perches <joe@perches.com>, Jiri Kosina <trivial@kernel.org>
+X-From: e1000-devel-bounces@lists.sourceforge.net Mon Nov 15 17:25:50 2010
+Return-path: <e1000-devel-bounces@lists.sourceforge.net>
+Envelope-to: glded-e1000-devel@m.gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI1sL-0003p5-2h
+       for glded-e1000-devel@m.gmane.org; Mon, 15 Nov 2010 17:25:49 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI1sG-0006Jq-KT; Mon, 15 Nov 2010 16:25:44 +0000
+Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
+       helo=mx.sourceforge.net)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <gregory.v.rose@intel.com>) id 1PI1sF-0006Jk-IV
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 16:25:43 +0000
+X-ACL-Warn: 
+Received: from mga09.intel.com ([134.134.136.24])
+       by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PI1sA-0001hP-Vk
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 16:25:43 +0000
+Received: from orsmga001.jf.intel.com ([10.7.209.18])
+       by orsmga102.jf.intel.com with ESMTP; 15 Nov 2010 08:25:33 -0800
+X-ExtLoop1: 1
+X-IronPort-AV: E=Sophos;i="4.59,200,1288594800"; d="scan'208";a="677619042"
+Received: from orsmsx604.amr.corp.intel.com ([10.22.226.87])
+       by orsmga001.jf.intel.com with ESMTP; 15 Nov 2010 08:25:33 -0800
+Received: from orsmsx606.amr.corp.intel.com (10.22.226.128) by
+       orsmsx604.amr.corp.intel.com (10.22.226.87) with Microsoft SMTP Server
+       (TLS) id 8.2.254.0; Mon, 15 Nov 2010 08:24:25 -0800
+Received: from orsmsx508.amr.corp.intel.com ([10.22.226.46]) by
+       orsmsx606.amr.corp.intel.com ([10.22.226.128]) with mapi;
+       Mon, 15 Nov 2010 08:24:24 -0800
+Thread-Topic: [PATCH 14/44] drivers/net/ixgbe: Remove unnecessary semicolons
+Thread-Index: AcuEcftvdxmC6VgnRT2RlEslHutcHgAb4Qcg
+In-Reply-To: <7d2c334daa75c5221946a17d45c9de1901cf06e7.1289789604.git.joe@perches.com>
+Accept-Language: en-US
+Content-Language: en-US
+X-MS-Has-Attach: 
+X-MS-TNEF-Correlator: 
+acceptlanguage: en-US
+X-Spam-Score: -0.0 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
+       domain
+X-Headers-End: 1PI1sA-0001hP-Vk
+X-BeenThere: e1000-devel@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "e100/e1000\(e\)/ixgb/igb/ixgbe development and discussion"
+       <e1000-devel.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>, 
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=e1000-devel>
+List-Post: <mailto:e1000-devel@lists.sourceforge.net>
+List-Help: <mailto:e1000-devel-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>,
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: e1000-devel-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062564>
+
+> -----Original Message-----
+> From: Joe Perches [mailto:joe@perches.com]
+> Sent: Sunday, November 14, 2010 7:05 PM
+> To: Jiri Kosina
+> Cc: Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; Wyborny,
+> Carolyn; Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P;
+> Duyck, Alexander H; Ronciak, John; e1000-devel@lists.sourceforge.net;
+> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
+> Subject: [PATCH 14/44] drivers/net/ixgbe: Remove unnecessary semicolons
+> 
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  drivers/net/ixgbe/ixgbe_sriov.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+> diff --git a/drivers/net/ixgbe/ixgbe_sriov.c
+> b/drivers/net/ixgbe/ixgbe_sriov.c
+> index 5428153..93f40bc 100644
+> --- a/drivers/net/ixgbe/ixgbe_sriov.c
+> +++ b/drivers/net/ixgbe/ixgbe_sriov.c
+> @@ -68,7 +68,7 @@ static int ixgbe_set_vf_multicasts(struct ixgbe_adapter
+> *adapter,
+>       * addresses
+>       */
+>      for (i = 0; i < entries; i++) {
+> -            vfinfo->vf_mc_hashes[i] = hash_list[i];;
+> +            vfinfo->vf_mc_hashes[i] = hash_list[i];
+>      }
+> 
+>      for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
+> --
+> 1.7.3.1.g432b3.dirty
+
+Acked By: Greg Rose <Gregory.v.rose@intel.com>
+
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+_______________________________________________
+E1000-devel mailing list
+E1000-devel@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/e1000-devel
+To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002557:2, b/test/corpora/lkml/cur/1382298793.002557:2,
new file mode 100644 (file)
index 0000000..723f9d6
--- /dev/null
@@ -0,0 +1,109 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 09:09:17 -0800
+Lines: 63
+Message-ID: <1289840957.16461.138.camel@Joe-Laptop>
+References: <cover.1289789604.git.joe@perches.com>
+        <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+        <20101115134939.GC12986@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 18:09:51 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI2Yr-0005ly-Pc
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 18:09:46 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932795Ab0KORJV (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 12:09:21 -0500
+Received: from mail.perches.com ([173.55.12.10]:1293 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932132Ab0KORJU (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 12:09:20 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 93B872436B;
+       Mon, 15 Nov 2010 09:07:32 -0800 (PST)
+In-Reply-To: <20101115134939.GC12986@rakim.wolfsonmicro.main>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062578>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+---
+V2: against -next
+
+ sound/soc/codecs/wm8904.c  |    2 +-
+ sound/soc/codecs/wm8940.c  |    1 -
+ sound/soc/codecs/wm8993.c  |    2 +-
+ sound/soc/codecs/wm_hubs.c |    2 +-
+ 4 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
+index be90399..5e57bd2 100644
+--- a/sound/soc/codecs/wm8904.c
++++ b/sound/soc/codecs/wm8904.c
+@@ -1591,7 +1591,7 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream,
+                      - wm8904->fs);
+       for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) {
+               cur_val = abs((wm8904->sysclk_rate /
+-                             clk_sys_rates[i].ratio) - wm8904->fs);;
++                             clk_sys_rates[i].ratio) - wm8904->fs);
+               if (cur_val < best_val) {
+                       best = i;
+                       best_val = cur_val;
+diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
+index c2def1b..caed084 100644
+--- a/sound/soc/codecs/wm8940.c
++++ b/sound/soc/codecs/wm8940.c
+@@ -736,7 +736,6 @@ static int wm8940_probe(struct snd_soc_codec *codec)
+               return ret;
+       return ret;
+-;
+ }
+ static int wm8940_remove(struct snd_soc_codec *codec)
+diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
+index bcc54be..991d90c 100644
+--- a/sound/soc/codecs/wm8993.c
++++ b/sound/soc/codecs/wm8993.c
+@@ -1227,7 +1227,7 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
+                      - wm8993->fs);
+       for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) {
+               cur_val = abs((wm8993->sysclk_rate /
+-                             clk_sys_rates[i].ratio) - wm8993->fs);;
++                             clk_sys_rates[i].ratio) - wm8993->fs);
+               if (cur_val < best_val) {
+                       best = i;
+                       best_val = cur_val;
+diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
+index 8aff0ef..422c7fb 100644
+--- a/sound/soc/codecs/wm_hubs.c
++++ b/sound/soc/codecs/wm_hubs.c
+@@ -119,7 +119,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
+       switch (hubs->dcs_readback_mode) {
+       case 0:
+               reg_l = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_1)
+-                      & WM8993_DCS_INTEG_CHAN_0_MASK;;
++                      & WM8993_DCS_INTEG_CHAN_0_MASK;
+               reg_r = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_2)
+                       & WM8993_DCS_INTEG_CHAN_1_MASK;
+               break;
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002575:2, b/test/corpora/lkml/cur/1382298793.002575:2,
new file mode 100644 (file)
index 0000000..981c1c9
--- /dev/null
@@ -0,0 +1,79 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 17:30:31 +0000
+Lines: 7
+Message-ID: <20101115173031.GI12986@rakim.wolfsonmicro.main>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+       <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 18:30:46 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PI2t9-0000lr-Er
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 18:30:43 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 5B6F8244F9; Mon, 15 Nov 2010 18:30:41 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id AE3D8244FB;
+       Mon, 15 Nov 2010 18:30:36 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id EF7B7244FC; Mon, 15 Nov 2010 18:30:34 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 8B247244F9
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 18:30:34 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id C748C788028; 
+       Mon, 15 Nov 2010 17:30:32 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PI2sx-0000C1-Jf; Mon, 15 Nov 2010 17:30:31 +0000
+Content-Disposition: inline
+In-Reply-To: <1289840957.16461.138.camel@Joe-Laptop>
+X-Cookie: I like your SNOOPY POSTER!!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062597>
+
+On Mon, Nov 15, 2010 at 09:09:17AM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied, thanks.  
+
+Please try to use changelog formats consistent with the code you're
+modifying.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002576:2, b/test/corpora/lkml/cur/1382298793.002576:2,
new file mode 100644 (file)
index 0000000..6963356
--- /dev/null
@@ -0,0 +1,63 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 09:34:04 -0800
+Lines: 15
+Message-ID: <1289842444.16461.140.camel@Joe-Laptop>
+References: <cover.1289789604.git.joe@perches.com>
+        <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+        <20101115134939.GC12986@rakim.wolfsonmicro.main>
+        <1289840957.16461.138.camel@Joe-Laptop>
+        <20101115173031.GI12986@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 18:34:20 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI2wd-0002wj-Br
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 18:34:19 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933091Ab0KOReI (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 12:34:08 -0500
+Received: from mail.perches.com ([173.55.12.10]:1304 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S933013Ab0KOReH (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 12:34:07 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 9F71A24368;
+       Mon, 15 Nov 2010 09:32:18 -0800 (PST)
+In-Reply-To: <20101115173031.GI12986@rakim.wolfsonmicro.main>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062599>
+
+On Mon, 2010-11-15 at 17:30 +0000, Mark Brown wrote:
+> On Mon, Nov 15, 2010 at 09:09:17AM -0800, Joe Perches wrote:
+> > Signed-off-by: Joe Perches <joe@perches.com>
+> Applied, thanks.
+> Please try to use changelog formats consistent with the code you're
+> modifying.
+
+I think it's more important to use consistent changelogs
+for a patch series.
+
+If you want your own subsystem changelog consistency, I
+think you should change the format to what you desire.
+
+cheers, Joe
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002639:2, b/test/corpora/lkml/cur/1382298793.002639:2,
new file mode 100644 (file)
index 0000000..450509d
--- /dev/null
@@ -0,0 +1,90 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 18:27:08 +0000
+Lines: 16
+Message-ID: <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+       <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 19:27:21 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PI3lw-0007AT-Pq
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 19:27:20 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 35136103873; Mon, 15 Nov 2010 19:27:17 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id B554724525;
+       Mon, 15 Nov 2010 19:27:11 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id D599A24527; Mon, 15 Nov 2010 19:27:10 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 5719224414
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 19:27:10 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id C97D2788028; 
+       Mon, 15 Nov 2010 18:27:09 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PI3lk-00053D-RZ; Mon, 15 Nov 2010 18:27:08 +0000
+Content-Disposition: inline
+In-Reply-To: <1289842444.16461.140.camel@Joe-Laptop>
+X-Cookie: I like your SNOOPY POSTER!!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062664>
+
+On Mon, Nov 15, 2010 at 09:34:04AM -0800, Joe Perches wrote:
+> On Mon, 2010-11-15 at 17:30 +0000, Mark Brown wrote:
+
+> > Please try to use changelog formats consistent with the code you're
+> > modifying.
+
+> I think it's more important to use consistent changelogs
+> for a patch series.
+
+...since...?
+
+> If you want your own subsystem changelog consistency, I
+> think you should change the format to what you desire.
+
+Which is what I'm doing but it's annoying to have to constantly hand
+edit changelogs.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002642:2, b/test/corpora/lkml/cur/1382298793.002642:2,
new file mode 100644 (file)
index 0000000..1bd4e32
--- /dev/null
@@ -0,0 +1,66 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 10:30:29 -0800
+Lines: 16
+Message-ID: <1289845830.16461.149.camel@Joe-Laptop>
+References: <cover.1289789604.git.joe@perches.com>
+        <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+        <20101115134939.GC12986@rakim.wolfsonmicro.main>
+        <1289840957.16461.138.camel@Joe-Laptop>
+        <20101115173031.GI12986@rakim.wolfsonmicro.main>
+        <1289842444.16461.140.camel@Joe-Laptop>
+        <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 19:31:55 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI3qN-0000mO-6u
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 19:31:55 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1758106Ab0KOSad (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 13:30:33 -0500
+Received: from mail.perches.com ([173.55.12.10]:1314 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1756843Ab0KOSac (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 13:30:32 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 2BC7724368;
+       Mon, 15 Nov 2010 10:28:43 -0800 (PST)
+In-Reply-To: <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062667>
+
+On Mon, 2010-11-15 at 18:27 +0000, Mark Brown wrote:
+> On Mon, Nov 15, 2010 at 09:34:04AM -0800, Joe Perches wrote:
+> > On Mon, 2010-11-15 at 17:30 +0000, Mark Brown wrote:
+> > > Please try to use changelog formats consistent with the code you're
+> > > modifying.
+> > I think it's more important to use consistent changelogs
+> > for a patch series.
+> ...since...?
+
+1995...
+
+Since there isn't a consistent standard for subsystems
+changelogs and automating scripts for the desires of
+individual subsystem maintainers is not feasible.
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002661:2, b/test/corpora/lkml/cur/1382298793.002661:2,
new file mode 100644 (file)
index 0000000..36f8752
--- /dev/null
@@ -0,0 +1,49 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 39/44] include/net/caif/cfctrl.h: Remove unnecessary
+ semicolons
+Date: Mon, 15 Nov 2010 11:07:32 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110732.27814339.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <35914cfea1bd0ab3963e632d02b1fdd52a9d2bc8.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, sjur.brandeland@stericsson.com,
+       netdev@vger.kernel.org, linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:07:42 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4Oy-0002G6-Lp
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:07:41 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933101Ab0KOTHJ (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:09 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51782
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S932513Ab0KOTHI (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:08 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 71B5924C088;
+       Mon, 15 Nov 2010 11:07:33 -0800 (PST)
+In-Reply-To: <35914cfea1bd0ab3963e632d02b1fdd52a9d2bc8.1289789605.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062686>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:58 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002662:2, b/test/corpora/lkml/cur/1382298793.002662:2,
new file mode 100644 (file)
index 0000000..2fbb7e7
--- /dev/null
@@ -0,0 +1,49 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 41/44] net/ipv6/mcast.c: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:07:39 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110739.191407854.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <1f3e1f7e454f3c62b66fc5f3e1e1ed90d62b7fb0.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, kuznet@ms2.inr.ac.ru, pekkas@netcore.fi,
+       jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net,
+       netdev@vger.kernel.org, linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:07:42 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4Oz-0002G6-63
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:07:41 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933351Ab0KOTHS (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:18 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51792
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933109Ab0KOTHP (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:15 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 53FFA24C088;
+       Mon, 15 Nov 2010 11:07:40 -0800 (PST)
+In-Reply-To: <1f3e1f7e454f3c62b66fc5f3e1e1ed90d62b7fb0.1289789605.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062687>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:05:00 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002663:2, b/test/corpora/lkml/cur/1382298793.002663:2,
new file mode 100644 (file)
index 0000000..c888922
--- /dev/null
@@ -0,0 +1,50 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 15/44] drivers/net/vxge: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:07:55 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110755.98889745.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <e86e79a18106cc38715136bfb2e880b38f5ac764.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, ramkrishna.vepa@exar.com,
+       sivakumar.subramani@exar.com, sreenivasa.honnur@exar.com,
+       jon.mason@exar.com, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:07:42 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4P0-0002G6-7S
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:07:42 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933487Ab0KOTHe (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:34 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51805
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933109Ab0KOTHb (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:31 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 185A124C08A;
+       Mon, 15 Nov 2010 11:07:56 -0800 (PST)
+In-Reply-To: <e86e79a18106cc38715136bfb2e880b38f5ac764.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062688>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:34 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Not applicable to net-next-2.6
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002664:2, b/test/corpora/lkml/cur/1382298793.002664:2,
new file mode 100644 (file)
index 0000000..ec584cb
--- /dev/null
@@ -0,0 +1,49 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 38/44] include/linux/if_macvlan.h: Remove unnecessary
+ semicolons
+Date: Mon, 15 Nov 2010 11:07:46 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110746.241931394.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <186ca914f887b2354ea3178696edc81cacbb28c6.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, kaber@trash.net, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:07:42 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4Oz-0002G6-MR
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:07:42 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933465Ab0KOTHZ (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:25 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51798
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933109Ab0KOTHV (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:21 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 665FB24C08A;
+       Mon, 15 Nov 2010 11:07:46 -0800 (PST)
+In-Reply-To: <186ca914f887b2354ea3178696edc81cacbb28c6.1289789605.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062689>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:57 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002665:2, b/test/corpora/lkml/cur/1382298793.002665:2,
new file mode 100644 (file)
index 0000000..7af81e8
--- /dev/null
@@ -0,0 +1,98 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 19:07:38 +0000
+Lines: 22
+Message-ID: <20101115190738.GF3338@sirena.org.uk>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+       <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 20:07:53 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PI4PA-0002MQ-AO
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 20:07:52 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 78DB02453D; Mon, 15 Nov 2010 20:07:51 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 07D122453A;
+       Mon, 15 Nov 2010 20:07:47 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 4AB082453B; Mon, 15 Nov 2010 20:07:45 +0100 (CET)
+Received: from cassiel.sirena.org.uk (cassiel.sirena.org.uk [80.68.93.111])
+       by alsa0.perex.cz (Postfix) with ESMTP id D864524538
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 20:07:44 +0100 (CET)
+Received: from broonie by cassiel.sirena.org.uk with local (Exim 4.69)
+       (envelope-from <broonie@sirena.org.uk>)
+       id 1PI4Ow-0007qS-V5; Mon, 15 Nov 2010 19:07:38 +0000
+Content-Disposition: inline
+In-Reply-To: <1289845830.16461.149.camel@Joe-Laptop>
+X-Cookie: Who messed with my anti-paranoia shot?
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-SA-Exim-Connect-IP: <locally generated>
+X-SA-Exim-Mail-From: broonie@sirena.org.uk
+X-SA-Exim-Scanned: No (on cassiel.sirena.org.uk);
+       SAEximRunCond expanded to false
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062690>
+
+On Mon, Nov 15, 2010 at 10:30:29AM -0800, Joe Perches wrote:
+> On Mon, 2010-11-15 at 18:27 +0000, Mark Brown wrote:
+> > On Mon, Nov 15, 2010 at 09:34:04AM -0800, Joe Perches wrote:
+
+> > > I think it's more important to use consistent changelogs
+> > > for a patch series.
+
+> > ...since...?
+
+> 1995...
+
+That's not really a reason.  It seems that...
+
+> Since there isn't a consistent standard for subsystems
+> changelogs and automating scripts for the desires of
+> individual subsystem maintainers is not feasible.
+
+...you mean that you wish to do this since it makes your life as a
+script author easier.  I'd suggest using pattern matching to look up the
+rules for generating the prefixes (it's pretty much entirely prefixes)
+in the same way you're handling figuring out who to mail - that'd
+probably cover it in an automatable fashion.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002666:2, b/test/corpora/lkml/cur/1382298793.002666:2,
new file mode 100644 (file)
index 0000000..8907c25
--- /dev/null
@@ -0,0 +1,87 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 13/44] drivers/net/e1000e: Remove
+       unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:27 -0800 (PST)
+Lines: 19
+Message-ID: <20101115.110827.58428696.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <e5cf92d50de7924930d660a5865c3d60d9cd9dc5.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, e1000-devel@lists.sourceforge.net,
+       bruce.w.allan@intel.com, jesse.brandeburg@intel.com,
+       linux-kernel@vger.kernel.org, gregory.v.rose@intel.com,
+       john.ronciak@intel.com, jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org
+To: joe@perches.com
+X-From: e1000-devel-bounces@lists.sourceforge.net Mon Nov 15 20:08:15 2010
+Return-path: <e1000-devel-bounces@lists.sourceforge.net>
+Envelope-to: glded-e1000-devel@m.gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI4PW-0002W0-GR
+       for glded-e1000-devel@m.gmane.org; Mon, 15 Nov 2010 20:08:14 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com)
+       by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI4PV-0002fQ-W8; Mon, 15 Nov 2010 19:08:13 +0000
+Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
+       helo=mx.sourceforge.net)
+       by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <davem@davemloft.net>) id 1PI4PU-0002fJ-Ct
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 19:08:12 +0000
+X-ACL-Warn: 
+Received: from 74-93-104-97-washington.hfc.comcastbusiness.net ([74.93.104.97]
+       helo=sunset.davemloft.net)
+       by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PI4PQ-0006vK-9a
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 19:08:12 +0000
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 0BCD224C088;
+       Mon, 15 Nov 2010 11:08:28 -0800 (PST)
+In-Reply-To: <e5cf92d50de7924930d660a5865c3d60d9cd9dc5.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+X-Spam-Score: 0.8 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       1.0 RDNS_DYNAMIC           Delivered to internal network by host with
+       dynamic-looking rDNS
+       -0.2 AWL AWL: From: address is in the auto white-list
+X-Headers-End: 1PI4PQ-0006vK-9a
+X-BeenThere: e1000-devel@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "e100/e1000\(e\)/ixgb/igb/ixgbe development and discussion"
+       <e1000-devel.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>, 
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=e1000-devel>
+List-Post: <mailto:e1000-devel@lists.sourceforge.net>
+List-Help: <mailto:e1000-devel-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>,
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: e1000-devel-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062691>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:32 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+_______________________________________________
+E1000-devel mailing list
+E1000-devel@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/e1000-devel
+To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002667:2, b/test/corpora/lkml/cur/1382298793.002667:2,
new file mode 100644 (file)
index 0000000..c85cbd5
--- /dev/null
@@ -0,0 +1,87 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 14/44] drivers/net/ixgbe: Remove
+       unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:21 -0800 (PST)
+Lines: 19
+Message-ID: <20101115.110821.13743893.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <7d2c334daa75c5221946a17d45c9de1901cf06e7.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, e1000-devel@lists.sourceforge.net,
+       bruce.w.allan@intel.com, jesse.brandeburg@intel.com,
+       linux-kernel@vger.kernel.org, gregory.v.rose@intel.com,
+       john.ronciak@intel.com, jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org
+To: joe@perches.com
+X-From: e1000-devel-bounces@lists.sourceforge.net Mon Nov 15 20:08:15 2010
+Return-path: <e1000-devel-bounces@lists.sourceforge.net>
+Envelope-to: glded-e1000-devel@m.gmane.org
+Received: from lists.sourceforge.net ([216.34.181.88])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI4PW-0002Vz-9H
+       for glded-e1000-devel@m.gmane.org; Mon, 15 Nov 2010 20:08:14 +0100
+Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <e1000-devel-bounces@lists.sourceforge.net>)
+       id 1PI4PQ-0008VG-9t; Mon, 15 Nov 2010 19:08:08 +0000
+Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191]
+       helo=mx.sourceforge.net)
+       by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69)
+       (envelope-from <davem@davemloft.net>) id 1PI4PO-0008V9-I9
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 19:08:06 +0000
+X-ACL-Warn: 
+Received: from 74-93-104-97-washington.hfc.comcastbusiness.net ([74.93.104.97]
+       helo=sunset.davemloft.net)
+       by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.69)
+       id 1PI4PK-0004Ab-D0
+       for e1000-devel@lists.sourceforge.net; Mon, 15 Nov 2010 19:08:06 +0000
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id E0AE124C08A;
+       Mon, 15 Nov 2010 11:08:21 -0800 (PST)
+In-Reply-To: <7d2c334daa75c5221946a17d45c9de1901cf06e7.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+X-Spam-Score: 0.7 (/)
+X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
+       See http://spamassassin.org/tag/ for more details.
+       1.0 RDNS_DYNAMIC           Delivered to internal network by host with
+       dynamic-looking rDNS
+       -0.3 AWL AWL: From: address is in the auto white-list
+X-Headers-End: 1PI4PK-0004Ab-D0
+X-BeenThere: e1000-devel@lists.sourceforge.net
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "e100/e1000\(e\)/ixgb/igb/ixgbe development and discussion"
+       <e1000-devel.lists.sourceforge.net>
+List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>, 
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=e1000-devel>
+List-Post: <mailto:e1000-devel@lists.sourceforge.net>
+List-Help: <mailto:e1000-devel-request@lists.sourceforge.net?subject=help>
+List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/e1000-devel>,
+       <mailto:e1000-devel-request@lists.sourceforge.net?subject=subscribe>
+Errors-To: e1000-devel-bounces@lists.sourceforge.net
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062692>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:33 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+------------------------------------------------------------------------------
+Centralized Desktop Delivery: Dell and VMware Reference Architecture
+Simplifying enterprise desktop deployment and management using
+Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
+client virtualization framework. Read more!
+http://p.sf.net/sfu/dell-eql-dev2dev
+_______________________________________________
+E1000-devel mailing list
+E1000-devel@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/e1000-devel
+To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002668:2, b/test/corpora/lkml/cur/1382298793.002668:2,
new file mode 100644 (file)
index 0000000..a453744
--- /dev/null
@@ -0,0 +1,50 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 21/44] drivers/s390/net: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:10 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110810.241442235.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <ea09773876fb36a52a9a750110b381d20767ac12.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, ursula.braun@de.ibm.com,
+       blaschka@linux.vnet.ibm.com, linux390@de.ibm.com,
+       schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
+       linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:09:11 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4QQ-00030Y-IU
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:09:10 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933525Ab0KOTHt (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:49 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51810
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933071Ab0KOTHp (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:45 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 79DC124C088;
+       Mon, 15 Nov 2010 11:08:10 -0800 (PST)
+In-Reply-To: <ea09773876fb36a52a9a750110b381d20767ac12.1289789605.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062693>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:40 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+I'll let the s390 folks take this one.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002669:2, b/test/corpora/lkml/cur/1382298793.002669:2,
new file mode 100644 (file)
index 0000000..f595d0a
--- /dev/null
@@ -0,0 +1,48 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 18/44] drivers/net/cnic.c: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:15 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110815.52192986.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <950331e47b16c2ad28d73502f30f5a0f017b5493.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:09:11 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4QR-00030Y-3C
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:09:11 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933539Ab0KOTHy (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:07:54 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51817
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933054Ab0KOTHv (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:07:51 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 0297924C08A;
+       Mon, 15 Nov 2010 11:08:16 -0800 (PST)
+In-Reply-To: <950331e47b16c2ad28d73502f30f5a0f017b5493.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062694>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:37 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002670:2, b/test/corpora/lkml/cur/1382298793.002670:2,
new file mode 100644 (file)
index 0000000..964ba85
--- /dev/null
@@ -0,0 +1,52 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 07/44] drivers/isdn: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:40 -0800 (PST)
+Lines: 11
+Message-ID: <20101115.110840.45901337.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <c7a38f65340aafb208d50fc3a781602c07aebb0c.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, isdn@linux-pingi.de, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: netdev-owner@vger.kernel.org Mon Nov 15 20:09:14 2010
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PI4QU-00030Y-5P
+       for linux-netdev-2@lo.gmane.org; Mon, 15 Nov 2010 20:09:14 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933584Ab0KOTIR (ORCPT <rfc822;linux-netdev-2@m.gmane.org>);
+       Mon, 15 Nov 2010 14:08:17 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51842
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933494Ab0KOTIP (ORCPT
+       <rfc822;netdev@vger.kernel.org>); Mon, 15 Nov 2010 14:08:15 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 88D8924C088;
+       Mon, 15 Nov 2010 11:08:40 -0800 (PST)
+In-Reply-To: <c7a38f65340aafb208d50fc3a781602c07aebb0c.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062695>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:26 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002671:2, b/test/corpora/lkml/cur/1382298793.002671:2,
new file mode 100644 (file)
index 0000000..1fe0cc5
--- /dev/null
@@ -0,0 +1,48 @@
+From: David Miller <davem@davemloft.net>
+Subject: Re: [PATCH 12/44] drivers/net/bnx2x: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:08:34 -0800 (PST)
+Lines: 6
+Message-ID: <20101115.110834.91340564.davem@davemloft.net>
+References: <cover.1289789604.git.joe@perches.com>
+       <2bfaf1f1fe5d503a8a386a433b5187997819d771.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+Cc: trivial@kernel.org, eilong@broadcom.com, netdev@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: joe@perches.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:09:14 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4QT-00030Y-LK
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:09:13 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933575Ab0KOTIN (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:08:13 -0500
+Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:51836
+       "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK)
+       by vger.kernel.org with ESMTP id S933449Ab0KOTIJ (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:08:09 -0500
+Received: from localhost (localhost [127.0.0.1])
+       by sunset.davemloft.net (Postfix) with ESMTP id 8FAC824C08A;
+       Mon, 15 Nov 2010 11:08:34 -0800 (PST)
+In-Reply-To: <2bfaf1f1fe5d503a8a386a433b5187997819d771.1289789604.git.joe@perches.com>
+X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062696>
+
+From: Joe Perches <joe@perches.com>
+Date: Sun, 14 Nov 2010 19:04:31 -0800
+
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002679:2, b/test/corpora/lkml/cur/1382298793.002679:2,
new file mode 100644 (file)
index 0000000..8e1234b
--- /dev/null
@@ -0,0 +1,61 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:14:18 -0800
+Lines: 9
+Message-ID: <1289848458.16461.150.camel@Joe-Laptop>
+References: <cover.1289789604.git.joe@perches.com>
+        <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+        <20101115134939.GC12986@rakim.wolfsonmicro.main>
+        <1289840957.16461.138.camel@Joe-Laptop>
+        <20101115173031.GI12986@rakim.wolfsonmicro.main>
+        <1289842444.16461.140.camel@Joe-Laptop>
+        <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+        <1289845830.16461.149.camel@Joe-Laptop>
+        <20101115190738.GF3338@sirena.org.uk>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:14:49 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI4Vp-0006HI-NH
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:14:46 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933566Ab0KOTOW (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:14:22 -0500
+Received: from mail.perches.com ([173.55.12.10]:1319 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S933505Ab0KOTOV (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:14:21 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 4087C24368;
+       Mon, 15 Nov 2010 11:12:31 -0800 (PST)
+In-Reply-To: <20101115190738.GF3338@sirena.org.uk>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062704>
+
+On Mon, 2010-11-15 at 19:07 +0000, Mark Brown wrote:
+> I'd suggest using pattern matching to look up the
+> rules for generating the prefixes (it's pretty much entirely prefixes)
+> in the same way you're handling figuring out who to mail - that'd
+> probably cover it in an automatable fashion.
+
+Publish a tool that works and I'll use it.
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002688:2, b/test/corpora/lkml/cur/1382298793.002688:2,
new file mode 100644 (file)
index 0000000..7d573a0
--- /dev/null
@@ -0,0 +1,94 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Mon, 15 Nov 2010 19:34:07 +0000
+Lines: 16
+Message-ID: <20101115193407.GK12986@rakim.wolfsonmicro.main>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+       <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 15 20:34:23 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PI4oo-0008LE-En
+       for glad-alsa-devel-2@m.gmane.org; Mon, 15 Nov 2010 20:34:22 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 9B9BF24551; Mon, 15 Nov 2010 20:34:21 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 7F6F424547;
+       Mon, 15 Nov 2010 20:34:16 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 4D4F724548; Mon, 15 Nov 2010 20:34:14 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 9C6502453F
+       for <alsa-devel@alsa-project.org>; Mon, 15 Nov 2010 20:34:09 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 992AA788028; 
+       Mon, 15 Nov 2010 19:34:08 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PI4oZ-0005Qk-Q4; Mon, 15 Nov 2010 19:34:07 +0000
+Content-Disposition: inline
+In-Reply-To: <1289848458.16461.150.camel@Joe-Laptop>
+X-Cookie: I like your SNOOPY POSTER!!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062713>
+
+On Mon, Nov 15, 2010 at 11:14:18AM -0800, Joe Perches wrote:
+> On Mon, 2010-11-15 at 19:07 +0000, Mark Brown wrote:
+
+> > I'd suggest using pattern matching to look up the
+> > rules for generating the prefixes (it's pretty much entirely prefixes)
+> > in the same way you're handling figuring out who to mail - that'd
+> > probably cover it in an automatable fashion.
+
+> Publish a tool that works and I'll use it.
+
+It appears your scripts are already hooked into get_maintainers.pl which
+would seem the obvious place to do this?  Sadly I don't do perl, though
+it looks like you're doing pretty much all the work on that anyway.
+
+The main thing here is to avoid your patches sticking out - as well as
+the hassle applying them stuff like this is also a red flag on review.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.002699:2, b/test/corpora/lkml/cur/1382298793.002699:2,
new file mode 100644 (file)
index 0000000..3fdfaf1
--- /dev/null
@@ -0,0 +1,106 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary semicolons
+Date: Mon, 15 Nov 2010 11:52:53 -0800
+Lines: 52
+Message-ID: <1289850773.16461.166.camel@Joe-Laptop>
+References: <cover.1289789604.git.joe@perches.com>
+        <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+        <20101115134939.GC12986@rakim.wolfsonmicro.main>
+        <1289840957.16461.138.camel@Joe-Laptop>
+        <20101115173031.GI12986@rakim.wolfsonmicro.main>
+        <1289842444.16461.140.camel@Joe-Laptop>
+        <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+        <1289845830.16461.149.camel@Joe-Laptop>
+        <20101115190738.GF3338@sirena.org.uk>
+        <1289848458.16461.150.camel@Joe-Laptop>
+        <20101115193407.GK12986@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>,
+       Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Nov 15 20:53:21 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PI57A-0001v9-CG
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 15 Nov 2010 20:53:20 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932871Ab0KOTw5 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 15 Nov 2010 14:52:57 -0500
+Received: from mail.perches.com ([173.55.12.10]:1328 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1758222Ab0KOTw4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 15 Nov 2010 14:52:56 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id CE13524368;
+       Mon, 15 Nov 2010 11:51:05 -0800 (PST)
+In-Reply-To: <20101115193407.GK12986@rakim.wolfsonmicro.main>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1062724>
+
+On Mon, 2010-11-15 at 19:34 +0000, Mark Brown wrote:
+> On Mon, Nov 15, 2010 at 11:14:18AM -0800, Joe Perches wrote:
+> > On Mon, 2010-11-15 at 19:07 +0000, Mark Brown wrote:
+> > > I'd suggest using pattern matching to look up the
+> > > rules for generating the prefixes (it's pretty much entirely prefixes)
+> > > in the same way you're handling figuring out who to mail - that'd
+> > > probably cover it in an automatable fashion.
+> > Publish a tool that works and I'll use it.
+> It appears your scripts are already hooked into get_maintainers.pl which
+> would seem the obvious place to do this?  Sadly I don't do perl, though
+> it looks like you're doing pretty much all the work on that anyway.
+
+Sadly, no it's not the right place.
+
+That script just generates cc email addresses
+for pre-formatted commit patches.
+
+It'd have to be a script that modifies the git commit subject line
+to the taste of the subsystem maintainer.
+
+Right now, I use a commit script that's something like:
+
+#!/bin/bash
+echo "$1: Remove unnecessary semicolons" > msg
+echo >> msg
+#cat >> msg <<EOF
+#Unnecessary semicolons should not exist.
+#EOF
+git commit -s -F msg $1
+
+There could be a modification to $1 (path)
+or some such.
+
+Maybe a script like
+./scripts/convert_commit_subject_to_subsystem_maintainer_taste
+or something.
+
+Care to write one in sh/bash/perl/python/c/ocaml/c#?
+
+As far as I know, the only subsystem pedants^H^H^H^H^Hople
+that care much about the commit subject style are
+arch/x86 and sound.
+
+I can understand the desire of these subsystem maintainers
+to have a consistent style.  I think though that requiring
+a subject header style without providing more than a
+general guideline is a but much.
+
+I'd use any other automated tool you want to provide.
+
+cheers, Joe
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003013:2, b/test/corpora/lkml/cur/1382298793.003013:2,
new file mode 100644 (file)
index 0000000..945ce7c
--- /dev/null
@@ -0,0 +1,128 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Tue, 16 Nov 2010 10:49:22 +0000
+Lines: 50
+Message-ID: <20101116104921.GL12986@rakim.wolfsonmicro.main>
+References: <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Tue Nov 16 11:49:29 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIJ6O-0003Hl-Gx
+       for glad-alsa-devel-2@m.gmane.org; Tue, 16 Nov 2010 11:49:28 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id C3B89243EB; Tue, 16 Nov 2010 11:49:27 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 5204E243EB;
+       Tue, 16 Nov 2010 11:49:26 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id D1E2E243EC; Tue, 16 Nov 2010 11:49:24 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 16268243EA
+       for <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 11:49:24 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 4AC4E3B438A; 
+       Tue, 16 Nov 2010 10:49:23 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PIJ6I-0001Kz-Cf; Tue, 16 Nov 2010 10:49:22 +0000
+Content-Disposition: inline
+In-Reply-To: <1289850773.16461.166.camel@Joe-Laptop>
+X-Cookie: I like your SNOOPY POSTER!!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063040>
+
+On Mon, Nov 15, 2010 at 11:52:53AM -0800, Joe Perches wrote:
+> On Mon, 2010-11-15 at 19:34 +0000, Mark Brown wrote:
+
+> > It appears your scripts are already hooked into get_maintainers.pl which
+> > would seem the obvious place to do this?  Sadly I don't do perl, though
+> > it looks like you're doing pretty much all the work on that anyway.
+
+> Sadly, no it's not the right place.
+
+To query MAINTAINERS?  I'd assume that's where you'd want to put that
+stuff?
+
+> There could be a modification to $1 (path)
+> or some such.
+> 
+> Maybe a script like
+> ./scripts/convert_commit_subject_to_subsystem_maintainer_taste
+> or something.
+
+> Care to write one in sh/bash/perl/python/c/ocaml/c#?
+
+Like I say I'd expect this to be a get_maintainers based lookup to dump
+some data out?
+
+> As far as I know, the only subsystem pedants^H^H^H^H^Hople
+> that care much about the commit subject style are
+> arch/x86 and sound.
+
+If you look at the kernel you'll see quite a few subsystems which have
+some sort of standard practice which they do try to enforce, you
+shouldn't take silence as people being happy here - it's taken me some
+considerable time to get round to mentioning this, for example, and I
+might not have bothered if the patch had applied first time around.
+Like working against -next it's one of these things that would make your
+patches easier to deal with.
+
+> I can understand the desire of these subsystem maintainers
+> to have a consistent style.  I think though that requiring
+> a subject header style without providing more than a
+> general guideline is a but much.
+
+The general guideline I tend to go with is that if what you're doing
+looks odd for the code you're submitting against for some reason you're
+doing something wrong unless you understand why you're doing something
+different and there's a good reason.
+
+> I'd use any other automated tool you want to provide.
+
+Like I say, I'd expect the lookup from the database to be handled by
+get_maintainers.pl.  Having a separate database would seem odd.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003145:2, b/test/corpora/lkml/cur/1382298793.003145:2,
new file mode 100644 (file)
index 0000000..7418171
--- /dev/null
@@ -0,0 +1,89 @@
+From: Joe Perches <joe@perches.com>
+Subject: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 06:51:17 -0800
+Lines: 36
+Message-ID: <1289919077.28741.50.camel@Joe-Laptop>
+References: <20101115134939.GC12986@rakim.wolfsonmicro.main>
+        <1289840957.16461.138.camel@Joe-Laptop>
+        <20101115173031.GI12986@rakim.wolfsonmicro.main>
+        <1289842444.16461.140.camel@Joe-Laptop>
+        <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+        <1289845830.16461.149.camel@Joe-Laptop>
+        <20101115190738.GF3338@sirena.org.uk>
+        <1289848458.16461.150.camel@Joe-Laptop>
+        <20101115193407.GK12986@rakim.wolfsonmicro.main>
+        <1289850773.16461.166.camel@Joe-Laptop>
+        <20101116104921.GL12986@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       Florian Mickler <florian@mickler.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Nov 16 15:51:41 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIMsn-0003tR-Ee
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 16 Nov 2010 15:51:41 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1758690Ab0KPOvV (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 09:51:21 -0500
+Received: from mail.perches.com ([173.55.12.10]:1433 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1755918Ab0KPOvU (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 09:51:20 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 38D5C24368;
+       Tue, 16 Nov 2010 06:49:10 -0800 (PST)
+In-Reply-To: <20101116104921.GL12986@rakim.wolfsonmicro.main>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063175>
+
+On Tue, 2010-11-16 at 10:49 +0000, Mark Brown wrote:
+> On Mon, Nov 15, 2010 at 11:52:53AM -0800, Joe Perches wrote:
+> > On Mon, 2010-11-15 at 19:34 +0000, Mark Brown wrote:
+> > > It appears your scripts are already hooked into get_maintainers.pl which
+> > > would seem the obvious place to do this?  Sadly I don't do perl, though
+> > > it looks like you're doing pretty much all the work on that anyway.
+> > Sadly, no it's not the right place.
+> To query MAINTAINERS?  I'd assume that's where you'd want to put that
+> stuff?
+
+I trimmed cc's and added Andrew Morton and Florian Mickler.
+First thread link for them: http://lkml.org/lkml/2010/11/15/262
+
+I use get_maintainer to find email addresses with
+"git send-email --cc-cmd=" but sure it could be extended
+to find some other new information in the MAINTAINERS file.
+
+Anyway, I think that get_maintainers isn't the proper tool
+to rewrite commit subject lines, though it could certainly
+do the lookup of a key in the MAINTAINERS file.
+
+Maybe add a new MAINTAINERS section line something like:
+       "C:     CommitSubjectGrammarStyle"
+where CommitSubjectGrammarStyle is something more
+information rich than "style 1", "style 2".
+
+Perhaps you'll propose a grammar to convert path to header
+and go through and add these "C:" style entries to the
+sections you maintain.
+
+Also, what would you expect the output to be when a single
+patch modified files from 2 subsystems that use different
+styles?
+
+cheers, Joe
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003148:2, b/test/corpora/lkml/cur/1382298793.003148:2,
new file mode 100644 (file)
index 0000000..bd56e87
--- /dev/null
@@ -0,0 +1,92 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 15:04:51 +0000
+Lines: 15
+Message-ID: <20101116150451.GA26239@rakim.wolfsonmicro.main>
+References: <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Florian Mickler <florian@mickler.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       Jiri Kosina <trivial@kernel.org>, alsa-devel@alsa-project.org,
+       linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Tue Nov 16 16:05:00 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIN5f-0004ME-Rp
+       for glad-alsa-devel-2@m.gmane.org; Tue, 16 Nov 2010 16:04:59 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id E869810380D; Tue, 16 Nov 2010 16:04:57 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 159A924457;
+       Tue, 16 Nov 2010 16:04:57 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 43E4E24458; Tue, 16 Nov 2010 16:04:55 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id CED8D243CD
+       for <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 16:04:54 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id A251D3B445E; 
+       Tue, 16 Nov 2010 15:04:52 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PIN5X-0007x2-Qm; Tue, 16 Nov 2010 15:04:51 +0000
+Content-Disposition: inline
+In-Reply-To: <1289919077.28741.50.camel@Joe-Laptop>
+X-Cookie: Onward through the fog.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063178>
+
+On Tue, Nov 16, 2010 at 06:51:17AM -0800, Joe Perches wrote:
+
+> Maybe add a new MAINTAINERS section line something like:
+>      "C:     CommitSubjectGrammarStyle"
+> where CommitSubjectGrammarStyle is something more
+> information rich than "style 1", "style 2".
+
+Something printfish would seem reasonable?
+
+> Also, what would you expect the output to be when a single
+> patch modified files from 2 subsystems that use different
+> styles?
+
+The traditional thing is "ThingX/ThingY: blah" but as with anything else
+you need to be sensible.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003216:2, b/test/corpora/lkml/cur/1382298793.003216:2,
new file mode 100644 (file)
index 0000000..655f450
--- /dev/null
@@ -0,0 +1,113 @@
+From: Florian Mickler <florian@mickler.org>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 18:37:07 +0100
+Lines: 59
+Message-ID: <20101116183707.179964dd@schatten.dmk.lab>
+References: <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Nov 16 18:37:57 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIPTh-0007Ey-5Q
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 16 Nov 2010 18:37:57 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756054Ab0KPRhi (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 12:37:38 -0500
+Received: from ist.d-labs.de ([213.239.218.44]:44291 "EHLO mx01.d-labs.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754101Ab0KPRhh (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 12:37:37 -0500
+Received: from schatten.dmk.lab (f053209081.adsl.alicedsl.de [78.53.209.81])
+       by mx01.d-labs.de (Postfix) with ESMTPSA id 1EB9E7FFD4;
+       Tue, 16 Nov 2010 18:36:55 +0100 (CET)
+In-Reply-To: <1289919077.28741.50.camel@Joe-Laptop>
+X-Mailer: Claws Mail 3.7.6cvs31 (GTK+ 2.20.1; x86_64-unknown-linux-gnu)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063246>
+
+On Tue, 16 Nov 2010 06:51:17 -0800
+Joe Perches <joe@perches.com> wrote:
+
+> On Tue, 2010-11-16 at 10:49 +0000, Mark Brown wrote:
+> > On Mon, Nov 15, 2010 at 11:52:53AM -0800, Joe Perches wrote:
+> > > On Mon, 2010-11-15 at 19:34 +0000, Mark Brown wrote:
+> > > > It appears your scripts are already hooked into get_maintainers.pl which
+> > > > would seem the obvious place to do this?  Sadly I don't do perl, though
+> > > > it looks like you're doing pretty much all the work on that anyway.
+> > > Sadly, no it's not the right place.
+> > To query MAINTAINERS?  I'd assume that's where you'd want to put that
+> > stuff?
+> 
+> I trimmed cc's and added Andrew Morton and Florian Mickler.
+> First thread link for them: http://lkml.org/lkml/2010/11/15/262
+> 
+> I use get_maintainer to find email addresses with
+> "git send-email --cc-cmd=" but sure it could be extended
+> to find some other new information in the MAINTAINERS file.
+> 
+> Anyway, I think that get_maintainers isn't the proper tool
+> to rewrite commit subject lines, though it could certainly
+> do the lookup of a key in the MAINTAINERS file.
+> 
+> Maybe add a new MAINTAINERS section line something like:
+>      "C:     CommitSubjectGrammarStyle"
+> where CommitSubjectGrammarStyle is something more
+> information rich than "style 1", "style 2".
+> 
+> Perhaps you'll propose a grammar to convert path to header
+> and go through and add these "C:" style entries to the
+> sections you maintain.
+> 
+> Also, what would you expect the output to be when a single
+> patch modified files from 2 subsystems that use different
+> styles?
+> 
+> cheers, Joe
+> 
+
+My first reaction to this is, it's silly. Certainly a
+subsystem-maintainer is capable of hacking something together that
+suits his needs or may just use a good editor to get the job done.
+After all, he might want to edit the commit message anyway. Also he has
+to have his act together for all non-conforming submitters anyway,
+because shurely, telling people to re-edit their patches subject line
+is not what one would consider "welcoming to newbies",  or whatever it
+is kernel subsystem maintainers have to be nowadays *g*... 
+
+On second thought, if that facility existed, i think nobody would mind
+it either. So, why not. I don't see a way to specify what to do with
+cross-subsystem patches though. 
+
+(MAINTAINERS seems to be the logical place to put this
+information.)
+
+Regards,
+Flo
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003231:2, b/test/corpora/lkml/cur/1382298793.003231:2,
new file mode 100644 (file)
index 0000000..0f4a123
--- /dev/null
@@ -0,0 +1,82 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 18:12:27 +0000
+Lines: 26
+Message-ID: <20101116181226.GB26239@rakim.wolfsonmicro.main>
+References: <1289842444.16461.140.camel@Joe-Laptop>
+ <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+ <1289845830.16461.149.camel@Joe-Laptop>
+ <20101115190738.GF3338@sirena.org.uk>
+ <1289848458.16461.150.camel@Joe-Laptop>
+ <20101115193407.GK12986@rakim.wolfsonmicro.main>
+ <1289850773.16461.166.camel@Joe-Laptop>
+ <20101116104921.GL12986@rakim.wolfsonmicro.main>
+ <1289919077.28741.50.camel@Joe-Laptop>
+ <20101116183707.179964dd@schatten.dmk.lab>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Joe Perches <joe@perches.com>, Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Florian Mickler <florian@mickler.org>
+X-From: linux-kernel-owner@vger.kernel.org Tue Nov 16 19:12:51 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIQ1Q-0006KJ-Uw
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 16 Nov 2010 19:12:49 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1756467Ab0KPSMa (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 13:12:30 -0500
+Received: from opensource.wolfsonmicro.com ([80.75.67.52]:42692 "EHLO
+       opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL)
+       by vger.kernel.org with ESMTP id S1755686Ab0KPSM3 (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 13:12:29 -0500
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 3E8603B44D5;
+       Tue, 16 Nov 2010 18:12:28 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PIQ15-0000oJ-5s; Tue, 16 Nov 2010 18:12:27 +0000
+Content-Disposition: inline
+In-Reply-To: <20101116183707.179964dd@schatten.dmk.lab>
+X-Cookie: Onward through the fog.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063261>
+
+On Tue, Nov 16, 2010 at 06:37:07PM +0100, Florian Mickler wrote:
+
+> My first reaction to this is, it's silly. Certainly a
+> subsystem-maintainer is capable of hacking something together that
+> suits his needs or may just use a good editor to get the job done.
+> After all, he might want to edit the commit message anyway. Also he has
+> to have his act together for all non-conforming submitters anyway,
+> because shurely, telling people to re-edit their patches subject line
+> is not what one would consider "welcoming to newbies",  or whatever it
+> is kernel subsystem maintainers have to be nowadays *g*... 
+
+So, my general policy on this is that I tend to push back on patches
+which don't just work with the toolset (subject lines are just one part
+of it) to a variable extent depending on who's submitting and what
+they're submitting.  One of the factors is that the more patches are
+coming from someone the easier I expect their patches to be to work
+with.
+
+The reason this came up is that this is one of the issues with Joe's
+patches (which are rather frequent) but he is only willing to do things
+that he can automate.
+
+> (MAINTAINERS seems to be the logical place to put this
+> information.)
+
+Indeed.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003278:2, b/test/corpora/lkml/cur/1382298793.003278:2,
new file mode 100644 (file)
index 0000000..b3b0f0c
--- /dev/null
@@ -0,0 +1,89 @@
+From: Florian Mickler <florian@mickler.org>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 20:35:22 +0100
+Lines: 37
+Message-ID: <20101116203522.65240b18@schatten.dmk.lab>
+References: <1289842444.16461.140.camel@Joe-Laptop>
+       <20101115182708.GJ12986@rakim.wolfsonmicro.main>
+       <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Joe Perches <joe@perches.com>, Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Tue Nov 16 20:36:24 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIRKK-0004cK-An
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 16 Nov 2010 20:36:24 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S932105Ab0KPTfy (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 14:35:54 -0500
+Received: from ist.d-labs.de ([213.239.218.44]:46199 "EHLO mx01.d-labs.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1756324Ab0KPTfw (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 14:35:52 -0500
+Received: from schatten.dmk.lab (f053209081.adsl.alicedsl.de [78.53.209.81])
+       by mx01.d-labs.de (Postfix) with ESMTPSA id 8CEAA7FAFE;
+       Tue, 16 Nov 2010 20:35:09 +0100 (CET)
+In-Reply-To: <20101116181226.GB26239@rakim.wolfsonmicro.main>
+X-Mailer: Claws Mail 3.7.6cvs31 (GTK+ 2.20.1; x86_64-unknown-linux-gnu)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063309>
+
+On Tue, 16 Nov 2010 18:12:27 +0000
+Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
+
+> On Tue, Nov 16, 2010 at 06:37:07PM +0100, Florian Mickler wrote:
+> 
+> > My first reaction to this is, it's silly. Certainly a
+> > subsystem-maintainer is capable of hacking something together that
+> > suits his needs or may just use a good editor to get the job done.
+> > After all, he might want to edit the commit message anyway. Also he has
+> > to have his act together for all non-conforming submitters anyway,
+> > because shurely, telling people to re-edit their patches subject line
+> > is not what one would consider "welcoming to newbies",  or whatever it
+> > is kernel subsystem maintainers have to be nowadays *g*... 
+> 
+> So, my general policy on this is that I tend to push back on patches
+> which don't just work with the toolset (subject lines are just one part
+> of it) to a variable extent depending on who's submitting and what
+> they're submitting.  One of the factors is that the more patches are
+> coming from someone the easier I expect their patches to be to work
+> with.
+> 
+> The reason this came up is that this is one of the issues with Joe's
+> patches (which are rather frequent) but he is only willing to do things
+> that he can automate.
+
+Hehe, I know that I wouldn't want to hand edit every autogenerated patch
+people throw at me... What about just dropping everything before the
+last "]" or ":" and putting an autogenerated prefix before it in a
+pre-commit hook on your side?  
+
+That should work most of the time... don't know... maybe other
+subsystem maintainers have some more suggestions on reducing the
+workload... this could even be an interesting topic for some summit...
+
+Regards,
+Flo
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003295:2, b/test/corpora/lkml/cur/1382298793.003295:2,
new file mode 100644 (file)
index 0000000..802eca7
--- /dev/null
@@ -0,0 +1,92 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 19:55:31 +0000
+Lines: 16
+Message-ID: <20101116195530.GA7523@rakim.wolfsonmicro.main>
+References: <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>,
+       Jiri Kosina <trivial@kernel.org>, alsa-devel@alsa-project.org,
+       linux-kernel@vger.kernel.org
+To: Florian Mickler <florian@mickler.org>
+X-From: alsa-devel-bounces@alsa-project.org Tue Nov 16 20:55:48 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIRd2-0000Zr-GV
+       for glad-alsa-devel-2@m.gmane.org; Tue, 16 Nov 2010 20:55:44 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 02BEA2417E; Tue, 16 Nov 2010 20:55:36 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 8AFD424159;
+       Tue, 16 Nov 2010 20:55:35 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 32ADC24179; Tue, 16 Nov 2010 20:55:34 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 913CA24158
+       for <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 20:55:33 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id C4CDE3B4538; 
+       Tue, 16 Nov 2010 19:55:31 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PIRcp-0004nx-60; Tue, 16 Nov 2010 19:55:31 +0000
+Content-Disposition: inline
+In-Reply-To: <20101116203522.65240b18@schatten.dmk.lab>
+X-Cookie: Killing turkeys causes winter.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063326>
+
+On Tue, Nov 16, 2010 at 08:35:22PM +0100, Florian Mickler wrote:
+
+> Hehe, I know that I wouldn't want to hand edit every autogenerated patch
+> people throw at me... What about just dropping everything before the
+> last "]" or ":" and putting an autogenerated prefix before it in a
+> pre-commit hook on your side?  
+
+> That should work most of the time... don't know... maybe other
+
+It's the most of the time bit that worries me, I'm generally reluctant
+to script things like this when the scripts aren't very widely used and
+it's a pain to get hooks distributed over all my systems and working for
+all the things I need to apply patches for.
+
+From my point of view my current approach is actually working pretty
+well with most submitters, even people doing similar janitorial stuff.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003316:2, b/test/corpora/lkml/cur/1382298793.003316:2,
new file mode 100644 (file)
index 0000000..7b09d35
--- /dev/null
@@ -0,0 +1,105 @@
+From: Randy Dunlap <rdunlap@xenotime.net>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 12:21:02 -0800
+Organization: YPO4
+Lines: 34
+Message-ID: <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+References: <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: alsa-devel-bounces@alsa-project.org Tue Nov 16 21:21:20 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIS1m-0001Kj-Rd
+       for glad-alsa-devel-2@m.gmane.org; Tue, 16 Nov 2010 21:21:18 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 2FC2024371; Tue, 16 Nov 2010 21:21:18 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id ACBEB24368;
+       Tue, 16 Nov 2010 21:21:16 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 6AFBB24369; Tue, 16 Nov 2010 21:21:15 +0100 (CET)
+Received: from xenotime.net (xenotime.net [72.52.115.56])
+       by alsa0.perex.cz (Postfix) with SMTP id 6FDFD24363
+       for <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 21:21:14 +0100 (CET)
+Received: from chimera.site ([173.50.240.230]) by xenotime.net for
+       <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 12:21:06 -0800
+In-Reply-To: <20101116195530.GA7523@rakim.wolfsonmicro.main>
+X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063347>
+
+On Tue, 16 Nov 2010 19:55:31 +0000 Mark Brown wrote:
+
+> On Tue, Nov 16, 2010 at 08:35:22PM +0100, Florian Mickler wrote:
+> 
+> > Hehe, I know that I wouldn't want to hand edit every autogenerated patch
+> > people throw at me... What about just dropping everything before the
+> > last "]" or ":" and putting an autogenerated prefix before it in a
+> > pre-commit hook on your side?  
+> 
+> > That should work most of the time... don't know... maybe other
+> 
+> It's the most of the time bit that worries me, I'm generally reluctant
+> to script things like this when the scripts aren't very widely used and
+> it's a pain to get hooks distributed over all my systems and working for
+> all the things I need to apply patches for.
+> 
+> From my point of view my current approach is actually working pretty
+> well with most submitters, even people doing similar janitorial stuff.
+
+I don't know what you asked Joe to change, but asking someone to use
+the documented canonical patch format:
+
+<quote>
+The canonical patch subject line is:
+
+    Subject: [PATCH 001/123] subsystem: summary phrase
+</quote>
+
+should be fine.  And there is no need for printf-ish templates
+for this in MAINTAINERS either.
+
+---
+~Randy
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003334:2, b/test/corpora/lkml/cur/1382298793.003334:2,
new file mode 100644 (file)
index 0000000..9a58840
--- /dev/null
@@ -0,0 +1,106 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 12:42:36 -0800
+Lines: 51
+Message-ID: <1289940156.28741.207.camel@Joe-Laptop>
+References: <1289845830.16461.149.camel@Joe-Laptop>
+        <20101115190738.GF3338@sirena.org.uk>
+        <1289848458.16461.150.camel@Joe-Laptop>
+        <20101115193407.GK12986@rakim.wolfsonmicro.main>
+        <1289850773.16461.166.camel@Joe-Laptop>
+        <20101116104921.GL12986@rakim.wolfsonmicro.main>
+        <1289919077.28741.50.camel@Joe-Laptop>
+        <20101116183707.179964dd@schatten.dmk.lab>
+        <20101116181226.GB26239@rakim.wolfsonmicro.main>
+        <20101116203522.65240b18@schatten.dmk.lab>
+        <20101116195530.GA7523@rakim.wolfsonmicro.main>
+        <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Florian Mickler <florian@mickler.org>,
+       Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Randy Dunlap <rdunlap@xenotime.net>
+X-From: linux-kernel-owner@vger.kernel.org Tue Nov 16 21:43:01 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PISMm-00074k-9X
+       for glk-linux-kernel-3@lo.gmane.org; Tue, 16 Nov 2010 21:43:00 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1757174Ab0KPUmj (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 15:42:39 -0500
+Received: from mail.perches.com ([173.55.12.10]:1476 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1754409Ab0KPUmi (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 15:42:38 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 17CC824368;
+       Tue, 16 Nov 2010 12:40:23 -0800 (PST)
+In-Reply-To: <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063365>
+
+On Tue, 2010-11-16 at 12:21 -0800, Randy Dunlap wrote:
+> On Tue, 16 Nov 2010 19:55:31 +0000 Mark Brown wrote:
+> I don't know what you asked Joe to change, but asking someone to use
+> the documented canonical patch format:
+> <quote>
+> The canonical patch subject line is:
+>     Subject: [PATCH 001/123] subsystem: summary phrase
+> </quote>
+> should be fine.  And there is no need for printf-ish templates
+> for this in MAINTAINERS either.
+
+I've never read that before.  Learn something new etc...
+It seems path prefixes aren't good nor even commonly used.
+
+A review of kernel patch subjects:
+
+$ git log --no-merges --pretty=oneline | \
+       cut -f2- -d" " | cut -f1 -d: | sort | uniq -c | sort -rn
+
+is interesting.  Here's the head:
+   5007 x86
+   3943 Staging
+   3220 USB
+   2790 sh
+   2707 KVM
+   2624 ARM
+   2449 ALSA
+   1571 Input
+   1549 ASoC
+   1470 iwlwifi
+   1423 ACPI
+   1397 mac80211
+   1384 V4L/DVB
+   1226 sched
+   1200 Btrfs
+   1184 powerpc
+   1106 [NETFILTER]
+   1080 MIPS
+   1049 net
+   1047 ide
+   1014 drm/i915
+    993 staging
+    921 ath9k
+
+Some subsystem maintainers like upper case, some mixed, some lower.
+Some aren't consistent.  (Staging/staging)
+
+It doesn't seem a rule can be pregenerated so maybe adding these
+"C:" lines to MAINTAINERS has some value.
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003340:2, b/test/corpora/lkml/cur/1382298793.003340:2,
new file mode 100644 (file)
index 0000000..ff520cb
--- /dev/null
@@ -0,0 +1,138 @@
+From: Randy Dunlap <rdunlap@xenotime.net>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 12:46:09 -0800
+Organization: YPO4
+Lines: 64
+Message-ID: <20101116124609.382e42fb.rdunlap@xenotime.net>
+References: <1289845830.16461.149.camel@Joe-Laptop>
+       <20101115190738.GF3338@sirena.org.uk>
+       <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <1289940156.28741.207.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Andrew Morton <akpm@linux-foundation.org>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Tue Nov 16 21:46:23 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PISQ1-0000rd-2s
+       for glad-alsa-devel-2@m.gmane.org; Tue, 16 Nov 2010 21:46:21 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 5421B2438C; Tue, 16 Nov 2010 21:46:20 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: *
+X-Spam-Status: No, score=1.0 required=5.0 tests=PRX_BODY_29 autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 774FE24390;
+       Tue, 16 Nov 2010 21:46:19 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 6051924391; Tue, 16 Nov 2010 21:46:17 +0100 (CET)
+Received: from xenotime.net (xenotime.net [72.52.115.56])
+       by alsa0.perex.cz (Postfix) with SMTP id 4F17D2438C
+       for <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 21:46:15 +0100 (CET)
+Received: from chimera.site ([173.50.240.230]) by xenotime.net for
+       <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 12:46:10 -0800
+In-Reply-To: <1289940156.28741.207.camel@Joe-Laptop>
+X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063371>
+
+On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+
+> On Tue, 2010-11-16 at 12:21 -0800, Randy Dunlap wrote:
+> > On Tue, 16 Nov 2010 19:55:31 +0000 Mark Brown wrote:
+> > I don't know what you asked Joe to change, but asking someone to use
+> > the documented canonical patch format:
+> > <quote>
+> > The canonical patch subject line is:
+> >     Subject: [PATCH 001/123] subsystem: summary phrase
+> > </quote>
+> > should be fine.  And there is no need for printf-ish templates
+> > for this in MAINTAINERS either.
+> 
+> I've never read that before.  Learn something new etc...
+> It seems path prefixes aren't good nor even commonly used.
+> 
+> A review of kernel patch subjects:
+> 
+> $ git log --no-merges --pretty=oneline | \
+>      cut -f2- -d" " | cut -f1 -d: | sort | uniq -c | sort -rn
+> 
+> is interesting.  Here's the head:
+>    5007 x86
+>    3943 Staging
+>    3220 USB
+>    2790 sh
+>    2707 KVM
+>    2624 ARM
+>    2449 ALSA
+>    1571 Input
+>    1549 ASoC
+>    1470 iwlwifi
+>    1423 ACPI
+>    1397 mac80211
+>    1384 V4L/DVB
+>    1226 sched
+>    1200 Btrfs
+>    1184 powerpc
+>    1106 [NETFILTER]
+>    1080 MIPS
+>    1049 net
+>    1047 ide
+>    1014 drm/i915
+>     993 staging
+>     921 ath9k
+
+$ARCH is a commonly accepted substitute for subsystem.
+
+And yes, lots of people use <drivername> there as well.
+
+
+> Some subsystem maintainers like upper case, some mixed, some lower.
+> Some aren't consistent.  (Staging/staging)
+
+Case usually doesn't matter to most of us.
+
+> It doesn't seem a rule can be pregenerated so maybe adding these
+> "C:" lines to MAINTAINERS has some value.
+
+Hopefully it won't go that far.
+
+---
+~Randy
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003448:2, b/test/corpora/lkml/cur/1382298793.003448:2,
new file mode 100644 (file)
index 0000000..d9ecd6a
--- /dev/null
@@ -0,0 +1,100 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 23:01:26 +0000
+Lines: 24
+Message-ID: <20101116230126.GB24623@opensource.wolfsonmicro.com>
+References: <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
+To: Randy Dunlap <rdunlap@xenotime.net>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 00:01:43 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIUWr-0004yP-6J
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 00:01:33 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id A434B103882; Wed, 17 Nov 2010 00:01:26 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 9B9A81037FB;
+       Wed, 17 Nov 2010 00:01:23 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 47D7B1037FB; Wed, 17 Nov 2010 00:01:22 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id F24201037E3
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 00:01:20 +0100 (CET)
+Received: from finisterre.wolfsonmicro.main
+       (cpc3-sgyl4-0-0-cust125.sgyl.cable.virginmedia.com [82.41.240.126])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id F2D407881C9; 
+       Tue, 16 Nov 2010 23:01:18 +0000 (GMT)
+Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@opensource.wolfsonmicro.com>)
+       id 1PIUWk-0007m9-B8; Tue, 16 Nov 2010 23:01:26 +0000
+Content-Disposition: inline
+In-Reply-To: <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+X-Cookie: Beware of Bigfoot!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063481>
+
+On Tue, Nov 16, 2010 at 12:21:02PM -0800, Randy Dunlap wrote:
+
+> I don't know what you asked Joe to change, but asking someone to use
+> the documented canonical patch format:
+
+> <quote>
+> The canonical patch subject line is:
+
+>     Subject: [PATCH 001/123] subsystem: summary phrase
+> </quote>
+
+> should be fine.  And there is no need for printf-ish templates
+> for this in MAINTAINERS either.
+
+That's exactly what I asked him to do.  He said he's not willing to use
+anything for "subsystem" which can't be automatically generated.
+
+The formats I mentioned because some subsystems have their own things
+within this format like "subsystem: driver:" or whatever.  While it's
+probably not an issue for the sort of patch Joe generates if we do have
+a tool for this I'd expect it'll go the same way that checkpatch does
+and get used by people doing more specific work.  It'd be good to try to
+head off the friction that may cause by at least having an idea how we
+might cope with that.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003459:2, b/test/corpora/lkml/cur/1382298793.003459:2,
new file mode 100644 (file)
index 0000000..8fddae8
--- /dev/null
@@ -0,0 +1,88 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 23:22:58 +0000
+Lines: 12
+Message-ID: <20101116232258.GC24623@opensource.wolfsonmicro.com>
+References: <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <1289940156.28741.207.camel@Joe-Laptop>
+       <20101116124609.382e42fb.rdunlap@xenotime.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
+To: Randy Dunlap <rdunlap@xenotime.net>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 00:22:58 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIUrZ-0001Km-F5
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 00:22:57 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 28F9610381A; Wed, 17 Nov 2010 00:22:55 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 1CC8D10381B;
+       Wed, 17 Nov 2010 00:22:55 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id B1B8B10381B; Wed, 17 Nov 2010 00:22:52 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id CB03810381A
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 00:22:51 +0100 (CET)
+Received: from finisterre.wolfsonmicro.main
+       (cpc3-sgyl4-0-0-cust125.sgyl.cable.virginmedia.com [82.41.240.126])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 39A957881C9; 
+       Tue, 16 Nov 2010 23:22:51 +0000 (GMT)
+Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@opensource.wolfsonmicro.com>)
+       id 1PIUra-0001BL-NS; Tue, 16 Nov 2010 23:22:58 +0000
+Content-Disposition: inline
+In-Reply-To: <20101116124609.382e42fb.rdunlap@xenotime.net>
+X-Cookie: Beware of Bigfoot!
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063492>
+
+On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+> On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+
+> > Some subsystem maintainers like upper case, some mixed, some lower.
+> > Some aren't consistent.  (Staging/staging)
+
+> Case usually doesn't matter to most of us.
+
+Given that we're working in case sensitive languages here it's probably
+safe to assume that a reasonable proportion of people will care; being
+reasonably consistent with existing practice for the subsystem seems
+sensible.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003462:2, b/test/corpora/lkml/cur/1382298793.003462:2,
new file mode 100644 (file)
index 0000000..4f6ba5a
--- /dev/null
@@ -0,0 +1,97 @@
+From: Randy Dunlap <rdunlap@xenotime.net>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 15:28:35 -0800
+Organization: YPO4
+Lines: 26
+Message-ID: <20101116152835.b0ab571c.rdunlap@xenotime.net>
+References: <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <1289940156.28741.207.camel@Joe-Laptop>
+       <20101116124609.382e42fb.rdunlap@xenotime.net>
+       <20101116232258.GC24623@opensource.wolfsonmicro.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 00:29:00 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIUxP-0004iI-Hq
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 00:28:59 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id AD65410388C; Wed, 17 Nov 2010 00:28:58 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 21296103822;
+       Wed, 17 Nov 2010 00:28:57 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 58AE7103822; Wed, 17 Nov 2010 00:28:54 +0100 (CET)
+Received: from xenotime.net (xenotime.net [72.52.115.56])
+       by alsa0.perex.cz (Postfix) with SMTP id 1947B10381B
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 00:28:52 +0100 (CET)
+Received: from chimera.site ([173.50.240.230]) by xenotime.net for
+       <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 15:28:36 -0800
+In-Reply-To: <20101116232258.GC24623@opensource.wolfsonmicro.com>
+X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063495>
+
+On Tue, 16 Nov 2010 23:22:58 +0000 Mark Brown wrote:
+
+> On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+> > On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+> 
+> > > Some subsystem maintainers like upper case, some mixed, some lower.
+> > > Some aren't consistent.  (Staging/staging)
+> 
+> > Case usually doesn't matter to most of us.
+> 
+> Given that we're working in case sensitive languages here it's probably
+> safe to assume that a reasonable proportion of people will care; being
+> reasonably consistent with existing practice for the subsystem seems
+> sensible.
+
+Greg takes patches that say STAGING or Staging or staging.
+
+DaveM takes patches that say net: or netdev: or network: or NET:
+
+The sound maintainers take patches that say sound: or alsa: or ALSA:
+
+etc.
+
+---
+~Randy
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003468:2, b/test/corpora/lkml/cur/1382298793.003468:2,
new file mode 100644 (file)
index 0000000..a26128d
--- /dev/null
@@ -0,0 +1,99 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 23:50:26 +0000
+Lines: 23
+Message-ID: <20101116235025.GA7256@opensource.wolfsonmicro.com>
+References: <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <1289940156.28741.207.camel@Joe-Laptop>
+       <20101116124609.382e42fb.rdunlap@xenotime.net>
+       <20101116232258.GC24623@opensource.wolfsonmicro.com>
+       <20101116152835.b0ab571c.rdunlap@xenotime.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
+To: Randy Dunlap <rdunlap@xenotime.net>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 00:50:24 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIVI7-00006s-O3
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 00:50:23 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id F007910388B; Wed, 17 Nov 2010 00:50:22 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 9E0B9103822;
+       Wed, 17 Nov 2010 00:50:21 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id AD918103822; Wed, 17 Nov 2010 00:50:19 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 39C5A10381B
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 00:50:19 +0100 (CET)
+Received: from finisterre.wolfsonmicro.main
+       (cpc3-sgyl4-0-0-cust125.sgyl.cable.virginmedia.com [82.41.240.126])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id B19503B4628; 
+       Tue, 16 Nov 2010 23:50:18 +0000 (GMT)
+Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@opensource.wolfsonmicro.com>)
+       id 1PIVIA-0003UP-7d; Tue, 16 Nov 2010 23:50:26 +0000
+Content-Disposition: inline
+In-Reply-To: <20101116152835.b0ab571c.rdunlap@xenotime.net>
+X-Cookie: You enjoy the company of other people.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063501>
+
+On Tue, Nov 16, 2010 at 03:28:35PM -0800, Randy Dunlap wrote:
+> On Tue, 16 Nov 2010 23:22:58 +0000 Mark Brown wrote:
+> > On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+
+> > > Case usually doesn't matter to most of us.
+
+> > Given that we're working in case sensitive languages here it's probably
+> > safe to assume that a reasonable proportion of people will care; being
+> > reasonably consistent with existing practice for the subsystem seems
+> > sensible.
+
+> Greg takes patches that say STAGING or Staging or staging.
+
+> DaveM takes patches that say net: or netdev: or network: or NET:
+
+> The sound maintainers take patches that say sound: or alsa: or ALSA:
+
+> etc.
+
+...and best practice would be to pay attention to what the standard
+thing is for the subsystem and follow that.  We shouldn't be suggesting
+that people just ignore the case, though obviously if it's not clear
+then it's not worth worrying too much about it.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003471:2, b/test/corpora/lkml/cur/1382298793.003471:2,
new file mode 100644 (file)
index 0000000..1e1fc4a
--- /dev/null
@@ -0,0 +1,79 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 15:57:57 -0800
+Lines: 25
+Message-ID: <1289951877.28741.262.camel@Joe-Laptop>
+References: <1289850773.16461.166.camel@Joe-Laptop>
+        <20101116104921.GL12986@rakim.wolfsonmicro.main>
+        <1289919077.28741.50.camel@Joe-Laptop>
+        <20101116183707.179964dd@schatten.dmk.lab>
+        <20101116181226.GB26239@rakim.wolfsonmicro.main>
+        <20101116203522.65240b18@schatten.dmk.lab>
+        <20101116195530.GA7523@rakim.wolfsonmicro.main>
+        <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+        <1289940156.28741.207.camel@Joe-Laptop>
+        <20101116124609.382e42fb.rdunlap@xenotime.net>
+        <20101116232258.GC24623@opensource.wolfsonmicro.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Randy Dunlap <rdunlap@xenotime.net>,
+       Florian Mickler <florian@mickler.org>,
+       Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Nov 17 00:58:25 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIVPr-0004pn-RQ
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 17 Nov 2010 00:58:24 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1757881Ab0KPX6A (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 18:58:00 -0500
+Received: from mail.perches.com ([173.55.12.10]:1493 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1757143Ab0KPX57 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 18:57:59 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id B87C82436B;
+       Tue, 16 Nov 2010 15:55:40 -0800 (PST)
+In-Reply-To: <20101116232258.GC24623@opensource.wolfsonmicro.com>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063504>
+
+On Tue, 2010-11-16 at 23:22 +0000, Mark Brown wrote:
+> On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+> > On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+> > > Some subsystem maintainers like upper case, some mixed, some lower.
+> > > Some aren't consistent.  (Staging/staging)
+> > Case usually doesn't matter to most of us.
+> Given that we're working in case sensitive languages here it's probably
+> safe to assume that a reasonable proportion of people will care; being
+> reasonably consistent with existing practice for the subsystem seems
+> sensible.
+
+Presumably the tool would also have to traverse up the tree
+to find the appropriate style so every MAINTAINERS section
+would not need a C entry.
+
+ie: sound/soc/codecs/foo could use the C: entry for sound/soc/
+
+Perhaps something like:
+       C:      ASoC basename:
+
+and for arch/x86/:
+       C:      x86, dirname:
+
+etc.
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003472:2, b/test/corpora/lkml/cur/1382298793.003472:2,
new file mode 100644 (file)
index 0000000..0e360fd
--- /dev/null
@@ -0,0 +1,84 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Tue, 16 Nov 2010 15:57:55 -0800
+Lines: 29
+Message-ID: <1289951875.28741.261.camel@Joe-Laptop>
+References: <1289850773.16461.166.camel@Joe-Laptop>
+        <20101116104921.GL12986@rakim.wolfsonmicro.main>
+        <1289919077.28741.50.camel@Joe-Laptop>
+        <20101116183707.179964dd@schatten.dmk.lab>
+        <20101116181226.GB26239@rakim.wolfsonmicro.main>
+        <20101116203522.65240b18@schatten.dmk.lab>
+        <20101116195530.GA7523@rakim.wolfsonmicro.main>
+        <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+        <1289940156.28741.207.camel@Joe-Laptop>
+        <20101116124609.382e42fb.rdunlap@xenotime.net>
+        <20101116232258.GC24623@opensource.wolfsonmicro.com>
+        <20101116152835.b0ab571c.rdunlap@xenotime.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Florian Mickler <florian@mickler.org>,
+       Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Randy Dunlap <rdunlap@xenotime.net>
+X-From: linux-kernel-owner@vger.kernel.org Wed Nov 17 00:58:26 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIVPr-0004pn-AW
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 17 Nov 2010 00:58:23 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1757099Ab0KPX56 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 18:57:58 -0500
+Received: from mail.perches.com ([173.55.12.10]:1485 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751238Ab0KPX55 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 18:57:57 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 18B3A24368;
+       Tue, 16 Nov 2010 15:55:38 -0800 (PST)
+In-Reply-To: <20101116152835.b0ab571c.rdunlap@xenotime.net>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063505>
+
+On Tue, 2010-11-16 at 15:28 -0800, Randy Dunlap wrote:
+> On Tue, 16 Nov 2010 23:22:58 +0000 Mark Brown wrote:
+> > On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+> > > On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+> > > > Some subsystem maintainers like upper case, some mixed, some lower.
+> > > > Some aren't consistent.  (Staging/staging)
+> > > Case usually doesn't matter to most of us.
+> > Given that we're working in case sensitive languages here it's probably
+> > safe to assume that a reasonable proportion of people will care; being
+> > reasonably consistent with existing practice for the subsystem seems
+> > sensible.
+> Greg takes patches that say STAGING or Staging or staging.
+
+Greg seems to rewrite patch subjects and is inconsistent
+about case, so he might be doing that by hand.
+
+> DaveM takes patches that say net: or netdev: or network: or NET:
+
+DaveM doesn't appear to be choosy about patch subject lines.
+He seems to take any sensible patch and as far as I know he
+doesn't edit the subject lines.  He does reject inferior
+patches outright.
+
+> The sound maintainers take patches that say sound: or alsa: or ALSA:
+
+The sound maintainers seem to rewrite patch subjects on an
+ad-hoc basis.
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003478:2, b/test/corpora/lkml/cur/1382298793.003478:2,
new file mode 100644 (file)
index 0000000..c95e3f8
--- /dev/null
@@ -0,0 +1,113 @@
+From: Joel Becker <Joel.Becker@oracle.com>
+Subject: Re: [PATCH 36/44] fs/ocfs2: Remove unnecessary
+       semicolons
+Date: Tue, 16 Nov 2010 16:10:47 -0800
+Lines: 38
+Message-ID: <20101117001046.GE10237@mail.oracle.com>
+References: <cover.1289789604.git.joe@perches.com>
+       <e32409b17aaa1a54fec85f3654583ef08fcf851c.1289789605.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Mark Fasheh <mfasheh@suse.com>, Jiri Kosina <trivial@kernel.org>,
+        linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
+To: Joe Perches <joe@perches.com>
+X-From: ocfs2-devel-bounces@oss.oracle.com Wed Nov 17 01:11:36 2010
+Return-path: <ocfs2-devel-bounces@oss.oracle.com>
+Envelope-to: gcfod-ocfs2-devel@gmane.org
+Received: from rcsinet10.oracle.com ([148.87.113.121])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <ocfs2-devel-bounces@oss.oracle.com>)
+       id 1PIVcY-0003qc-VC
+       for gcfod-ocfs2-devel@gmane.org; Wed, 17 Nov 2010 01:11:31 +0100
+Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
+       by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oAH0B96Y007820
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+       Wed, 17 Nov 2010 00:11:10 GMT
+Received: from oss.oracle.com (oss.oracle.com [141.146.12.120])
+       by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oAH0B6rM032434
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
+       Wed, 17 Nov 2010 00:11:07 GMT
+Received: from localhost ([127.0.0.1] helo=oss.oracle.com)
+       by oss.oracle.com with esmtp (Exim 4.63)
+       (envelope-from <ocfs2-devel-bounces@oss.oracle.com>)
+       id 1PIVcA-0001bs-K0; Tue, 16 Nov 2010 16:11:06 -0800
+Received: from rcsinet15.oracle.com ([148.87.113.117])
+       by oss.oracle.com with esmtp (Exim 4.63)
+       (envelope-from <joel.becker@oracle.com>) id 1PIVc7-0001bl-Td
+       for ocfs2-devel@oss.oracle.com; Tue, 16 Nov 2010 16:11:04 -0800
+Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
+       by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id
+       oAH0B1gV032165; Wed, 17 Nov 2010 00:11:01 GMT
+Received: from ca-server1.us.oracle.com by acsmt353.oracle.com
+       with ESMTP id 784380701289952654; Tue, 16 Nov 2010 16:10:54 -0800
+Received: from jlbec by ca-server1.us.oracle.com with local (Exim 4.69)
+       (envelope-from <joel.becker@oracle.com>)
+       id 1PIVbx-0007gG-4G; Tue, 16 Nov 2010 16:10:53 -0800
+Mail-Followup-To: Joe Perches <joe@perches.com>,
+       Jiri Kosina <trivial@kernel.org>, Mark Fasheh <mfasheh@suse.com>,
+       ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
+Content-Disposition: inline
+In-Reply-To: <e32409b17aaa1a54fec85f3654583ef08fcf851c.1289789605.git.joe@perches.com>
+X-Burt-Line: Trees are cool.
+X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever
+       come to perfection.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: ocfs2-devel@oss.oracle.com
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: <ocfs2-devel.oss.oracle.com>
+List-Unsubscribe: <http://oss.oracle.com/mailman/listinfo/ocfs2-devel>,
+       <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe>
+List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel>
+List-Post: <mailto:ocfs2-devel@oss.oracle.com>
+List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help>
+List-Subscribe: <http://oss.oracle.com/mailman/listinfo/ocfs2-devel>,
+       <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe>
+Sender: ocfs2-devel-bounces@oss.oracle.com
+Errors-To: ocfs2-devel-bounces@oss.oracle.com
+X-Source-IP: oss.oracle.com [141.146.12.120]
+X-Auth-Type: Internal IP
+X-CT-RefId: str=0001.0A090207.4CE31D9C.007A:SCFSTAT3865452,ss=1,fgs=0
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063511>
+
+On Sun, Nov 14, 2010 at 07:04:55PM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Acked-by: Joel Becker <joel.becker@oracle.com>
+
+
+> ---
+>  fs/ocfs2/refcounttree.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+> diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
+> index b5f9160..da14a42 100644
+> --- a/fs/ocfs2/refcounttree.c
+> +++ b/fs/ocfs2/refcounttree.c
+> @@ -3704,7 +3704,7 @@ int ocfs2_refcount_cow_xattr(struct inode *inode,
+>      context->cow_start = cow_start;
+>      context->cow_len = cow_len;
+>      context->ref_tree = ref_tree;
+> -    context->ref_root_bh = ref_root_bh;;
+> +    context->ref_root_bh = ref_root_bh;
+>      context->cow_object = xv;
+>  
+>      context->cow_duplicate_clusters = ocfs2_duplicate_clusters_by_jbd;
+> -- 
+> 1.7.3.1.g432b3.dirty
+> 
+
+-- 
+
+Life's Little Instruction Book #237
+
+       "Seek out the good in people."
+
+Joel Becker
+Senior Development Manager
+Oracle
+E-mail: joel.becker@oracle.com
+Phone: (650) 506-8127
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003497:2, b/test/corpora/lkml/cur/1382298793.003497:2,
new file mode 100644 (file)
index 0000000..ab47886
--- /dev/null
@@ -0,0 +1,94 @@
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Wed, 17 Nov 2010 01:44:27 +0100
+Lines: 34
+Message-ID: <20101117014427.41d85b13@stein>
+References: <1289848458.16461.150.camel@Joe-Laptop>
+       <20101115193407.GK12986@rakim.wolfsonmicro.main>
+       <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <20101116230126.GB24623@opensource.wolfsonmicro.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Randy Dunlap <rdunlap@xenotime.net>,
+       Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>,
+       Jiri Kosina <trivial@kernel.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Nov 17 01:45:44 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIW9d-0005et-Ft
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 17 Nov 2010 01:45:41 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933190Ab0KQApU (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 19:45:20 -0500
+Received: from einhorn.in-berlin.de ([192.109.42.8]:40608 "EHLO
+       einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S932265Ab0KQApS (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 19:45:18 -0500
+X-Envelope-From: stefanr@s5r6.in-berlin.de
+Received: from stein ([83.221.231.7])
+       (authenticated bits=0)
+       by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id oAH0iRjV025917
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
+       Wed, 17 Nov 2010 01:44:28 +0100
+In-Reply-To: <20101116230126.GB24623@opensource.wolfsonmicro.com>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu)
+X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063530>
+
+On Nov 16 Mark Brown wrote:
+> On Tue, Nov 16, 2010 at 12:21:02PM -0800, Randy Dunlap wrote:
+> 
+> > I don't know what you asked Joe to change, but asking someone to use
+> > the documented canonical patch format:
+> 
+> > <quote>
+> > The canonical patch subject line is:
+> 
+> >     Subject: [PATCH 001/123] subsystem: summary phrase
+> > </quote>
+> 
+> > should be fine.  And there is no need for printf-ish templates
+> > for this in MAINTAINERS either.
+> 
+> That's exactly what I asked him to do.  He said he's not willing to use
+> anything for "subsystem" which can't be automatically generated.
+
+Why should we codify our conventions in MAINTAINERS to accommodate the
+specific problem of virtually a _single_ patch author?
+
+Conventions are living and are being adjusted all the time, as code
+organization changes, people join and go, projects start and cease.
+
+Said author please looks the conventions up in the git history.  If he
+finds that this decelerates his patch generation rate, he can surely
+code a script that looks into git for him and suggests plausible
+prefixes for his patch titles to him.  Or he can collect a kind of
+database (a config file) locally for his own use in which he records
+conventional prefixes on the go.
+-- 
+Stefan Richter
+-=====-==-=- =-== =---=
+http://arcgraph.de/sr/
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003501:2, b/test/corpora/lkml/cur/1382298793.003501:2,
new file mode 100644 (file)
index 0000000..67668d1
--- /dev/null
@@ -0,0 +1,89 @@
+From: Jiri Kosina <jkosina@suse.cz>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Wed, 17 Nov 2010 01:53:35 +0100 (CET)
+Lines: 43
+Message-ID: <alpine.LNX.2.00.1011170150060.7420@pobox.suse.cz>
+References: <1289848458.16461.150.camel@Joe-Laptop> <20101115193407.GK12986@rakim.wolfsonmicro.main> <1289850773.16461.166.camel@Joe-Laptop> <20101116104921.GL12986@rakim.wolfsonmicro.main> <1289919077.28741.50.camel@Joe-Laptop> <20101116183707.179964dd@schatten.dmk.lab>
+ <20101116181226.GB26239@rakim.wolfsonmicro.main> <20101116203522.65240b18@schatten.dmk.lab> <20101116195530.GA7523@rakim.wolfsonmicro.main> <20101116122102.86e7e0b9.rdunlap@xenotime.net> <20101116230126.GB24623@opensource.wolfsonmicro.com>
+ <20101117014427.41d85b13@stein>
+Mime-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Randy Dunlap <rdunlap@xenotime.net>,
+       Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Stefan Richter <stefanr@s5r6.in-berlin.de>
+X-From: linux-kernel-owner@vger.kernel.org Wed Nov 17 01:53:55 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIWHa-0001VG-H4
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 17 Nov 2010 01:53:54 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S933245Ab0KQAxi (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Tue, 16 Nov 2010 19:53:38 -0500
+Received: from cantor2.suse.de ([195.135.220.15]:45188 "EHLO mx2.suse.de"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S932265Ab0KQAxh (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Tue, 16 Nov 2010 19:53:37 -0500
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       by mx2.suse.de (Postfix) with ESMTP id 1C9DD867E2;
+       Wed, 17 Nov 2010 01:53:36 +0100 (CET)
+In-Reply-To: <20101117014427.41d85b13@stein>
+User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063534>
+
+On Wed, 17 Nov 2010, Stefan Richter wrote:
+
+> > > I don't know what you asked Joe to change, but asking someone to use
+> > > the documented canonical patch format:
+> > 
+> > > <quote>
+> > > The canonical patch subject line is:
+> > 
+> > >     Subject: [PATCH 001/123] subsystem: summary phrase
+> > > </quote>
+> > 
+> > > should be fine.  And there is no need for printf-ish templates
+> > > for this in MAINTAINERS either.
+> > 
+> > That's exactly what I asked him to do.  He said he's not willing to use
+> > anything for "subsystem" which can't be automatically generated.
+> 
+> Why should we codify our conventions in MAINTAINERS to accommodate the
+> specific problem of virtually a _single_ patch author?
+> 
+> Conventions are living and are being adjusted all the time, as code
+> organization changes, people join and go, projects start and cease.
+> 
+> Said author please looks the conventions up in the git history.  If he
+> finds that this decelerates his patch generation rate, he can surely
+> code a script that looks into git for him and suggests plausible
+> prefixes for his patch titles to him.  Or he can collect a kind of
+> database (a config file) locally for his own use in which he records
+> conventional prefixes on the go.
+
+Come on guys, this debate is really horribly boring.
+
+Either the maintainer wants the patch. Then he is certainly able to apply 
+it no matter the subject line (I personally am getting a lot of patches 
+which don't follow the format I am using in my tree ... converting 
+Subject: lines is so trivial that I have never felt like bothering anyone 
+about it ... it's basically single condition in a shellscript). Or the 
+maintainer doesn't feel like the patch is worth it, and then the 
+subject-line format really doesn't matter.
+
+-- 
+Jiri Kosina
+SUSE Labs, Novell Inc.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003503:2, b/test/corpora/lkml/cur/1382298793.003503:2,
new file mode 100644 (file)
index 0000000..0ea87ec
--- /dev/null
@@ -0,0 +1,110 @@
+From: Randy Dunlap <rdunlap@xenotime.net>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Tue, 16 Nov 2010 16:55:56 -0800
+Organization: YPO4
+Lines: 36
+Message-ID: <20101116165556.3ee8e236.rdunlap@xenotime.net>
+References: <1289850773.16461.166.camel@Joe-Laptop>
+       <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <1289940156.28741.207.camel@Joe-Laptop>
+       <20101116124609.382e42fb.rdunlap@xenotime.net>
+       <20101116232258.GC24623@opensource.wolfsonmicro.com>
+       <20101116152835.b0ab571c.rdunlap@xenotime.net>
+       <1289951875.28741.261.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       linux-kernel@vger.kernel.org, Florian Mickler <florian@mickler.org>,
+       Andrew Morton <akpm@linux-foundation.org>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 01:56:19 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIWJv-0002k1-9C
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 01:56:19 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 9953B1038A4; Wed, 17 Nov 2010 01:56:17 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id C25DC24439;
+       Wed, 17 Nov 2010 01:56:09 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 316CC24439; Wed, 17 Nov 2010 01:56:08 +0100 (CET)
+Received: from xenotime.net (xenotime.net [72.52.115.56])
+       by alsa0.perex.cz (Postfix) with SMTP id 043F124436
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 01:56:06 +0100 (CET)
+Received: from chimera.site ([173.50.240.230]) by xenotime.net for
+       <alsa-devel@alsa-project.org>; Tue, 16 Nov 2010 16:55:57 -0800
+In-Reply-To: <1289951875.28741.261.camel@Joe-Laptop>
+X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1063536>
+
+On Tue, 16 Nov 2010 15:57:55 -0800 Joe Perches wrote:
+
+> On Tue, 2010-11-16 at 15:28 -0800, Randy Dunlap wrote:
+> > On Tue, 16 Nov 2010 23:22:58 +0000 Mark Brown wrote:
+> > > On Tue, Nov 16, 2010 at 12:46:09PM -0800, Randy Dunlap wrote:
+> > > > On Tue, 16 Nov 2010 12:42:36 -0800 Joe Perches wrote:
+> > > > > Some subsystem maintainers like upper case, some mixed, some lower.
+> > > > > Some aren't consistent.  (Staging/staging)
+> > > > Case usually doesn't matter to most of us.
+> > > Given that we're working in case sensitive languages here it's probably
+> > > safe to assume that a reasonable proportion of people will care; being
+> > > reasonably consistent with existing practice for the subsystem seems
+> > > sensible.
+> > Greg takes patches that say STAGING or Staging or staging.
+> 
+> Greg seems to rewrite patch subjects and is inconsistent
+> about case, so he might be doing that by hand.
+> 
+> > DaveM takes patches that say net: or netdev: or network: or NET:
+> 
+> DaveM doesn't appear to be choosy about patch subject lines.
+> He seems to take any sensible patch and as far as I know he
+> doesn't edit the subject lines.  He does reject inferior
+> patches outright.
+> 
+> > The sound maintainers take patches that say sound: or alsa: or ALSA:
+> 
+> The sound maintainers seem to rewrite patch subjects on an
+> ad-hoc basis.
+
+OK, I can accept your summary.
+However, I can't tell that we are making any progress.
+
+---
+~Randy
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+
diff --git a/test/corpora/lkml/cur/1382298793.003971:2, b/test/corpora/lkml/cur/1382298793.003971:2,
new file mode 100644 (file)
index 0000000..4b510ad
--- /dev/null
@@ -0,0 +1,106 @@
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem
+ maintainer preference tool
+Date: Wed, 17 Nov 2010 17:07:47 +0000
+Lines: 29
+Message-ID: <20101117170746.GB19488@rakim.wolfsonmicro.main>
+References: <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <20101116230126.GB24623@opensource.wolfsonmicro.com>
+       <20101117014427.41d85b13@stein>
+       <alpine.LNX.2.00.1011170150060.7420@pobox.suse.cz>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
+       Florian Mickler <florian@mickler.org>, Randy Dunlap <rdunlap@xenotime.net>,
+       Stefan Richter <stefanr@s5r6.in-berlin.de>, Joe Perches <joe@perches.com>,
+       Andrew Morton <akpm@linux-foundation.org>
+To: Jiri Kosina <jkosina@suse.cz>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 18:07:59 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PIlUD-000436-I4
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 18:07:57 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id B1000245CE; Wed, 17 Nov 2010 18:07:54 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id C35471037EC;
+       Wed, 17 Nov 2010 18:07:52 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 4EE8F1037EC; Wed, 17 Nov 2010 18:07:51 +0100 (CET)
+Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com
+       [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id A8A16245CE
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 18:07:50 +0100 (CET)
+Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com
+       [87.246.78.27])
+       by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 9E3591147AC; 
+       Wed, 17 Nov 2010 17:07:48 +0000 (GMT)
+Received: from broonie by rakim.wolfsonmicro.main with local (Exim 4.72)
+       (envelope-from <broonie@rakim.wolfsonmicro.main>)
+       id 1PIlU3-00061C-Bl; Wed, 17 Nov 2010 17:07:47 +0000
+Content-Disposition: inline
+In-Reply-To: <alpine.LNX.2.00.1011170150060.7420@pobox.suse.cz>
+X-Cookie: Killing turkeys causes winter.
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1064007>
+
+On Wed, Nov 17, 2010 at 01:53:35AM +0100, Jiri Kosina wrote:
+> On Wed, 17 Nov 2010, Stefan Richter wrote:
+
+> > Why should we codify our conventions in MAINTAINERS to accommodate the
+> > specific problem of virtually a _single_ patch author?
+
+It seems to be the way we're heading in general - look at all the recent
+work on MAINTAINERS and get_maintainer.pl.  There seems to be a genral
+push to make all this stuff automatable.
+
+> Either the maintainer wants the patch. Then he is certainly able to apply 
+> it no matter the subject line (I personally am getting a lot of patches 
+> which don't follow the format I am using in my tree ... converting 
+> Subject: lines is so trivial that I have never felt like bothering anyone 
+> about it ... it's basically single condition in a shellscript). Or the 
+
+It's slightly more than that if you're dealing with more than one area,
+and I also find this sort of stuff is a good flag for scrubbing the
+patch in greater detail - when patches stand out from a 1000ft visual
+overview there's a fair chance that there's other issues so if people
+regularly submit good patches that have only cosmetic issues I find it's
+worth guiding them away from that.
+
+> maintainer doesn't feel like the patch is worth it, and then the 
+> subject-line format really doesn't matter.
+
+In this case if I don't apply it it's likely to end up going in via your
+tree and then I'll still have to deal with the merge conflicts which are
+more annoying.
+
+
diff --git a/test/corpora/lkml/cur/1382298793.004059:2, b/test/corpora/lkml/cur/1382298793.004059:2,
new file mode 100644 (file)
index 0000000..646ac83
--- /dev/null
@@ -0,0 +1,88 @@
+From: Pavel Machek <pavel@ucw.cz>
+Subject: Re: [PATCH 44/44] sound/soc/codecs: Remove unnecessary
+       semicolons
+Date: Wed, 17 Nov 2010 20:32:56 +0100
+Lines: 19
+Message-ID: <20101117193256.GA28010@ucw.cz>
+References: <cover.1289789604.git.joe@perches.com>
+       <97fd199b7dac50613f6843156687223928cce44a.1289789605.git.joe@perches.com>
+       <20101115134939.GC12986@rakim.wolfsonmicro.main>
+       <1289840957.16461.138.camel@Joe-Laptop>
+       <20101115173031.GI12986@rakim.wolfsonmicro.main>
+       <1289842444.16461.140.camel@Joe-Laptop>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
+       alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org,
+       Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Ian Lartey <ian@opensource.wolfsonmicro.com>,
+       Liam Girdwood <lrg@slimlogic.co.uk>
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Wed Nov 17 20:33:19 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PInkr-0005bs-LY
+       for glad-alsa-devel-2@m.gmane.org; Wed, 17 Nov 2010 20:33:17 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id D7C501038BF; Wed, 17 Nov 2010 20:33:14 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled
+       version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 193061038BD;
+       Wed, 17 Nov 2010 20:33:08 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 664E91038BD; Wed, 17 Nov 2010 20:33:06 +0100 (CET)
+Received: from atrey.karlin.mff.cuni.cz (ksp.mff.cuni.cz [195.113.26.206])
+       by alsa0.perex.cz (Postfix) with ESMTP id 9E5621038BA
+       for <alsa-devel@alsa-project.org>; Wed, 17 Nov 2010 20:33:05 +0100 (CET)
+Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512)
+       id AC6A1F23E1; Wed, 17 Nov 2010 20:33:04 +0100 (CET)
+Content-Disposition: inline
+In-Reply-To: <1289842444.16461.140.camel@Joe-Laptop>
+User-Agent: Mutt/1.5.20 (2009-06-14)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1064096>
+
+On Mon 2010-11-15 09:34:04, Joe Perches wrote:
+> On Mon, 2010-11-15 at 17:30 +0000, Mark Brown wrote:
+> > On Mon, Nov 15, 2010 at 09:09:17AM -0800, Joe Perches wrote:
+> > > Signed-off-by: Joe Perches <joe@perches.com>
+> > Applied, thanks.
+> > Please try to use changelog formats consistent with the code you're
+> > modifying.
+> 
+> I think it's more important to use consistent changelogs
+> for a patch series.
+
+And I agree here. Having to learn code-style quirks for patches is
+bad, having to learn new changelog style for each subsystem is very
+bad.
+                                                               Pavel
+
+-- 
+(english) http://www.livejournal.com/~pavelmachek
+(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
+
+
diff --git a/test/corpora/lkml/cur/1382298793.004091:2, b/test/corpora/lkml/cur/1382298793.004091:2,
new file mode 100644 (file)
index 0000000..1abc297
--- /dev/null
@@ -0,0 +1,133 @@
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Wed, 17 Nov 2010 22:07:37 +0100
+Lines: 74
+Message-ID: <20101117220737.2d3d7356@stein>
+References: <20101116104921.GL12986@rakim.wolfsonmicro.main>
+       <1289919077.28741.50.camel@Joe-Laptop>
+       <20101116183707.179964dd@schatten.dmk.lab>
+       <20101116181226.GB26239@rakim.wolfsonmicro.main>
+       <20101116203522.65240b18@schatten.dmk.lab>
+       <20101116195530.GA7523@rakim.wolfsonmicro.main>
+       <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+       <20101116230126.GB24623@opensource.wolfsonmicro.com>
+       <20101117014427.41d85b13@stein>
+       <alpine.LNX.2.00.1011170150060.7420@pobox.suse.cz>
+       <20101117170746.GB19488@rakim.wolfsonmicro.main>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Cc: Jiri Kosina <jkosina@suse.cz>, Randy Dunlap <rdunlap@xenotime.net>,
+       Florian Mickler <florian@mickler.org>,
+       Joe Perches <joe@perches.com>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Mark Brown <broonie@opensource.wolfsonmicro.com>
+X-From: linux-kernel-owner@vger.kernel.org Wed Nov 17 22:08:15 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIpEk-0006ge-Hz
+       for glk-linux-kernel-3@lo.gmane.org; Wed, 17 Nov 2010 22:08:14 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1758632Ab0KQVHz (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 17 Nov 2010 16:07:55 -0500
+Received: from einhorn.in-berlin.de ([192.109.42.8]:48630 "EHLO
+       einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751563Ab0KQVHy (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 17 Nov 2010 16:07:54 -0500
+X-Envelope-From: stefanr@s5r6.in-berlin.de
+Received: from stein ([83.221.231.7])
+       (authenticated bits=0)
+       by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id oAHL7dhi014114
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
+       Wed, 17 Nov 2010 22:07:39 +0100
+In-Reply-To: <20101117170746.GB19488@rakim.wolfsonmicro.main>
+X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu)
+X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1064128>
+
+On Nov 17 Mark Brown wrote:
+> On Wed, Nov 17, 2010 at 01:53:35AM +0100, Jiri Kosina wrote:
+> > On Wed, 17 Nov 2010, Stefan Richter wrote:
+> 
+> > > Why should we codify our conventions in MAINTAINERS to accommodate the
+> > > specific problem of virtually a _single_ patch author?
+> 
+> It seems to be the way we're heading in general - look at all the recent
+> work on MAINTAINERS and get_maintainer.pl.  There seems to be a genral
+> push to make all this stuff automatable.
+
+get_maintainer.pl, used with judgment and together with "gitk
+the/patched/source.c" is nice not only for people like Joe who
+regularly work tree-wide but also for ones like me who only rarely want
+to submit a bug report or patch for a subsystem with they are
+unfamiliar with.
+
+But the thought of a database of "how to start a good patch title" is
+far-fetched.  Really, as a patch author, just look how other people
+write patch titles and judge whether this is good for your work too or
+not.
+
+> > Either the maintainer wants the patch. Then he is certainly able to apply 
+> > it no matter the subject line (I personally am getting a lot of patches 
+> > which don't follow the format I am using in my tree ... converting 
+> > Subject: lines is so trivial that I have never felt like bothering anyone 
+> > about it ... it's basically single condition in a shellscript). Or the 
+> 
+> It's slightly more than that if you're dealing with more than one area,
+> and I also find this sort of stuff is a good flag for scrubbing the
+> patch in greater detail - when patches stand out from a 1000ft visual
+> overview there's a fair chance that there's other issues so if people
+> regularly submit good patches that have only cosmetic issues I find it's
+> worth guiding them away from that.
+
+On one hand Jiri is right that maintainers can adjust title prefixes ad
+hoc.  (Downside:  Weaker connection to mailinglist archives.)  On the
+other hand, in the case of long-term prolific authors like Joe it is
+more optimal if there is a good patch title right from the outset.
+
+So, if this boring thread does at least yield the conclusion that
+${path}/${filename}: is a bad title prefix, at least something was
+won. :-)
+
+Another thought:  Whether a typical part of a mass conversion, e.g. to
+use a new helper macro without change of functionality, is named
+
+       [PATCH] [subsystem] driver: use foo_bar helper
+or
+       [PATCH] use foo_bar helper in subsystem, driver
+
+does not really matter, does it?  This change is more about the helper
+than about the driver.  It is really a different kind of changeset than
+a functional change that we want to be called
+
+       [PATCH] [subsystem] driver: fix crash at disconnection
+
+or so.  This is something that those who look for release notes of
+that driver or subsystem want to grep in the changelog.
+
+Or in other words:  If you as patch author wonder what would be a good
+title for your patch, then ask yourself:  How should this change show up
+in kernel release notes that are constructed from the git shortlog?
+Sometimes the answer to this question includes among else a prefix with
+a canonical subsystem name (even case sensitive, with brackets or
+colon), whereas other times such formalities are utterly pointless.
+
+[Sorry for the spent electrons.  But OTOH, issues like (1.) optimum
+use of reviewer bandwidth, (2.) kernel changelog alias release
+notes /do/ matter.]
+-- 
+Stefan Richter
+-=====-==-=- =-== =---=
+http://arcgraph.de/sr/
+
+
diff --git a/test/corpora/lkml/cur/1382298793.004190:2, b/test/corpora/lkml/cur/1382298793.004190:2,
new file mode 100644 (file)
index 0000000..10a54af
--- /dev/null
@@ -0,0 +1,67 @@
+From: Joe Perches <joe@perches.com>
+Subject: Re: rfc: rewrite commit subject line for subsystem maintainer
+ preference tool
+Date: Wed, 17 Nov 2010 15:49:19 -0800
+Lines: 11
+Message-ID: <1290037759.28741.313.camel@Joe-Laptop>
+References: <20101116104921.GL12986@rakim.wolfsonmicro.main>
+        <1289919077.28741.50.camel@Joe-Laptop>
+        <20101116183707.179964dd@schatten.dmk.lab>
+        <20101116181226.GB26239@rakim.wolfsonmicro.main>
+        <20101116203522.65240b18@schatten.dmk.lab>
+        <20101116195530.GA7523@rakim.wolfsonmicro.main>
+        <20101116122102.86e7e0b9.rdunlap@xenotime.net>
+        <20101116230126.GB24623@opensource.wolfsonmicro.com>
+        <20101117014427.41d85b13@stein>
+        <alpine.LNX.2.00.1011170150060.7420@pobox.suse.cz>
+        <20101117170746.GB19488@rakim.wolfsonmicro.main>
+        <20101117220737.2d3d7356@stein>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 7bit
+Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
+       Jiri Kosina <jkosina@suse.cz>,
+       Randy Dunlap <rdunlap@xenotime.net>,
+       Florian Mickler <florian@mickler.org>,
+       Andrew Morton <akpm@linux-foundation.org>,
+       alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
+To: Stefan Richter <stefanr@s5r6.in-berlin.de>
+X-From: linux-kernel-owner@vger.kernel.org Thu Nov 18 00:49:42 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PIrkz-0000bE-Ro
+       for glk-linux-kernel-3@lo.gmane.org; Thu, 18 Nov 2010 00:49:42 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752426Ab0KQXtX (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Wed, 17 Nov 2010 18:49:23 -0500
+Received: from mail.perches.com ([173.55.12.10]:1507 "EHLO mail.perches.com"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1750850Ab0KQXtW (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Wed, 17 Nov 2010 18:49:22 -0500
+Received: from [192.168.1.162] (unknown [192.168.1.162])
+       by mail.perches.com (Postfix) with ESMTP id 7D75724368;
+       Wed, 17 Nov 2010 15:49:17 -0800 (PST)
+In-Reply-To: <20101117220737.2d3d7356@stein>
+X-Mailer: Evolution 2.30.3 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1064228>
+
+On Wed, 2010-11-17 at 22:07 +0100, Stefan Richter wrote:
+> So, if this boring thread does at least yield the conclusion that
+> ${path}/${filename}: is a bad title prefix, at least something was
+> won. :-)
+
+I've changed my scripts to use this style:
+
+Subject: [PATCH] $(basename $(dirname $file)): commit desc... 
+
+until a better tool is available.
+
+
+
diff --git a/test/corpora/lkml/cur/1382298795.000299:2, b/test/corpora/lkml/cur/1382298795.000299:2,
new file mode 100644 (file)
index 0000000..ea8522f
--- /dev/null
@@ -0,0 +1,79 @@
+From: Artem Bityutskiy <dedekind1@gmail.com>
+Subject: Re: [PATCH 37/44] fs/ubifs: Remove unnecessary semicolons
+Date: Fri, 19 Nov 2010 15:21:08 +0200
+Lines: 13
+Message-ID: <1290172868.4768.2.camel@localhost>
+References: <cover.1289789604.git.joe@perches.com>
+        <902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>
+Reply-To: dedekind1@gmail.com
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Adrian Hunter <adrian.hunter@nokia.com>,
+       linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: linux-kernel-owner@vger.kernel.org Fri Nov 19 14:22:08 2010
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PJQuj-00008T-0Z
+       for glk-linux-kernel-3@lo.gmane.org; Fri, 19 Nov 2010 14:22:05 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754099Ab0KSNVg convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Fri, 19 Nov 2010 08:21:36 -0500
+Received: from mail-bw0-f46.google.com ([209.85.214.46]:60443 "EHLO
+       mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753270Ab0KSNVf (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Fri, 19 Nov 2010 08:21:35 -0500
+Received: by bwz15 with SMTP id 15so3864554bwz.19
+        for <linux-kernel@vger.kernel.org>; Fri, 19 Nov 2010 05:21:33 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:received:received:subject:from:reply-to:to:cc
+         :in-reply-to:references:content-type:date:message-id:mime-version
+         :x-mailer:content-transfer-encoding;
+        bh=I+JFeMB9svh3ZIIGdVlHav4mOQmOa+QTh4VZGVL0a/0=;
+        b=hLukn/U4YkodFZ8CEkuJJmYvpTDXhavKiL1YZ12QApXyCb9xBeYORheXEIQUygjUpL
+         Fy9zyFIWzw3YAiLEa4WUJnC4L+VWq4Nhtua9a1XBQBCK8HZuDITUcmtYcobib1kBg4KE
+         0nBOF7IL6d17HN8QGC+Nn+YTu7JxHSq4cHy8Y=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=subject:from:reply-to:to:cc:in-reply-to:references:content-type
+         :date:message-id:mime-version:x-mailer:content-transfer-encoding;
+        b=WiSerhUAnUL/tGRi8PqwwkXymz8N1Uf58rludUDWzSk+L3KSJqGtAvdv8xYqW8x4PQ
+         Vla/qoLPjcqQQmaLgLKtDvGIL9BFQ86dXrgokJhcrT1qSs2xN3VKGdhm49MOd/HrYZ/F
+         v4wespzjVohrMt2tOP38nOKZpPeu4t1wUJYOQ=
+Received: by 10.204.79.142 with SMTP id p14mr1988895bkk.175.1290172893650;
+        Fri, 19 Nov 2010 05:21:33 -0800 (PST)
+Received: from ?IPv6:::1? (shutemov.name [188.40.19.243])
+        by mx.google.com with ESMTPS id v25sm850549bkt.6.2010.11.19.05.21.30
+        (version=SSLv3 cipher=RC4-MD5);
+        Fri, 19 Nov 2010 05:21:31 -0800 (PST)
+In-Reply-To: <902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>
+X-Mailer: Evolution 2.32.0 (2.32.0-2.fc14) 
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1065301>
+
+On Sun, 2010-11-14 at 19:04 -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  fs/ubifs/scan.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+
+Thanks, I'll pick this up.
+
+--=20
+Best Regards,
+Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E=
+=D1=86=D0=BA=D0=B8=D0=B9)
+
+
+
diff --git a/test/corpora/lkml/cur/1382298795.001362:2, b/test/corpora/lkml/cur/1382298795.001362:2,
new file mode 100644 (file)
index 0000000..a723d58
--- /dev/null
@@ -0,0 +1,96 @@
+From: Takashi Iwai <tiwai@suse.de>
+Subject: Re: [PATCH 43/44] sound/core/pcm_lib.c: Remove
+       unnecessary semicolons
+Date: Mon, 22 Nov 2010 07:44:21 +0100
+Lines: 31
+Message-ID: <s5h4ob9svqy.wl%tiwai@suse.de>
+References: <cover.1289789604.git.joe@perches.com>
+       <9fa8e193ce125ef4fd19a952792629c5ee84953f.1289789605.git.joe@perches.com>
+Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Cc: alsa-devel@alsa-project.org, Jiri Kosina <trivial@kernel.org>,
+       linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: alsa-devel-bounces@alsa-project.org Mon Nov 22 07:44:31 2010
+Return-path: <alsa-devel-bounces@alsa-project.org>
+Envelope-to: glad-alsa-devel-2@m.gmane.org
+Received: from alsa0.perex.cz ([212.20.107.51])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <alsa-devel-bounces@alsa-project.org>)
+       id 1PKQ8Y-0002qf-F0
+       for glad-alsa-devel-2@m.gmane.org; Mon, 22 Nov 2010 07:44:26 +0100
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 26BFF103863; Mon, 22 Nov 2010 07:44:26 +0100 (CET)
+X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz
+X-Spam-Level: 
+X-Spam-Status: No, score=-8.0 required=5.0 tests=RCVD_IN_DNSWL_HI
+       autolearn=disabled version=3.2.4
+Received: from alsa0.perex.cz (localhost [127.0.0.1])
+       by alsa0.perex.cz (Postfix) with ESMTP id 1E4EF103848;
+       Mon, 22 Nov 2010 07:44:24 +0100 (CET)
+X-Original-To: alsa-devel@alsa-project.org
+Delivered-To: alsa-devel@alsa-project.org
+Received: by alsa0.perex.cz (Postfix, from userid 1000)
+       id 0861E103851; Mon, 22 Nov 2010 07:44:22 +0100 (CET)
+Received: from mx1.suse.de (cantor.suse.de [195.135.220.2])
+       by alsa0.perex.cz (Postfix) with ESMTP id 7007710383C
+       for <alsa-devel@alsa-project.org>; Mon, 22 Nov 2010 07:44:21 +0100 (CET)
+Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by mx1.suse.de (Postfix) with ESMTP id 53C1B947B6;
+       Mon, 22 Nov 2010 07:44:21 +0100 (CET)
+In-Reply-To: <9fa8e193ce125ef4fd19a952792629c5ee84953f.1289789605.git.joe@perches.com>
+User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka)
+       FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1
+       (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO)
+X-BeenThere: alsa-devel@alsa-project.org
+X-Mailman-Version: 2.1.9
+Precedence: list
+List-Id: "Alsa-devel mailing list for ALSA developers -
+       http://www.alsa-project.org" <alsa-devel.alsa-project.org>
+List-Unsubscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe>
+List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel>
+List-Post: <mailto:alsa-devel@alsa-project.org>
+List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help>
+List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, 
+       <mailto:alsa-devel-request@alsa-project.org?subject=subscribe>
+Sender: alsa-devel-bounces@alsa-project.org
+Errors-To: alsa-devel-bounces@alsa-project.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1066369>
+
+At Sun, 14 Nov 2010 19:05:02 -0800,
+Joe Perches wrote:
+> 
+> Signed-off-by: Joe Perches <joe@perches.com>
+
+Applied now.  Thanks.
+
+
+Takashi
+
+
+> ---
+>  sound/core/pcm_lib.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+> diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
+> index a1707cc..b75db8e 100644
+> --- a/sound/core/pcm_lib.c
+> +++ b/sound/core/pcm_lib.c
+> @@ -223,7 +223,7 @@ static void xrun_log(struct snd_pcm_substream *substream,
+>      entry->jiffies = jiffies;
+>      entry->pos = pos;
+>      entry->period_size = runtime->period_size;
+> -    entry->buffer_size = runtime->buffer_size;;
+> +    entry->buffer_size = runtime->buffer_size;
+>      entry->old_hw_ptr = runtime->status->hw_ptr;
+>      entry->hw_ptr_base = runtime->hw_ptr_base;
+>      log->idx = (log->idx + 1) % XRUN_LOG_CNT;
+> -- 
+> 1.7.3.1.g432b3.dirty
+> 
+
+
diff --git a/test/corpora/lkml/cur/1382298795.002635:2, b/test/corpora/lkml/cur/1382298795.002635:2,
new file mode 100644 (file)
index 0000000..3c04b86
--- /dev/null
@@ -0,0 +1,54 @@
+From: Matthew Garrett <mjg59@srcf.ucam.org>
+Subject: Re: [PATCH 19/44] drivers/platform/x86: Remove unnecessary
+       semicolons
+Date: Wed, 24 Nov 2010 16:52:46 +0000
+Lines: 4
+Message-ID: <20101124165246.GH2150@srcf.ucam.org>
+References: <cover.1289789604.git.joe@perches.com> <eda82bcfaad265fc5cd3901bc4f41bfcfac2403b.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Jiri Kosina <trivial@kernel.org>,
+       Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
+       Daniel Oliveira Nascimento <don@syst.com.br>,
+       Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
+       platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
+       ibm-acpi-devel@lists.sourceforge.net
+To: Joe Perches <joe@perches.com>
+X-From: platform-driver-x86-owner@vger.kernel.org Wed Nov 24 17:53:05 2010
+Return-path: <platform-driver-x86-owner@vger.kernel.org>
+Envelope-to: gldpxd-platform-driver-x86@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <platform-driver-x86-owner@vger.kernel.org>)
+       id 1PLIae-0001zN-Vf
+       for gldpxd-platform-driver-x86@lo.gmane.org; Wed, 24 Nov 2010 17:53:05 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754012Ab0KXQxE (ORCPT
+       <rfc822;gldpxd-platform-driver-x86@m.gmane.org>);
+       Wed, 24 Nov 2010 11:53:04 -0500
+Received: from cavan.codon.org.uk ([93.93.128.6]:37338 "EHLO
+       cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753985Ab0KXQxD (ORCPT
+       <rfc822;platform-driver-x86@vger.kernel.org>);
+       Wed, 24 Nov 2010 11:53:03 -0500
+Received: from mjg59 by cavan.codon.org.uk with local (Exim 4.69)
+       (envelope-from <mjg59@cavan.codon.org.uk>)
+       id 1PLIaM-0000fC-HX; Wed, 24 Nov 2010 16:52:46 +0000
+Content-Disposition: inline
+In-Reply-To: <eda82bcfaad265fc5cd3901bc4f41bfcfac2403b.1289789604.git.joe@perches.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-SA-Exim-Connect-IP: <locally generated>
+X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk
+X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
+Sender: platform-driver-x86-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <platform-driver-x86.vger.kernel.org>
+X-Mailing-List: platform-driver-x86@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1067655>
+
+Applied, thanks.
+
+-- 
+Matthew Garrett | mjg59@srcf.ucam.org
+
+
diff --git a/test/corpora/lkml/cur/1382298796.001941:2, b/test/corpora/lkml/cur/1382298796.001941:2,
new file mode 100644 (file)
index 0000000..c65a72f
--- /dev/null
@@ -0,0 +1,73 @@
+From: Chris Ball <cjb@laptop.org>
+Subject: Re: [PATCH 11/44] drivers/mmc: Remove unnecessary semicolons
+Date: Sun, 5 Dec 2010 03:32:32 +0000
+Lines: 33
+Message-ID: <20101205033232.GD24000@void.printf.net>
+References: <cover.1289789604.git.joe@perches.com> <6391af02ba7ec4a76c5c5f462d8013fc1f52f999.1289789604.git.joe@perches.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: Jiri Kosina <trivial@kernel.org>, linux-mmc@vger.kernel.org,
+       linux-kernel@vger.kernel.org
+To: Joe Perches <joe@perches.com>
+X-From: linux-mmc-owner@vger.kernel.org Sun Dec 05 04:32:38 2010
+Return-path: <linux-mmc-owner@vger.kernel.org>
+Envelope-to: glkm-linux-mmc@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-mmc-owner@vger.kernel.org>)
+       id 1PP5L3-0005AB-4b
+       for glkm-linux-mmc@lo.gmane.org; Sun, 05 Dec 2010 04:32:37 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752522Ab0LEDcg (ORCPT <rfc822;glkm-linux-mmc@m.gmane.org>);
+       Sat, 4 Dec 2010 22:32:36 -0500
+Received: from void.printf.net ([89.145.121.20]:42897 "EHLO void.printf.net"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752473Ab0LEDcf (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
+       Sat, 4 Dec 2010 22:32:35 -0500
+Received: from chris by void.printf.net with local (Exim 4.69)
+       (envelope-from <chris@void.printf.net>)
+       id 1PP5Ky-0006Ly-KC; Sun, 05 Dec 2010 03:32:32 +0000
+Content-Disposition: inline
+In-Reply-To: <6391af02ba7ec4a76c5c5f462d8013fc1f52f999.1289789604.git.joe@perches.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+Sender: linux-mmc-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-mmc.vger.kernel.org>
+X-Mailing-List: linux-mmc@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1071959>
+
+Hi Joe,
+
+On Sun, Nov 14, 2010 at 07:04:30PM -0800, Joe Perches wrote:
+> Signed-off-by: Joe Perches <joe@perches.com>
+> ---
+>  drivers/mmc/host/davinci_mmc.c |    2 +-
+>  1 files changed, 1 insertions(+), 1 deletions(-)
+> 
+> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
+> index e15547c..b643dde 100644
+> --- a/drivers/mmc/host/davinci_mmc.c
+> +++ b/drivers/mmc/host/davinci_mmc.c
+> @@ -480,7 +480,7 @@ static void mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
+>      struct scatterlist      *sg;
+>      unsigned                sg_len;
+>      unsigned                bytes_left = host->bytes_left;
+> -    const unsigned          shift = ffs(rw_threshold) - 1;;
+> +    const unsigned          shift = ffs(rw_threshold) - 1;
+>  
+>      if (host->data_dir == DAVINCI_MMC_DATADIR_WRITE) {
+>              template = &host->tx_template;
+> -- 
+
+Pushed to mmc-next for .38, thanks.
+
+-- 
+Chris Ball   <cjb@laptop.org>   <http://printf.net/>
+One Laptop Per Child
+--
+To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004526:2, b/test/corpora/lkml/cur/1382298805.004526:2,
new file mode 100644 (file)
index 0000000..05dbb9d
--- /dev/null
@@ -0,0 +1,89 @@
+From: Colin Cross <ccross@android.com>
+Subject: [PATCH] ARM: vfp: Always save VFP state in vfp_pm_suspend
+Date: Sun, 13 Feb 2011 15:13:33 -0800
+Lines: 45
+Message-ID: <1297638813-1315-1-git-send-email-ccross@android.com>
+Cc: Colin Cross <ccross@android.com>,
+       Catalin Marinas <catalin.marinas@arm.com>,
+       Russell King <linux@arm.linux.org.uk>,
+       linux-kernel@vger.kernel.org
+To: linux-arm-kernel@lists.infradead.org
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 00:14:16 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1Pol8x-0007RZ-Hw
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 00:14:15 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1755242Ab1BMXOA (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Sun, 13 Feb 2011 18:14:00 -0500
+Received: from smtp-out.google.com ([74.125.121.67]:10204 "EHLO
+       smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753669Ab1BMXN5 (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Sun, 13 Feb 2011 18:13:57 -0500
+Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1])
+       by smtp-out.google.com with ESMTP id p1DNDjFc030645;
+       Sun, 13 Feb 2011 15:13:45 -0800
+Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.102.62])
+       by hpaq1.eem.corp.google.com with ESMTP id p1DNDdKg016468;
+       Sun, 13 Feb 2011 15:13:39 -0800
+Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897)
+       id 1F65025772D; Sun, 13 Feb 2011 15:13:39 -0800 (PST)
+X-Mailer: git-send-email 1.7.3.1
+X-System-Of-Record: true
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099558>
+
+vfp_pm_suspend should save the VFP state any time there is
+a last_VFP_context.  If it only saves when the VFP is enabled,
+the state can get lost when, on a UP system:
+   Thread 1 uses the VFP
+   Context switch occurs to thread 2, VFP is disabled but the
+      VFP context is not saved to allow lazy save and restore
+   Thread 2 initiates suspend
+   vfp_pm_suspend is called with the VFP disabled, but the
+      context has not been saved.
+
+Modify vfp_pm_suspend to save the VFP context whenever
+last_VFP_context is set.
+
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Colin Cross <ccross@android.com>
+---
+ arch/arm/vfp/vfpmodule.c |   11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
+index 66bf8d1..7aea616 100644
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -415,13 +415,12 @@ static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)
+       struct thread_info *ti = current_thread_info();
+       u32 fpexc = fmrx(FPEXC);
+-      /* if vfp is on, then save state for resumption */
+-      if (fpexc & FPEXC_EN) {
++      /* save state for resume */
++      if (last_VFP_context[ti->cpu]) {
+               printk(KERN_DEBUG "%s: saving vfp state\n", __func__);
+-              vfp_save_state(&ti->vfpstate, fpexc);
+-
+-              /* disable, just in case */
+-              fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
++              fmxr(FPEXC, fpexc | FPEXC_EN);
++              vfp_save_state(last_VFP_context[ti->cpu], fpexc);
++              fmxr(FPEXC, fpexc & ~FPEXC_EN);
+       }
+       /* clear any information we had about last context state */
+-- 
+1.7.3.1
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004551:2, b/test/corpora/lkml/cur/1382298805.004551:2,
new file mode 100644 (file)
index 0000000..0e21b16
--- /dev/null
@@ -0,0 +1,90 @@
+From: Justin Mattock <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+Subject: bluetooth disabled with current 2.6.38-rc4
+Date: Sun, 13 Feb 2011 17:30:04 -0800
+Lines: 30
+Message-ID: <1A8743E5-65EA-4625-82FD-658C9722629F@gmail.com>
+Mime-Version: 1.0 (Apple Message framework v936)
+Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
+Content-Transfer-Encoding: 7bit
+Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mailing List" 
+       <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+To: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+X-From: linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Feb 14 02:30:20 2011
+Return-path: <linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+Envelope-to: glbk-linux-bluetooth-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
+       id 1PonGb-0000BP-Ns
+       for glbk-linux-bluetooth-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 14 Feb 2011 02:30:18 +0100
+Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
+       id S1755415Ab1BNBaO (ORCPT
+       <rfc822;glbk-linux-bluetooth@m.gmane.org>);
+       Sun, 13 Feb 2011 20:30:14 -0500
+Received: from mail-iw0-f174.google.com ([209.85.214.174]:33676 "EHLO
+       mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1755315Ab1BNBaJ (ORCPT
+       <rfc822;linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
+       Sun, 13 Feb 2011 20:30:09 -0500
+Received: by iwn9 with SMTP id 9so4315727iwn.19
+        for <multiple recipients>; Sun, 13 Feb 2011 17:30:08 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:message-id:from:to:content-type
+         :content-transfer-encoding:mime-version:subject:date:cc:x-mailer;
+        bh=Hm2xpT9F5uspvKowKW51PBMJXHVySz8oO68WD+15vw4=;
+        b=CYWbVChg8u/vPwCQijLtu4qwy88RnlkiXipfYaorEsKoqnL/riJzvgVjtYz3uoSWE5
+         m9IsBgZBGd2zuZMuDEfGiLQo1h5ReLbCsQ2FSLRM8dW15g3xENkK0Zd86EHNATbnU4CQ
+         YMF3gYQHr5BffWBu8xllNHnUKHzMGZz827BEk=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=message-id:from:to:content-type:content-transfer-encoding
+         :mime-version:subject:date:cc:x-mailer;
+        b=DU4h/EWn8O7B48JT0DuiMTjHma3v+7cSup8eYqLmOgYopjvr42kO9BACgxHMR/mpI/
+         sa4AtFAuWg3TkZkPOjJg2SiPiUGQcj7kqjycvHWvWiQHEE6tLEH7g6aGF7ojSTrsiJxN
+         zpjZBS0EvbDtIrQf8YAV9eFQJSkQ5yYXmK00c=
+Received: by 10.42.228.201 with SMTP id jf9mr3782213icb.471.1297647007933;
+        Sun, 13 Feb 2011 17:30:07 -0800 (PST)
+Received: from [10.0.0.13] ([76.89.133.205])
+        by mx.google.com with ESMTPS id y8sm1925328ica.2.2011.02.13.17.30.06
+        (version=TLSv1/SSLv3 cipher=OTHER);
+        Sun, 13 Feb 2011 17:30:07 -0800 (PST)
+X-Mailer: Apple Mail (2.936)
+Sender: linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Precedence: bulk
+List-ID: <linux-bluetooth.vger.kernel.org>
+X-Mailing-List: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099583>
+
+maybe I missed something, but my bluetooth is just not functioning with
+2.6.38-rc4(works with 2.6.37-rc4)
+
+I've done a bisect on this, but was pointed to:
+c0e45c1ca3162acb2e77b3d9e152ce6e7b6fa3f5
+but doesn't look correct to me
+
+here is what I am seeing with the bluetooth-applet etc..:
+
+working correctly:
+http://www.flickr.com/photos/44066293@N08/5443727238/
+
+not working:
+http://www.flickr.com/photos/44066293@N08/5443124859/
+
+my /var/log/daemon.log shows:
+
+Feb 13 17:12:22 Linux-2 acpid: 1 client rule loaded
+Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 registered
+Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Listening for HCI events on  
+hci0
+Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 up
+Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Unable to find matching  
+adapter
+
+I can try at another bisect, but might take some time.. let me know if  
+there is something I can test
+or do.
+
+Justin P. Mattock
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004613:2, b/test/corpora/lkml/cur/1382298805.004613:2,
new file mode 100644 (file)
index 0000000..5a12c8b
--- /dev/null
@@ -0,0 +1,94 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 1/6] x86: move ioapic_irq_destination_types
+Date: Mon, 14 Feb 2011 11:00:07 +0100
+Lines: 55
+Message-ID: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:00:33 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovEP-0006ED-4Z
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:00:33 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752832Ab1BNKAX (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:00:23 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38305 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752268Ab1BNKAW (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:22 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id D2234950DB2;
+       Mon, 14 Feb 2011 10:59:03 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099645>
+
+This enum is used also by non-ioapic code, e.g apic_noop,
+so its better kept in apicdef.h.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/include/asm/apicdef.h |   12 ++++++++++++
+ arch/x86/include/asm/io_apic.h |   11 -----------
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
+index 47a30ff..2de3e95 100644
+--- a/arch/x86/include/asm/apicdef.h
++++ b/arch/x86/include/asm/apicdef.h
+@@ -426,4 +426,16 @@ struct local_apic {
+ #else
+  #define BAD_APICID 0xFFFFu
+ #endif
++
++enum ioapic_irq_destination_types {
++      dest_Fixed = 0,
++      dest_LowestPrio = 1,
++      dest_SMI = 2,
++      dest__reserved_1 = 3,
++      dest_NMI = 4,
++      dest_INIT = 5,
++      dest__reserved_2 = 6,
++      dest_ExtINT = 7
++};
++
+ #endif /* _ASM_X86_APICDEF_H */
+diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
+index f327d38..e1a9b0e 100644
+--- a/arch/x86/include/asm/io_apic.h
++++ b/arch/x86/include/asm/io_apic.h
+@@ -63,17 +63,6 @@ union IO_APIC_reg_03 {
+       } __attribute__ ((packed)) bits;
+ };
+-enum ioapic_irq_destination_types {
+-      dest_Fixed = 0,
+-      dest_LowestPrio = 1,
+-      dest_SMI = 2,
+-      dest__reserved_1 = 3,
+-      dest_NMI = 4,
+-      dest_INIT = 5,
+-      dest__reserved_2 = 6,
+-      dest_ExtINT = 7
+-};
+-
+ struct IO_APIC_route_entry {
+       __u32   vector          :  8,
+               delivery_mode   :  3,   /* 000: FIXED
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004614:2, b/test/corpora/lkml/cur/1382298805.004614:2,
new file mode 100644 (file)
index 0000000..ce850ff
--- /dev/null
@@ -0,0 +1,89 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 2/6] x86: ifdef enable_IR_x2apic() out
+Date: Mon, 14 Feb 2011 11:00:08 +0100
+Lines: 48
+Message-ID: <1297677612-12405-2-git-send-email-henne@nachtwindheim.de>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:00:34 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovEP-0006ED-LT
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:00:34 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752908Ab1BNKA1 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:00:27 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38321 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752778Ab1BNKAX (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:23 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id 1AFC7950DB3;
+       Mon, 14 Feb 2011 10:59:06 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099646>
+
+The only caller of enable_IR_x2apic() is probe_64.c, which is only
+compiled on x86-64 bit machines.
+This function causes compilation problems on 32-bit machines with no
+io-apic enabled, so we remove it from 32s and keep the way it was on 64s.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/include/asm/apic.h |    2 ++
+ arch/x86/kernel/apic/apic.c |    2 +-
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
+index b8a3484..b1d77e1 100644
+--- a/arch/x86/include/asm/apic.h
++++ b/arch/x86/include/asm/apic.h
+@@ -216,7 +216,9 @@ static inline void x2apic_force_phys(void)
+ #define       x2apic_supported()      0
+ #endif
++#ifdef CONFIG_X86_64
+ extern void enable_IR_x2apic(void);
++#endif
+ extern int get_physical_broadcast(void);
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+index 306386f..27a7497 100644
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
+@@ -1467,6 +1467,7 @@ int __init enable_IR(void)
+       return 0;
+ }
++#ifdef CONFIG_X86_64
+ void __init enable_IR_x2apic(void)
+ {
+       unsigned long flags;
+@@ -1540,7 +1541,6 @@ out:
+               pr_info("Not enabling x2apic, Intr-remapping init failed.\n");
+ }
+-#ifdef CONFIG_X86_64
+ /*
+  * Detect and enable local APICs on non-SMP boards.
+  * Original code written by Keir Fraser.
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004615:2, b/test/corpora/lkml/cur/1382298805.004615:2,
new file mode 100644 (file)
index 0000000..cceabb5
--- /dev/null
@@ -0,0 +1,64 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 4/6] x86: add dummy mp_save_irq()
+Date: Mon, 14 Feb 2011 11:00:10 +0100
+Lines: 23
+Message-ID: <1297677612-12405-4-git-send-email-henne@nachtwindheim.de>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:00:36 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovEQ-0006ED-6t
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:00:34 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752958Ab1BNKA3 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:00:29 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38321 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752592Ab1BNKAY (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:24 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id 4B47D950DB5;
+       Mon, 14 Feb 2011 10:59:08 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099647>
+
+mmparse.c needs a mp_save_irq() function, which is only available
+when CONFIG_X86_IO_APIC is defined. So here we give it a dummy one.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/include/asm/io_apic.h |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
+index e1a9b0e..7af0f5f 100644
+--- a/arch/x86/include/asm/io_apic.h
++++ b/arch/x86/include/asm/io_apic.h
+@@ -188,6 +188,7 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
+ struct io_apic_irq_attr;
+ static inline int io_apic_set_pci_routing(struct device *dev, int irq,
+                struct io_apic_irq_attr *irq_attr) { return 0; }
++static inline void mp_save_irq(struct mpc_intsrc *m) { }
+ #endif
+ #endif /* _ASM_X86_IO_APIC_H */
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004617:2, b/test/corpora/lkml/cur/1382298805.004617:2,
new file mode 100644 (file)
index 0000000..71f2f1f
--- /dev/null
@@ -0,0 +1,67 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 6/6] x86: makes X86_UP_IOAPIC work again
+Date: Mon, 14 Feb 2011 11:00:12 +0100
+Lines: 26
+Message-ID: <1297677612-12405-6-git-send-email-henne@nachtwindheim.de>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:01:26 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovFD-0006cV-Si
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:01:24 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753137Ab1BNKAo (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:00:44 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38361 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752877Ab1BNKA0 (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:26 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id 26BC1950DB7;
+       Mon, 14 Feb 2011 10:59:10 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099649>
+
+This fixes a typo, which made CONFIG_X86_UP_IOAPIC defunctional,
+in commit 7cd92366a593246650cc7d6198e2c7d3af8c1d8a.
+
+This has been successfully tested.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/Kconfig |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 95c36c4..66c6801 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -811,7 +811,7 @@ config X86_LOCAL_APIC
+ config X86_IO_APIC
+       def_bool y
+-      depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
++      depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
+ config X86_VISWS_APIC
+       def_bool y
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004618:2, b/test/corpora/lkml/cur/1382298805.004618:2,
new file mode 100644 (file)
index 0000000..620bed1
--- /dev/null
@@ -0,0 +1,70 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 5/6] x86: ifdef ioapic related function out
+Date: Mon, 14 Feb 2011 11:00:11 +0100
+Lines: 29
+Message-ID: <1297677612-12405-5-git-send-email-henne@nachtwindheim.de>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:01:27 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovFE-0006cV-Cn
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:01:24 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753212Ab1BNKAq (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:00:46 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38350 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752841Ab1BNKAZ (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:25 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id 37BBE950DB6;
+       Mon, 14 Feb 2011 10:59:09 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099650>
+
+arch_disable_smp_config() is an IO-APIC related function on x86,
+and should only be needed if SMP is enabled.
+But the IO-APIC code calls it when the parameter "noapic" is given to
+the kernel, which doesn't mean SMP is enabled.
+
+Anyway this fixes compilation on x86_32 UP systems with APIC and no IO-APIC.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/kernel/apic/apic.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+index 999c531..4998f0a 100644
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
+@@ -1218,7 +1218,9 @@ void __cpuinit setup_local_APIC(void)
+               rdtscll(tsc);
+       if (disable_apic) {
++#ifdef CONFIG_X86_IO_APIC
+               arch_disable_smp_support();
++#endif
+               return;
+       }
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004619:2, b/test/corpora/lkml/cur/1382298805.004619:2,
new file mode 100644 (file)
index 0000000..f7895dd
--- /dev/null
@@ -0,0 +1,99 @@
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+Subject: [PATCH 3/6] x86: ifdef INTR_REMAP code out
+Date: Mon, 14 Feb 2011 11:00:09 +0100
+Lines: 58
+Message-ID: <1297677612-12405-3-git-send-email-henne@nachtwindheim.de>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, tj@kernel.org,
+       yinghai@kernel.org, ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org, henne@nachtwindheim.de
+To: mingo@readhat.com
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 11:01:30 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PovFF-0006cV-Te
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 11:01:26 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753126Ab1BNKBX (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 05:01:23 -0500
+Received: from server103.greatnet.de ([83.133.97.6]:38330 "EHLO
+       server103.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752268Ab1BNKAX (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 05:00:23 -0500
+Received: from localhost.localdomain (cmnz-d9bab6be.pool.mediaWays.net [217.186.182.190])
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+       (No client certificate requested)
+       by server103.greatnet.de (Postfix) with ESMTPSA id 29517950DB4;
+       Mon, 14 Feb 2011 10:59:07 +0100 (CET)
+X-Mailer: git-send-email 1.7.1
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099651>
+
+Interrupt remapping is only available on 64-bit machines,
+so it has no place in lapic_resume() for 32bit machines.
+
+Compilation on 32bit machines would produce errors here.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+---
+ arch/x86/kernel/apic/apic.c |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+index 27a7497..999c531 100644
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
+@@ -2109,12 +2109,15 @@ static int lapic_resume(struct sys_device *dev)
+       unsigned long flags;
+       int maxlvt;
+       int ret = 0;
+-      struct IO_APIC_route_entry **ioapic_entries = NULL;
+       if (!apic_pm_state.active)
+               return 0;
+       local_irq_save(flags);
++
++#ifdef CONFIG_INTR_REMAP
++      struct IO_APIC_route_entry **ioapic_entries = NULL;
++
+       if (intr_remapping_enabled) {
+               ioapic_entries = alloc_ioapic_entries();
+               if (!ioapic_entries) {
+@@ -2133,6 +2136,7 @@ static int lapic_resume(struct sys_device *dev)
+               mask_IO_APIC_setup(ioapic_entries);
+               legacy_pic->mask_all();
+       }
++#endif
+       if (x2apic_mode)
+               enable_x2apic();
+@@ -2173,6 +2177,7 @@ static int lapic_resume(struct sys_device *dev)
+       apic_write(APIC_ESR, 0);
+       apic_read(APIC_ESR);
++#ifdef CONFIG_INTR_REMAP
+       if (intr_remapping_enabled) {
+               reenable_intr_remapping(x2apic_mode);
+               legacy_pic->restore_mask();
+@@ -2180,6 +2185,7 @@ static int lapic_resume(struct sys_device *dev)
+               free_ioapic_entries(ioapic_entries);
+       }
+ restore:
++#endif
+       local_irq_restore(flags);
+       return ret;
+-- 
+1.7.2.3
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004636:2, b/test/corpora/lkml/cur/1382298805.004636:2,
new file mode 100644 (file)
index 0000000..c14d42c
--- /dev/null
@@ -0,0 +1,93 @@
+From: Vasiliy Kulikov <segoon@openwall.com>
+Subject: [PATCH] core: dev: don't call BUG() on bad input
+Date: Mon, 14 Feb 2011 13:56:06 +0300
+Lines: 36
+Message-ID: <1297680967-11893-1-git-send-email-segoon@openwall.com>
+Cc: "David S. Miller" <davem@davemloft.net>,
+       Eric Dumazet <eric.dumazet@gmail.com>,
+       Tom Herbert <therbert@google.com>,
+       Changli Gao <xiaosuo@gmail.com>,
+       Jesse Gross <jesse@nicira.com>, netdev@vger.kernel.org
+To: linux-kernel@vger.kernel.org
+X-From: netdev-owner@vger.kernel.org Mon Feb 14 11:56:26 2011
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1Pow6Q-0007p5-UJ
+       for linux-netdev-2@lo.gmane.org; Mon, 14 Feb 2011 11:56:23 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753243Ab1BNK4O (ORCPT <rfc822;linux-netdev-2@m.gmane.org>);
+       Mon, 14 Feb 2011 05:56:14 -0500
+Received: from mail-bw0-f46.google.com ([209.85.214.46]:60909 "EHLO
+       mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1752645Ab1BNK4M (ORCPT
+       <rfc822;netdev@vger.kernel.org>); Mon, 14 Feb 2011 05:56:12 -0500
+Received: by bwz15 with SMTP id 15so5332720bwz.19
+        for <multiple recipients>; Mon, 14 Feb 2011 02:56:11 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:sender:from:to:cc:subject:date:message-id
+         :x-mailer;
+        bh=YQn7OCqAZuXaSsRtgaQYckH74o43k6Rppt54AR6UzDo=;
+        b=CxfBmTAbcMf7ySl3szqU/hLEMbY7aJ+FjefneMcTm/AmBnyihy20JuV2k0yYJzcIBi
+         9+2npC4H9oJn7/ocVARq88j9ZA/4firOi9ZddgGu6c8+o0tWoZylA1ehtHzzk+4I173l
+         H8guqK5rplkryj6+PStELYYt36SpAVfaL2EdY=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=sender:from:to:cc:subject:date:message-id:x-mailer;
+        b=G0AqVbcip2oFA2IqAQa6TWwQydu/mJFzt98tGkR1fVNl3m+HaKY433gNCR+Dqdv0gA
+         SGL/R3HRiBBBku/GM4x3gQ8SoAFZiREw6PDtkU55l/mk+yS+v+8YTq7/InPxHoHeTWsv
+         pX0mWUI2HtTXKALBiM+nLsnBWtcC8yInYtyeQ=
+Received: by 10.204.61.73 with SMTP id s9mr6247440bkh.185.1297680970948;
+        Mon, 14 Feb 2011 02:56:10 -0800 (PST)
+Received: from localhost (ppp91-77-40-235.pppoe.mtu-net.ru [91.77.40.235])
+        by mx.google.com with ESMTPS id u23sm1686152bkw.9.2011.02.14.02.56.09
+        (version=TLSv1/SSLv3 cipher=OTHER);
+        Mon, 14 Feb 2011 02:56:10 -0800 (PST)
+X-Mailer: git-send-email 1.7.0.4
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099668>
+
+alloc_netdev() may be called with too long name (more that IFNAMSIZ bytes).
+Currently this leads to BUG().  Other insane inputs (bad txqs, rxqs) and
+even OOM don't lead to BUG().  Made alloc_netdev() return NULL, like on
+other errors.
+
+Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
+---
+ Compile tested.
+
+ net/core/dev.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 6392ea0..12ef4b0 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -5761,7 +5761,10 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
+       size_t alloc_size;
+       struct net_device *p;
+-      BUG_ON(strlen(name) >= sizeof(dev->name));
++      if (strnlen(name, sizeof(dev->name)) >= sizeof(dev->name)) {
++              pr_err("alloc_netdev: Too long device name \n");
++              return NULL;
++      }
+       if (txqs < 1) {
+               pr_err("alloc_netdev: Unable to allocate device "
+-- 
+1.7.0.4
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004638:2, b/test/corpora/lkml/cur/1382298805.004638:2,
new file mode 100644 (file)
index 0000000..551ce5b
--- /dev/null
@@ -0,0 +1,88 @@
+From: Ingo Molnar <mingo@elte.hu>
+Subject: Re: [PATCH 5/6] x86: ifdef ioapic related function out
+Date: Mon, 14 Feb 2011 12:00:39 +0100
+Lines: 34
+Message-ID: <20110214110039.GA7140@elte.hu>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+ <1297677612-12405-5-git-send-email-henne@nachtwindheim.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: mingo@readhat.com, tglx@linutronix.de, hpa@zytor.com,
+       x86@kernel.org, tj@kernel.org, yinghai@kernel.org,
+       ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org
+To: Henrik Kretzschmar <henne@nachtwindheim.de>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:01:04 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PowAx-0001Lu-Lk
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:01:04 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752962Ab1BNLA5 (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 06:00:57 -0500
+Received: from mx3.mail.elte.hu ([157.181.1.138]:38470 "EHLO mx3.mail.elte.hu"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752556Ab1BNLAz (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 06:00:55 -0500
+Received: from elvis.elte.hu ([157.181.1.14])
+       by mx3.mail.elte.hu with esmtp (Exim)
+       id 1PowAd-0003Lr-F7
+       from <mingo@elte.hu>; Mon, 14 Feb 2011 12:00:48 +0100
+Received: by elvis.elte.hu (Postfix, from userid 1004)
+       id 7726F3E236B; Mon, 14 Feb 2011 12:00:41 +0100 (CET)
+Content-Disposition: inline
+In-Reply-To: <1297677612-12405-5-git-send-email-henne@nachtwindheim.de>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu;
+X-ELTE-SpamScore: -2.0
+X-ELTE-SpamLevel: 
+X-ELTE-SpamCheck: no
+X-ELTE-SpamVersion: ELTE 2.0 
+X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5
+       -2.0 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
+       [score: 0.0000]
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099670>
+
+
+* Henrik Kretzschmar <henne@nachtwindheim.de> wrote:
+
+> arch_disable_smp_config() is an IO-APIC related function on x86,
+> and should only be needed if SMP is enabled.
+> But the IO-APIC code calls it when the parameter "noapic" is given to
+> the kernel, which doesn't mean SMP is enabled.
+> 
+> Anyway this fixes compilation on x86_32 UP systems with APIC and no IO-APIC.
+> 
+> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+> ---
+>  arch/x86/kernel/apic/apic.c |    2 ++
+>  1 files changed, 2 insertions(+), 0 deletions(-)
+> 
+> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+> index 999c531..4998f0a 100644
+> --- a/arch/x86/kernel/apic/apic.c
+> +++ b/arch/x86/kernel/apic/apic.c
+> @@ -1218,7 +1218,9 @@ void __cpuinit setup_local_APIC(void)
+>              rdtscll(tsc);
+>  
+>      if (disable_apic) {
+> +#ifdef CONFIG_X86_IO_APIC
+>              arch_disable_smp_support();
+> +#endif
+
+Why not make the arch_disable_smp_support() call generic in the 
+arch/x86/include/asm/smp.h file (via an inline helper) and thus
+avoid an ugly #ifdef in the .c file?
+
+Thanks,
+
+       Ingo
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004639:2, b/test/corpora/lkml/cur/1382298805.004639:2,
new file mode 100644 (file)
index 0000000..56118aa
--- /dev/null
@@ -0,0 +1,95 @@
+From: Ingo Molnar <mingo@elte.hu>
+Subject: Re: [PATCH 3/6] x86: ifdef INTR_REMAP code out
+Date: Mon, 14 Feb 2011 12:02:31 +0100
+Lines: 41
+Message-ID: <20110214110231.GB7140@elte.hu>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+ <1297677612-12405-3-git-send-email-henne@nachtwindheim.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: mingo@readhat.com, tglx@linutronix.de, hpa@zytor.com,
+       x86@kernel.org, tj@kernel.org, yinghai@kernel.org,
+       ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org
+To: Henrik Kretzschmar <henne@nachtwindheim.de>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:02:52 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PowCg-00022G-BR
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:02:50 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1752997Ab1BNLCn (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 06:02:43 -0500
+Received: from mx3.mail.elte.hu ([157.181.1.138]:38974 "EHLO mx3.mail.elte.hu"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1751314Ab1BNLCl (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 06:02:41 -0500
+Received: from elvis.elte.hu ([157.181.1.14])
+       by mx3.mail.elte.hu with esmtp (Exim)
+       id 1PowCQ-0003df-Gk
+       from <mingo@elte.hu>; Mon, 14 Feb 2011 12:02:34 +0100
+Received: by elvis.elte.hu (Postfix, from userid 1004)
+       id 0D9343E2369; Mon, 14 Feb 2011 12:02:32 +0100 (CET)
+Content-Disposition: inline
+In-Reply-To: <1297677612-12405-3-git-send-email-henne@nachtwindheim.de>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu;
+X-ELTE-SpamScore: -2.0
+X-ELTE-SpamLevel: 
+X-ELTE-SpamCheck: no
+X-ELTE-SpamVersion: ELTE 2.0 
+X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5
+       -2.0 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
+       [score: 0.0000]
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099671>
+
+
+* Henrik Kretzschmar <henne@nachtwindheim.de> wrote:
+
+> +#ifdef CONFIG_INTR_REMAP
+> +    struct IO_APIC_route_entry **ioapic_entries = NULL;
+> +
+>      if (intr_remapping_enabled) {
+>              ioapic_entries = alloc_ioapic_entries();
+>              if (!ioapic_entries) {
+> @@ -2133,6 +2136,7 @@ static int lapic_resume(struct sys_device *dev)
+>              mask_IO_APIC_setup(ioapic_entries);
+>              legacy_pic->mask_all();
+>      }
+> +#endif
+>  
+>      if (x2apic_mode)
+>              enable_x2apic();
+> @@ -2173,6 +2177,7 @@ static int lapic_resume(struct sys_device *dev)
+>      apic_write(APIC_ESR, 0);
+>      apic_read(APIC_ESR);
+>  
+> +#ifdef CONFIG_INTR_REMAP
+>      if (intr_remapping_enabled) {
+>              reenable_intr_remapping(x2apic_mode);
+>              legacy_pic->restore_mask();
+> @@ -2180,6 +2185,7 @@ static int lapic_resume(struct sys_device *dev)
+>              free_ioapic_entries(ioapic_entries);
+>      }
+>  restore:
+> +#endif
+
+Hm, these bits should be factored out in a cleaner fashion - by adding helper 
+functions, etc. The x2apic code's integration into the lapic code was done in a 
+pretty ugly fashion so it's not your fault - but if we want to reintroduce UP-IOAPIC 
+we need to do it cleanly.
+
+Do you still want to do it? :-)
+
+Thanks,
+
+       Ingo
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004640:2, b/test/corpora/lkml/cur/1382298805.004640:2,
new file mode 100644 (file)
index 0000000..af16a62
--- /dev/null
@@ -0,0 +1,69 @@
+From: Ingo Molnar <mingo@elte.hu>
+Subject: Re: [PATCH 2/6] x86: ifdef enable_IR_x2apic() out
+Date: Mon, 14 Feb 2011 12:03:40 +0100
+Lines: 15
+Message-ID: <20110214110340.GC7140@elte.hu>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+ <1297677612-12405-2-git-send-email-henne@nachtwindheim.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: mingo@readhat.com, tglx@linutronix.de, hpa@zytor.com,
+       x86@kernel.org, tj@kernel.org, yinghai@kernel.org,
+       ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org
+To: Henrik Kretzschmar <henne@nachtwindheim.de>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:04:03 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PowDr-0002js-9K
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:04:03 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753399Ab1BNLDz (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 06:03:55 -0500
+Received: from mx2.mail.elte.hu ([157.181.151.9]:54341 "EHLO mx2.mail.elte.hu"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1753317Ab1BNLDx (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 06:03:53 -0500
+Received: from elvis.elte.hu ([157.181.1.14])
+       by mx2.mail.elte.hu with esmtp (Exim)
+       id 1PowDY-0002Mp-4N
+       from <mingo@elte.hu>; Mon, 14 Feb 2011 12:03:45 +0100
+Received: by elvis.elte.hu (Postfix, from userid 1004)
+       id 458B63E2369; Mon, 14 Feb 2011 12:03:40 +0100 (CET)
+Content-Disposition: inline
+In-Reply-To: <1297677612-12405-2-git-send-email-henne@nachtwindheim.de>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+Received-SPF: neutral (mx2.mail.elte.hu: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu;
+X-ELTE-SpamScore: -2.0
+X-ELTE-SpamLevel: 
+X-ELTE-SpamCheck: no
+X-ELTE-SpamVersion: ELTE 2.0 
+X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5
+       -2.0 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
+       [score: 0.0000]
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099672>
+
+
+
+* Henrik Kretzschmar <henne@nachtwindheim.de> wrote:
+
+> +#ifdef CONFIG_X86_64
+>  extern void enable_IR_x2apic(void);
+> +#endif
+
+Cannot we use the CONFIG_X86_X2APIC Kconfig switch here, instead of CONFIG_X86_64?
+
+enable_IR_x2apic() is not a 64-bit CPU feature.
+
+Thanks,
+
+       Ingo
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004642:2, b/test/corpora/lkml/cur/1382298805.004642:2,
new file mode 100644 (file)
index 0000000..ce8ac11
--- /dev/null
@@ -0,0 +1,93 @@
+From: Ingo Molnar <mingo@elte.hu>
+Subject: Re: [PATCH 1/6] x86: move ioapic_irq_destination_types
+Date: Mon, 14 Feb 2011 12:05:28 +0100
+Lines: 40
+Message-ID: <20110214110528.GD7140@elte.hu>
+References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Cc: mingo@readhat.com, tglx@linutronix.de, hpa@zytor.com,
+       x86@kernel.org, tj@kernel.org, yinghai@kernel.org,
+       ak@linux.intel.com, robert.richter@amd.com,
+       linux-kernel@vger.kernel.org
+To: Henrik Kretzschmar <henne@nachtwindheim.de>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:06:00 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PowFj-0003bW-W9
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:06:00 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753317Ab1BNLFq (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 06:05:46 -0500
+Received: from mx3.mail.elte.hu ([157.181.1.138]:46158 "EHLO mx3.mail.elte.hu"
+       rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+       id S1752958Ab1BNLFn (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 06:05:43 -0500
+Received: from elvis.elte.hu ([157.181.1.14])
+       by mx3.mail.elte.hu with esmtp (Exim)
+       id 1PowFH-0003wc-2d
+       from <mingo@elte.hu>; Mon, 14 Feb 2011 12:05:36 +0100
+Received: by elvis.elte.hu (Postfix, from userid 1004)
+       id 30C323E2369; Mon, 14 Feb 2011 12:05:27 +0100 (CET)
+Content-Disposition: inline
+In-Reply-To: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
+User-Agent: Mutt/1.5.20 (2009-08-17)
+Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu;
+X-ELTE-SpamScore: -2.0
+X-ELTE-SpamLevel: 
+X-ELTE-SpamCheck: no
+X-ELTE-SpamVersion: ELTE 2.0 
+X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5
+       -2.0 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
+       [score: 0.0000]
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099674>
+
+
+* Henrik Kretzschmar <henne@nachtwindheim.de> wrote:
+
+> +++ b/arch/x86/include/asm/apicdef.h
+> @@ -426,4 +426,16 @@ struct local_apic {
+>  #else
+>   #define BAD_APICID 0xFFFFu
+>  #endif
+> +
+> +enum ioapic_irq_destination_types {
+> +    dest_Fixed = 0,
+> +    dest_LowestPrio = 1,
+> +    dest_SMI = 2,
+> +    dest__reserved_1 = 3,
+> +    dest_NMI = 4,
+> +    dest_INIT = 5,
+> +    dest__reserved_2 = 6,
+> +    dest_ExtINT = 7
+> +};
+
+one very small request, while we are moving it could you please align the value
+enumeration vertically? Something like:
+
+enum ioapic_irq_destination_types {
+
+       dest_Fixed              = 0,
+       dest_LowestPrio         = 1,
+       dest_SMI                = 2,
+       dest__reserved_1        = 3,
+       dest_NMI                = 4,
+       dest_INIT               = 5,
+       dest__reserved_2        = 6,
+       dest_ExtINT             = 7
+};
+
+... would be much more readable, right?
+
+Thanks,
+
+       Ingo
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004653:2, b/test/corpora/lkml/cur/1382298805.004653:2,
new file mode 100644 (file)
index 0000000..d6bd8d1
--- /dev/null
@@ -0,0 +1,90 @@
+From: Catalin Marinas <catalin.marinas@arm.com>
+Subject: Re: [PATCH] ARM: vfp: Always save VFP state in vfp_pm_suspend
+Date: Mon, 14 Feb 2011 11:42:22 +0000
+Organization: ARM Limited
+Lines: 43
+Message-ID: <1297683742.30092.11.camel@e102109-lin.cambridge.arm.com>
+References: <1297638813-1315-1-git-send-email-ccross@android.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8BIT
+Cc: linux-arm-kernel@lists.infradead.org,
+       Russell King <linux@arm.linux.org.uk>,
+       linux-kernel@vger.kernel.org
+To: Colin Cross <ccross@android.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:42:45 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1PowpJ-00069R-8c
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:42:45 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753535Ab1BNLmi (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 06:42:38 -0500
+Received: from service87.mimecast.com ([94.185.240.25]:56758 "HELO
+       service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with SMTP id S1752997Ab1BNLmg convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 06:42:36 -0500
+Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21])
+       by service87.mimecast.com;
+       Mon, 14 Feb 2011 11:42:31 +0000
+Received: from [10.1.77.95] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959);
+        Mon, 14 Feb 2011 11:42:28 +0000
+In-Reply-To: <1297638813-1315-1-git-send-email-ccross@android.com>
+X-Mailer: Evolution 2.28.1
+X-OriginalArrivalTime: 14 Feb 2011 11:42:28.0658 (UTC) FILETIME=[41F09120:01CBCC3C]
+X-MC-Unique: 111021411423105201
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099685>
+
+On Sun, 2011-02-13 at 23:13 +0000, Colin Cross wrote:
+> vfp_pm_suspend should save the VFP state any time there is
+> a last_VFP_context.  If it only saves when the VFP is enabled,
+> the state can get lost when, on a UP system:
+>    Thread 1 uses the VFP
+>    Context switch occurs to thread 2, VFP is disabled but the
+>       VFP context is not saved to allow lazy save and restore
+>    Thread 2 initiates suspend
+>    vfp_pm_suspend is called with the VFP disabled, but the
+>       context has not been saved.
+
+At this point is it guaranteed that the thread won't migrate to another
+CPU? If not, we should use get/put_cpu.
+
+> --- a/arch/arm/vfp/vfpmodule.c
+> +++ b/arch/arm/vfp/vfpmodule.c
+> @@ -415,13 +415,12 @@ static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)
+>         struct thread_info *ti = current_thread_info();
+>         u32 fpexc = fmrx(FPEXC);
+> 
+> -       /* if vfp is on, then save state for resumption */
+> -       if (fpexc & FPEXC_EN) {
+> +       /* save state for resume */
+> +       if (last_VFP_context[ti->cpu]) {
+>                 printk(KERN_DEBUG "%s: saving vfp state\n", __func__);
+> -               vfp_save_state(&ti->vfpstate, fpexc);
+> -
+> -               /* disable, just in case */
+> -               fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
+> +               fmxr(FPEXC, fpexc | FPEXC_EN);
+> +               vfp_save_state(last_VFP_context[ti->cpu], fpexc);
+> +               fmxr(FPEXC, fpexc & ~FPEXC_EN);
+>         }
+
+We may want to set the last_VFP_context to NULL so that after resuming
+(to the same thread) we force the VFP reload from the vfpstate
+structure. The vfp_support_entry code ignores the reloading if the
+last_VFP_context is the same as vfpstate.
+
+-- 
+Catalin
+
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004665:2, b/test/corpora/lkml/cur/1382298805.004665:2,
new file mode 100644 (file)
index 0000000..bfba805
--- /dev/null
@@ -0,0 +1,121 @@
+From: =?ISO-8859-1?Q?Nicolas_de_Peslo=FCan?= 
+       <nicolas.2p.debian@gmail.com>
+Subject: Re: [PATCH] core: dev: don't call BUG() on bad input
+Date: Mon, 14 Feb 2011 13:16:04 +0100
+Lines: 54
+Message-ID: <4D591D04.4050000@gmail.com>
+References: <1297680967-11893-1-git-send-email-segoon@openwall.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1;
+       format=flowed
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: linux-kernel@vger.kernel.org,
+       "David S. Miller" <davem@davemloft.net>,
+       Eric Dumazet <eric.dumazet@gmail.com>,
+       Tom Herbert <therbert@google.com>,
+       Changli Gao <xiaosuo@gmail.com>,
+       Jesse Gross <jesse@nicira.com>, netdev@vger.kernel.org
+To: Vasiliy Kulikov <segoon@openwall.com>
+X-From: netdev-owner@vger.kernel.org Mon Feb 14 13:16:23 2011
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PoxLn-0007s8-Rx
+       for linux-netdev-2@lo.gmane.org; Mon, 14 Feb 2011 13:16:20 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1753819Ab1BNMQQ convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;linux-netdev-2@m.gmane.org>); Mon, 14 Feb 2011 07:16:16 -0500
+Received: from mail-bw0-f46.google.com ([209.85.214.46]:53692 "EHLO
+       mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753690Ab1BNMQO (ORCPT
+       <rfc822;netdev@vger.kernel.org>); Mon, 14 Feb 2011 07:16:14 -0500
+Received: by bwz15 with SMTP id 15so5395788bwz.19
+        for <multiple recipients>; Mon, 14 Feb 2011 04:16:13 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:message-id:date:from:user-agent:mime-version:to
+         :cc:subject:references:in-reply-to:content-type
+         :content-transfer-encoding;
+        bh=xx3YxuXgqhBANV8wzcWyUMECJelpRfdmoRSp1AKdYdc=;
+        b=N0KOUEiWNDJjbwFsNkzabK7eGUNcoUNkqBGVRMNJFQ1jIgKtMC9sXdcmSFkLf2G3W0
+         zzRsPc9T6wnstCSnGFjIStR1GQK4bQ7o7SC+bmV0UqsBQAMW8sdDkT20PMZlBl2X7PkF
+         a2TGrPtJKfEcGFXay9Xo1ZMu1aYODhlRfsZKo=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=message-id:date:from:user-agent:mime-version:to:cc:subject
+         :references:in-reply-to:content-type:content-transfer-encoding;
+        b=vyCGwBn8dYUhOjmcV0am255nAUilQntfBxUI4yId3MocKlSBfEE0jJCJIVDySIAYOj
+         4g7FzXDeqZ5brwXgwA1derVfTXYvhKUC/60QA9/377l/PZ0vvRfqyPQcinMoOSCc+Kvv
+         vnBZtq/Kr+D4nUnefIwwjJ/dXS3dGjFBvis6w=
+Received: by 10.204.98.65 with SMTP id p1mr25300616bkn.198.1297685772974;
+        Mon, 14 Feb 2011 04:16:12 -0800 (PST)
+Received: from [192.168.0.101] (eab95-4-88-175-177-37.fbx.proxad.net [88.175.177.37])
+        by mx.google.com with ESMTPS id a17sm1733557bku.23.2011.02.14.04.16.07
+        (version=SSLv3 cipher=OTHER);
+        Mon, 14 Feb 2011 04:16:09 -0800 (PST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11
+In-Reply-To: <1297680967-11893-1-git-send-email-segoon@openwall.com>
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099697>
+
+Le 14/02/2011 11:56, Vasiliy Kulikov a =E9crit :
+> alloc_netdev() may be called with too long name (more that IFNAMSIZ b=
+ytes).
+> Currently this leads to BUG().  Other insane inputs (bad txqs, rxqs) =
+and
+> even OOM don't lead to BUG().  Made alloc_netdev() return NULL, like =
+on
+> other errors.
+>
+> Signed-off-by: Vasiliy Kulikov<segoon@openwall.com>
+> ---
+>   Compile tested.
+>
+>   net/core/dev.c |    5 ++++-
+>   1 files changed, 4 insertions(+), 1 deletions(-)
+>
+> diff --git a/net/core/dev.c b/net/core/dev.c
+> index 6392ea0..12ef4b0 100644
+> --- a/net/core/dev.c
+> +++ b/net/core/dev.c
+> @@ -5761,7 +5761,10 @@ struct net_device *alloc_netdev_mqs(int sizeof=
+_priv, const char *name,
+>      size_t alloc_size;
+>      struct net_device *p;
+>
+> -    BUG_ON(strlen(name)>=3D sizeof(dev->name));
+> +    if (strnlen(name, sizeof(dev->name))>=3D sizeof(dev->name)) {
+
+"size_t strnlen(const char *s, size_t maxlen) : The strnlen() function =
+returns strlen(s), if that is=20
+less than maxlen, or maxlen if there is no '\0' character among the fir=
+st maxlen characters pointed=20
+to by s."
+
+How can strnlen(name, sizeof(dev->name)) be greater than sizeof(dev->na=
+me)?
+
+Shouldn't it be "if (strnlen(name, sizeof(dev->name)) =3D=3D sizeof(dev=
+->name))" instead?
+
+         Nicolas.
+
+> +            pr_err("alloc_netdev: Too long device name \n");
+> +            return NULL;
+> +    }
+>
+>      if (txqs<  1) {
+>              pr_err("alloc_netdev: Unable to allocate device "
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004680:2, b/test/corpora/lkml/cur/1382298805.004680:2,
new file mode 100644 (file)
index 0000000..e0e74ce
--- /dev/null
@@ -0,0 +1,103 @@
+From: Vasiliy Kulikov <segoon@openwall.com>
+Subject: Re: [PATCH] core: dev: don't call BUG() on bad input
+Date: Mon, 14 Feb 2011 15:23:13 +0300
+Lines: 34
+Message-ID: <20110214122313.GA10062@albatros>
+References: <1297680967-11893-1-git-send-email-segoon@openwall.com>
+ <4D591D04.4050000@gmail.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=iso-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: linux-kernel@vger.kernel.org,
+       "David S. Miller" <davem@davemloft.net>,
+       Eric Dumazet <eric.dumazet@gmail.com>,
+       Tom Herbert <therbert@google.com>,
+       Changli Gao <xiaosuo@gmail.com>,
+       Jesse Gross <jesse@nicira.com>, netdev@vger.kernel.org
+To: Nicolas de =?iso-8859-1?Q?Peslo=FCan?= 
+       <nicolas.2p.debian@gmail.com>
+X-From: netdev-owner@vger.kernel.org Mon Feb 14 13:24:40 2011
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1PoxTr-00046W-DE
+       for linux-netdev-2@lo.gmane.org; Mon, 14 Feb 2011 13:24:39 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754719Ab1BNMXX convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;linux-netdev-2@m.gmane.org>); Mon, 14 Feb 2011 07:23:23 -0500
+Received: from mail-bw0-f46.google.com ([209.85.214.46]:64487 "EHLO
+       mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1754086Ab1BNMXU (ORCPT
+       <rfc822;netdev@vger.kernel.org>); Mon, 14 Feb 2011 07:23:20 -0500
+Received: by bwz15 with SMTP id 15so5401470bwz.19
+        for <multiple recipients>; Mon, 14 Feb 2011 04:23:18 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:sender:date:from:to:cc:subject:message-id
+         :references:mime-version:content-type:content-disposition
+         :content-transfer-encoding:in-reply-to:user-agent;
+        bh=4cv3J11meWILtVQ6Drgqk74suEYFVRQKnvtS62ZKPMU=;
+        b=oson8MDOPhFFO5h9lGEmq3EcDJ7bfOy60AsJ8ka5Q45h/Fg5LvGyVGBWB48YesHBg+
+         51Kdb4VrtCWazj2/c1Eauv2jvrGXUjj1hZdo3Rq0jZb5eU+Nvf+7Gl8nWE1S47XmT8YW
+         ed9CdFnNDgvkVUw+Rg48e2nG79kDRNUGWlpKI=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=sender:date:from:to:cc:subject:message-id:references:mime-version
+         :content-type:content-disposition:content-transfer-encoding
+         :in-reply-to:user-agent;
+        b=lEIU6CLzqKxhpDXukIqjR49CQZ370NKAkb0Aah7A1uyEdLZ9ctYpgg1oPjsQX/V9IR
+         TqyIP0zocVjBhUgCi32M9DPe/qjiqe+YS+EXNGLMMrF1oEUY+yFfq1jChaHkk2xuf/EM
+         MaGyK3svEz1q2iV1bgkTLcXCLWyK+A/M1WFlg=
+Received: by 10.204.80.161 with SMTP id t33mr15020786bkk.121.1297686197182;
+        Mon, 14 Feb 2011 04:23:17 -0800 (PST)
+Received: from localhost (ppp91-77-40-235.pppoe.mtu-net.ru [91.77.40.235])
+        by mx.google.com with ESMTPS id w3sm1684029bkt.5.2011.02.14.04.23.14
+        (version=TLSv1/SSLv3 cipher=OTHER);
+        Mon, 14 Feb 2011 04:23:16 -0800 (PST)
+Content-Disposition: inline
+In-Reply-To: <4D591D04.4050000@gmail.com>
+User-Agent: Mutt/1.5.20 (2009-06-14)
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099712>
+
+Hi Nicolas,
+
+On Mon, Feb 14, 2011 at 13:16 +0100, Nicolas de Peslo=FCan wrote:
+> >-   BUG_ON(strlen(name)>=3D sizeof(dev->name));
+> >+   if (strnlen(name, sizeof(dev->name))>=3D sizeof(dev->name)) {
+
+Ehh...  Space after ")" is needed :)
+
+> "size_t strnlen(const char *s, size_t maxlen) : The strnlen()
+> function returns strlen(s), if that is less than maxlen, or maxlen
+> if there is no '\0' character among the first maxlen characters
+> pointed to by s."
+>=20
+> How can strnlen(name, sizeof(dev->name)) be greater than sizeof(dev->=
+name)?
+>=20
+> Shouldn't it be "if (strnlen(name, sizeof(dev->name)) =3D=3D sizeof(d=
+ev->name))" instead?
+
+Not a big deal, but MO it's better to guard from everything that
+is not a good input by negating the check.  strnlen() < sizeof() is OK,
+strnlen() >=3D sizeof() is bad.  Is "=3D=3D" more preferable for net/ c=
+oding style?
+
+
+--=20
+Vasiliy Kulikov
+http://www.openwall.com - bringing security into open computing environ=
+ments
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004688:2, b/test/corpora/lkml/cur/1382298805.004688:2,
new file mode 100644 (file)
index 0000000..dd935b6
--- /dev/null
@@ -0,0 +1,107 @@
+From: =?ISO-8859-1?Q?Nicolas_de_Peslo=FCan?= 
+       <nicolas.2p.debian@gmail.com>
+Subject: Re: [PATCH] core: dev: don't call BUG() on bad input
+Date: Mon, 14 Feb 2011 14:01:44 +0100
+Lines: 40
+Message-ID: <4D5927B8.2070704@gmail.com>
+References: <1297680967-11893-1-git-send-email-segoon@openwall.com> <4D591D04.4050000@gmail.com> <20110214122313.GA10062@albatros>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1;
+       format=flowed
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: linux-kernel@vger.kernel.org,
+       "David S. Miller" <davem@davemloft.net>,
+       Eric Dumazet <eric.dumazet@gmail.com>,
+       Tom Herbert <therbert@google.com>,
+       Changli Gao <xiaosuo@gmail.com>,
+       Jesse Gross <jesse@nicira.com>, netdev@vger.kernel.org
+To: Vasiliy Kulikov <segoon@openwall.com>
+X-From: netdev-owner@vger.kernel.org Mon Feb 14 14:02:23 2011
+Return-path: <netdev-owner@vger.kernel.org>
+Envelope-to: linux-netdev-2@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <netdev-owner@vger.kernel.org>)
+       id 1Poy4M-0006df-J5
+       for linux-netdev-2@lo.gmane.org; Mon, 14 Feb 2011 14:02:22 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1754233Ab1BNNBu convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;linux-netdev-2@m.gmane.org>); Mon, 14 Feb 2011 08:01:50 -0500
+Received: from mail-fx0-f46.google.com ([209.85.161.46]:54545 "EHLO
+       mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1753647Ab1BNNBs (ORCPT
+       <rfc822;netdev@vger.kernel.org>); Mon, 14 Feb 2011 08:01:48 -0500
+Received: by fxm20 with SMTP id 20so5178314fxm.19
+        for <multiple recipients>; Mon, 14 Feb 2011 05:01:47 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=gamma;
+        h=domainkey-signature:message-id:date:from:user-agent:mime-version:to
+         :cc:subject:references:in-reply-to:content-type
+         :content-transfer-encoding;
+        bh=AbxlHNh3L+hBj6Vij/+GRK5xyYUXmvKoB1QZLa2ZBj0=;
+        b=b/GQO7FpiFoh6WrR9d9qEW2Q1ZOK0YtYzl/fLoXZS49QbuYiuExhWkohPnHsdH/n7s
+         liu8crpx1n3Ajna/7GX1mHBP6V4lfhH+NyF0Rmw3w+fx154lFiY9dbyPX7H9MZNdW60a
+         8TmPRR356gmV+7bijgKwyMN1FRVMPNV0Zg0i8=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=gmail.com; s=gamma;
+        h=message-id:date:from:user-agent:mime-version:to:cc:subject
+         :references:in-reply-to:content-type:content-transfer-encoding;
+        b=C+hWB2Aof37xOLi8SWuN+D3QsDtf/f4yCxcLrNGhRYytyr/7CUmq/rS7PpgnfvBVBr
+         yaKwVZXs7QRxIWbPnzmV38e1K+eUwZ+dd9XuEFN1dnXd5KJVv4CjWr2N84NIHx/NvOBL
+         7QYK5+DuuRaccybcS4xWMNK8mujh9ebSBXTgM=
+Received: by 10.223.87.1 with SMTP id u1mr4464553fal.112.1297688507260;
+        Mon, 14 Feb 2011 05:01:47 -0800 (PST)
+Received: from [192.168.0.101] (eab95-4-88-175-177-37.fbx.proxad.net [88.175.177.37])
+        by mx.google.com with ESMTPS id y3sm1031898fai.38.2011.02.14.05.01.45
+        (version=SSLv3 cipher=OTHER);
+        Mon, 14 Feb 2011 05:01:46 -0800 (PST)
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11
+In-Reply-To: <20110214122313.GA10062@albatros>
+Sender: netdev-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099723>
+
+Le 14/02/2011 13:23, Vasiliy Kulikov a =E9crit :
+> Hi Nicolas,
+
+Hi Vasiliy,
+
+> On Mon, Feb 14, 2011 at 13:16 +0100, Nicolas de Peslo=FCan wrote:
+>>> -  BUG_ON(strlen(name)>=3D sizeof(dev->name));
+>>> +  if (strnlen(name, sizeof(dev->name))>=3D sizeof(dev->name)) {
+>
+> Ehh...  Space after ")" is needed :)
+
+:-D
+
+>> "size_t strnlen(const char *s, size_t maxlen) : The strnlen()
+>> function returns strlen(s), if that is less than maxlen, or maxlen
+>> if there is no '\0' character among the first maxlen characters
+>> pointed to by s."
+>>
+>> How can strnlen(name, sizeof(dev->name)) be greater than sizeof(dev-=
+>name)?
+>>
+>> Shouldn't it be "if (strnlen(name, sizeof(dev->name)) =3D=3D sizeof(=
+dev->name))" instead?
+>
+> Not a big deal, but MO it's better to guard from everything that
+> is not a good input by negating the check.  strnlen()<  sizeof() is O=
+K,
+> strnlen()>=3D sizeof() is bad.  Is "=3D=3D" more preferable for net/ =
+coding style?
+
+Agreed, both cannot cause any troubles. =3D=3D is supposed to be better=
+ from the API point of view, but=20
+ >=3D is probably more readable.
+
+       Nicolas.
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
+
diff --git a/test/corpora/lkml/cur/1382298805.004906:2, b/test/corpora/lkml/cur/1382298805.004906:2,
new file mode 100644 (file)
index 0000000..fb3510a
--- /dev/null
@@ -0,0 +1,125 @@
+From: Colin Cross <ccross@android.com>
+Subject: Re: [PATCH] ARM: vfp: Always save VFP state in vfp_pm_suspend
+Date: Mon, 14 Feb 2011 10:35:37 -0800
+Lines: 50
+Message-ID: <AANLkTik_Jey_PtRmr530FVckA6RXHESeX+CyoJC=ZTkR@mail.gmail.com>
+References: <1297638813-1315-1-git-send-email-ccross@android.com>
+       <1297683742.30092.11.camel@e102109-lin.cambridge.arm.com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: QUOTED-PRINTABLE
+Cc: linux-arm-kernel@lists.infradead.org,
+       Russell King <linux@arm.linux.org.uk>,
+       linux-kernel@vger.kernel.org
+To: Catalin Marinas <catalin.marinas@arm.com>
+X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 19:36:14 2011
+Return-path: <linux-kernel-owner@vger.kernel.org>
+Envelope-to: glk-linux-kernel-3@lo.gmane.org
+Received: from vger.kernel.org ([209.132.180.67])
+       by lo.gmane.org with esmtp (Exim 4.69)
+       (envelope-from <linux-kernel-owner@vger.kernel.org>)
+       id 1Pp3HR-0002ph-ME
+       for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 19:36:14 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+       id S1751716Ab1BNSf7 convert rfc822-to-quoted-printable (ORCPT
+       <rfc822;glk-linux-kernel-3@m.gmane.org>);
+       Mon, 14 Feb 2011 13:35:59 -0500
+Received: from smtp-out.google.com ([74.125.121.67]:16138 "EHLO
+       smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+       with ESMTP id S1751472Ab1BNSf5 convert rfc822-to-8bit (ORCPT
+       <rfc822;linux-kernel@vger.kernel.org>);
+       Mon, 14 Feb 2011 13:35:57 -0500
+Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78])
+       by smtp-out.google.com with ESMTP id p1EIZtnZ010066
+       for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:55 -0800
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;
+       t=1297708556; bh=zHQvHco6EycqYjYMR9YZftpchts=;
+       h=MIME-Version:Sender:In-Reply-To:References:Date:Message-ID:
+        Subject:From:To:Cc:Content-Type:Content-Transfer-Encoding;
+       b=vMdLxEMc5VUxTbXeXOfO9iAKtgTlVwOwZrVZEhG7GNUReOYWZKzblAuPHuJUWHr5q
+        8s7bNLIdGKiRH4q28mv9w==
+Received: from vws17 (vws17.prod.google.com [10.241.21.145])
+       by kpbe14.cbf.corp.google.com with ESMTP id p1EIYaTC004311
+       (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
+       for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:54 -0800
+Received: by vws17 with SMTP id 17so3300387vws.2
+        for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:54 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=google.com; s=beta;
+        h=domainkey-signature:mime-version:sender:in-reply-to:references:date
+         :x-google-sender-auth:message-id:subject:from:to:cc:content-type
+         :content-transfer-encoding;
+        bh=FyW95sl8WRQv1ev+TqjP0gzPcCabtWdW1//GAc6oFnY=;
+        b=MNkyYY1htITiUX23N5enGCjsYq2mGBCW4BadxXMha/29ZeIyVP6jrUHlViT88u79RG
+         SxLMzz7lijwW38xTiBfw==
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+        d=google.com; s=beta;
+        h=mime-version:sender:in-reply-to:references:date
+         :x-google-sender-auth:message-id:subject:from:to:cc:content-type
+         :content-transfer-encoding;
+        b=Lio4jom4+RruCzH/a6zheXvUcTpZvSX7eMk6Ld1+PQQybP02I0+Cv4+PgGac2GoAYX
+         tXciu0c/KOGts2phbyMg==
+Received: by 10.220.94.201 with SMTP id a9mr1430388vcn.56.1297708537386; Mon,
+ 14 Feb 2011 10:35:37 -0800 (PST)
+Received: by 10.220.43.142 with HTTP; Mon, 14 Feb 2011 10:35:37 -0800 (PST)
+In-Reply-To: <1297683742.30092.11.camel@e102109-lin.cambridge.arm.com>
+X-Google-Sender-Auth: 47_39DbBbWrnAh28bpWvfpwmbLw
+X-System-Of-Record: true
+Sender: linux-kernel-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel@vger.kernel.org
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099943>
+
+On Mon, Feb 14, 2011 at 3:42 AM, Catalin Marinas
+<catalin.marinas@arm.com> wrote:
+> On Sun, 2011-02-13 at 23:13 +0000, Colin Cross wrote:
+>> vfp_pm_suspend should save the VFP state any time there is
+>> a last_VFP_context. =A0If it only saves when the VFP is enabled,
+>> the state can get lost when, on a UP system:
+>> =A0 =A0Thread 1 uses the VFP
+>> =A0 =A0Context switch occurs to thread 2, VFP is disabled but the
+>> =A0 =A0 =A0 VFP context is not saved to allow lazy save and restore
+>> =A0 =A0Thread 2 initiates suspend
+>> =A0 =A0vfp_pm_suspend is called with the VFP disabled, but the
+>> =A0 =A0 =A0 context has not been saved.
+>
+> At this point is it guaranteed that the thread won't migrate to anoth=
+er
+> CPU? If not, we should use get/put_cpu.
+
+Yes, VFP suspend is implemented with a sysdev, which is suspended
+after disable_nonboot_cpus.
+
+>> --- a/arch/arm/vfp/vfpmodule.c
+>> +++ b/arch/arm/vfp/vfpmodule.c
+>> @@ -415,13 +415,12 @@ static int vfp_pm_suspend(struct sys_device *d=
+ev, pm_message_t state)
+>> =A0 =A0 =A0 =A0 struct thread_info *ti =3D current_thread_info();
+>> =A0 =A0 =A0 =A0 u32 fpexc =3D fmrx(FPEXC);
+>>
+>> - =A0 =A0 =A0 /* if vfp is on, then save state for resumption */
+>> - =A0 =A0 =A0 if (fpexc & FPEXC_EN) {
+>> + =A0 =A0 =A0 /* save state for resume */
+>> + =A0 =A0 =A0 if (last_VFP_context[ti->cpu]) {
+>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_DEBUG "%s: saving vfp st=
+ate\n", __func__);
+>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 vfp_save_state(&ti->vfpstate, fpexc);
+>> -
+>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* disable, just in case */
+>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
+>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fpexc | FPEXC_EN);
+>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 vfp_save_state(last_VFP_context[ti->cp=
+u], fpexc);
+>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fpexc & ~FPEXC_EN);
+>> =A0 =A0 =A0 =A0 }
+>
+> We may want to set the last_VFP_context to NULL so that after resumin=
+g
+> (to the same thread) we force the VFP reload from the vfpstate
+> structure. The vfp_support_entry code ignores the reloading if the
+> last_VFP_context is the same as vfpstate.
+
+Right, will fix.
+
+
index dcc8863c70d8ee973687eb30580e02640e214f3e..7aedff70f6e3df4114f62d32f605d37645d851ca 100644 (file)
@@ -7,7 +7,13 @@ dir := test/test-databases
 test_databases := $(dir)/database-v1.tar.xz
 
 %.tar.xz:
-       wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);
+       @exec 1>&2 ;\
+       if command -v wget >/dev/null ;\
+       then set -x; wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
+       elif command -v curl >/dev/null ;\
+       then set -x; curl -L -s -o $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
+       else echo Cannot fetch databases, no wget nor curl available; exit 1 ;\
+       fi
 
 download-test-databases: ${test_databases}
 
diff --git a/test/test-lib-FREEBSD.sh b/test/test-lib-FREEBSD.sh
new file mode 100644 (file)
index 0000000..d1840b5
--- /dev/null
@@ -0,0 +1,9 @@
+# If present, use GNU Coreutils instead of a native BSD utils
+if command -v gdate >/dev/null
+   then
+       date () { gdate "$@"; }
+       base64 () { gbase64 "$@"; }
+       wc () { gwc "$@"; }
+       sed () { gsed "$@"; }
+       sha256sum () { gsha256sum "$@"; }
+   fi
index a96cfbeba019c081ef0f164ddffaad90561f06f3..ef409171fa86d547f43d5b940c7afd6e98d5b08d 100644 (file)
@@ -66,6 +66,11 @@ export LD_LIBRARY_PATH
 # configure output
 . $notmuch_path/sh.config || exit 1
 
+# load OS specifics
+if [ -e ./test-lib-$PLATFORM.sh ]; then
+       . ./test-lib-$PLATFORM.sh || exit 1
+fi
+
 if test -n "$valgrind"
 then
        make_symlink () {
index 518d9c7fdb001b1a807182f068dae1cc2bb86b8a..7ae96c6999aaed84007b99e4e2a6c8a6beb754da 100644 (file)
@@ -80,6 +80,7 @@ if [[ ( -n "$TEST_EMACS" && -z "$TEST_EMACSCLIENT" ) || \
 fi
 TEST_EMACS=${TEST_EMACS:-${EMACS:-emacs}}
 TEST_EMACSCLIENT=${TEST_EMACSCLIENT:-emacsclient}
+TEST_GDB=${TEST_GDB:-gdb}
 TEST_CC=${TEST_CC:-cc}
 TEST_CFLAGS=${TEST_CFLAGS:-"-g -O0"}
 
@@ -92,15 +93,6 @@ unset GREP_OPTIONS
 # For emacsclient
 unset ALTERNATE_EDITOR
 
-# Convenience
-#
-# A regexp to match 5 and 40 hexdigits
-_x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
-
-_x04='[0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x32="$_x04$_x04$_x04$_x04$_x04$_x04$_x04$_x04"
-
 # Each test should start with something like this, after copyright notices:
 #
 # test_description='Description of this test...
@@ -121,17 +113,15 @@ _x32="$_x04$_x04$_x04$_x04$_x04$_x04$_x04$_x04"
 while test "$#" -ne 0
 do
        case "$1" in
-       -d|--d|--de|--deb|--debu|--debug)
+       -d|--debug)
                debug=t; shift ;;
-       -i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
+       -i|--immediate)
                immediate=t; shift ;;
-       -l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
-               GIT_TEST_LONG=t; export GIT_TEST_LONG; shift ;;
-       -h|--h|--he|--hel|--help)
+       -h|--help)
                help=t; shift ;;
-       -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
+       -v|--verbose)
                verbose=t; shift ;;
-       -q|--q|--qu|--qui|--quie|--quiet)
+       -q|--quiet)
                quiet=t; shift ;;
        --with-dashes)
                with_dashes=t; shift ;;
@@ -140,7 +130,7 @@ do
        --no-python)
                # noop now...
                shift ;;
-       --va|--val|--valg|--valgr|--valgri|--valgrin|--valgrind)
+       --valgrind)
                valgrind=t; verbose=t; shift ;;
        --tee)
                shift ;; # was handled already
@@ -229,10 +219,21 @@ test_fixed=0
 test_broken=0
 test_success=0
 
+declare -a _exit_functions=()
+
+at_exit_function () {
+       _exit_functions=($1 ${_exit_functions[@]/$1})
+}
+
+rm_exit_function () {
+       _exit_functions=(${_exit_functions[@]/$1})
+}
+
 _exit_common () {
        code=$?
        trap - EXIT
        set +ex
+       for _fn in ${_exit_functions[@]}; do $_fn; done
        rm -rf "$TEST_TMPDIR"
 }
 
@@ -275,33 +276,6 @@ export GNUPGHOME="${TEST_TMPDIR}/gnupg"
 trap 'trap_exit' EXIT
 trap 'trap_signal' HUP INT TERM
 
-test_decode_color () {
-       sed     -e 's/.\[1m/<WHITE>/g' \
-               -e 's/.\[31m/<RED>/g' \
-               -e 's/.\[32m/<GREEN>/g' \
-               -e 's/.\[33m/<YELLOW>/g' \
-               -e 's/.\[34m/<BLUE>/g' \
-               -e 's/.\[35m/<MAGENTA>/g' \
-               -e 's/.\[36m/<CYAN>/g' \
-               -e 's/.\[m/<RESET>/g'
-}
-
-q_to_nul () {
-       perl -pe 'y/Q/\000/'
-}
-
-q_to_cr () {
-       tr Q '\015'
-}
-
-append_cr () {
-       sed -e 's/$/Q/' | tr Q '\015'
-}
-
-remove_cr () {
-       tr '\015' Q | sed -e 's/Q$//'
-}
-
 # Generate a new message in the mail directory, with a unique message
 # ID and subject. The message is not added to the index.
 #
@@ -596,10 +570,12 @@ test_begin_subtest ()
 test_expect_equal ()
 {
        exec 1>&6 2>&7          # Restore stdout and stderr
+       if [ -z "$inside_subtest" ]; then
+               error "bug in the test script: test_expect_equal without test_begin_subtest"
+       fi
        inside_subtest=
-       test "$#" = 3 && { prereq=$1; shift; } || prereq=
        test "$#" = 2 ||
-       error "bug in the test script: not 2 or 3 parameters to test_expect_equal"
+       error "bug in the test script: not 2 parameters to test_expect_equal"
 
        output="$1"
        expected="$2"
@@ -620,21 +596,23 @@ test_expect_equal ()
 test_expect_equal_file ()
 {
        exec 1>&6 2>&7          # Restore stdout and stderr
+       if [ -z "$inside_subtest" ]; then
+               error "bug in the test script: test_expect_equal_file without test_begin_subtest"
+       fi
        inside_subtest=
-       test "$#" = 3 && { prereq=$1; shift; } || prereq=
        test "$#" = 2 ||
-       error "bug in the test script: not 2 or 3 parameters to test_expect_equal"
+       error "bug in the test script: not 2 parameters to test_expect_equal_file"
 
        file1="$1"
-       basename1=`basename "$file1"`
        file2="$2"
-       basename2=`basename "$file2"`
        if ! test_skip "$test_subtest_name"
        then
                if diff -q "$file1" "$file2" >/dev/null ; then
                        test_ok_
                else
                        testname=$this_test.$test_count
+                       basename1=`basename "$file1"`
+                       basename2=`basename "$file2"`
                        cp "$file1" "$testname.$basename1"
                        cp "$file2" "$testname.$basename2"
                        test_failure_ "$(diff -u "$testname.$basename1" "$testname.$basename2")"
@@ -659,14 +637,16 @@ test_expect_equal_json () {
 
 # Sort the top-level list of JSON data from stdin.
 test_sort_json () {
-    PYTHONIOENCODING=utf-8 python -c \
+    PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -c \
         "import sys, json; json.dump(sorted(json.load(sys.stdin)),sys.stdout)"
 }
 
 test_emacs_expect_t () {
-       test "$#" = 2 && { prereq=$1; shift; } || prereq=
        test "$#" = 1 ||
-       error "bug in the test script: not 1 or 2 parameters to test_emacs_expect_t"
+       error "bug in the test script: not 1 parameter to test_emacs_expect_t"
+       if [ -z "$inside_subtest" ]; then
+               error "bug in the test script: test_emacs_expect_t without test_begin_subtest"
+       fi
 
        # Run the test.
        if ! test_skip "$test_subtest_name"
@@ -737,7 +717,7 @@ notmuch_json_show_sanitize ()
        -e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
        -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
        -e 's|"filename": "signature.asc",||g' \
-       -e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \
+       -e 's|"filename": \["/[^"]*"\],|"filename": \["YYYYY"\],|g' \
        -e 's|"timestamp": 97.......|"timestamp": 42|g' \
         -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g'
 }
@@ -778,12 +758,8 @@ notmuch_config_sanitize ()
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.
-# The prerequisite can later be checked for in two ways:
 #
-# - Explicitly using test_have_prereq.
-#
-# - Implicitly by specifying the prerequisite tag in the calls to
-#   test_expect_{success,failure,code}.
+# The prerequisite can later be checked for by using test_have_prereq.
 #
 # The single parameter is the prerequisite tag (a simple word, in all
 # capital letters by convention).
@@ -850,12 +826,12 @@ test_ok_ () {
 }
 
 test_failure_ () {
+       print_test_description
        if test "$test_subtest_known_broken_" = "t"; then
                test_known_broken_failure_ "$@"
                return
        fi
        test_failure=$(($test_failure + 1))
-       print_test_description
        test_failure_message_ "FAIL" "$test_subtest_name" "$@"
        test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
        return 1
@@ -865,7 +841,9 @@ test_failure_message_ () {
        say_color error "%-6s" "$1"
        echo " $2"
        shift 2
-       echo "$@" | sed -e 's/^/        /'
+       if [ "$#" != "0" ]; then
+               echo "$@" | sed -e 's/^/        /'
+       fi
        if test "$verbose" != "t"; then cat test.output; fi
 }
 
@@ -879,7 +857,11 @@ test_known_broken_ok_ () {
 test_known_broken_failure_ () {
        test_reset_state_
        test_broken=$(($test_broken+1))
-       test_failure_message_ "BROKEN" "$test_subtest_name" "$@"
+       if [ -z "$NOTMUCH_TEST_QUIET" ]; then
+               test_failure_message_ "BROKEN" "$test_subtest_name" "$@"
+       else
+               test_failure_message_ "BROKEN" "$test_subtest_name"
+       fi
        return 1
 }
 
@@ -912,11 +894,6 @@ test_skip () {
                        break
                esac
        done
-       if test -z "$to_skip" && test -n "$prereq" &&
-          ! test_have_prereq "$prereq"
-       then
-               to_skip=t
-       fi
        case "$to_skip" in
        t)
                test_report_skip_ "$@"
@@ -950,14 +927,17 @@ test_subtest_known_broken () {
 }
 
 test_expect_success () {
-       test "$#" = 3 && { prereq=$1; shift; } || prereq=
-       test "$#" = 2 ||
-       error "bug in the test script: not 2 or 3 parameters to test-expect-success"
-       test_subtest_name="$1"
-       test_reset_state_
-       if ! test_skip "$@"
+       exec 1>&6 2>&7          # Restore stdout and stderr
+       if [ -z "$inside_subtest" ]; then
+               error "bug in the test script: test_expect_success without test_begin_subtest"
+       fi
+       inside_subtest=
+       test "$#" = 1 ||
+       error "bug in the test script: not 1 parameters to test_expect_success"
+
+       if ! test_skip "$test_subtest_name"
        then
-               test_run_ "$2"
+               test_run_ "$1"
                run_ret="$?"
                # test_run_ may update missing external prerequisites
                test_check_missing_external_prereqs_ "$@" ||
@@ -965,20 +945,23 @@ test_expect_success () {
                then
                        test_ok_
                else
-                       test_failure_ "$2"
+                       test_failure_ "$1"
                fi
        fi
 }
 
 test_expect_code () {
-       test "$#" = 4 && { prereq=$1; shift; } || prereq=
-       test "$#" = 3 ||
-       error "bug in the test script: not 3 or 4 parameters to test-expect-code"
-       test_subtest_name="$2"
-       test_reset_state_
-       if ! test_skip "$@"
+       exec 1>&6 2>&7          # Restore stdout and stderr
+       if [ -z "$inside_subtest" ]; then
+               error "bug in the test script: test_expect_code without test_begin_subtest"
+       fi
+       inside_subtest=
+       test "$#" = 2 ||
+       error "bug in the test script: not 2 parameters to test_expect_code"
+
+       if ! test_skip "$test_subtest_name"
        then
-               test_run_ "$3"
+               test_run_ "$2"
                run_ret="$?"
                # test_run_ may update missing external prerequisites,
                test_check_missing_external_prereqs_ "$@" ||
@@ -986,70 +969,11 @@ test_expect_code () {
                then
                        test_ok_
                else
-                       test_failure_ "exit code $eval_ret, expected $1" "$3"
+                       test_failure_ "exit code $eval_ret, expected $1" "$2"
                fi
        fi
 }
 
-# test_external runs external test scripts that provide continuous
-# test output about their progress, and succeeds/fails on
-# zero/non-zero exit code.  It outputs the test output on stdout even
-# in non-verbose mode, and announces the external script with "* run
-# <n>: ..." before running it.  When providing relative paths, keep in
-# mind that all scripts run in "trash directory".
-# Usage: test_external description command arguments...
-# Example: test_external 'Perl API' perl ../path/to/test.pl
-test_external () {
-       test "$#" = 4 && { prereq=$1; shift; } || prereq=
-       test "$#" = 3 ||
-       error >&6 "bug in the test script: not 3 or 4 parameters to test_external"
-       test_subtest_name="$1"
-       shift
-       test_reset_state_
-       if ! test_skip "$test_subtest_name" "$@"
-       then
-               # Announce the script to reduce confusion about the
-               # test output that follows.
-               say_color "" " run $test_count: $descr ($*)"
-               # Run command; redirect its stderr to &4 as in
-               # test_run_, but keep its stdout on our stdout even in
-               # non-verbose mode.
-               "$@" 2>&4
-               if [ "$?" = 0 ]
-               then
-                       test_ok_
-               else
-                       test_failure_ "$@"
-               fi
-       fi
-}
-
-# Like test_external, but in addition tests that the command generated
-# no output on stderr.
-test_external_without_stderr () {
-       # The temporary file has no (and must have no) security
-       # implications.
-       tmp="$TMPDIR"; if [ -z "$tmp" ]; then tmp=/tmp; fi
-       stderr="$tmp/git-external-stderr.$$.tmp"
-       test_external "$@" 4> "$stderr"
-       [ -f "$stderr" ] || error "Internal error: $stderr disappeared."
-       test_subtest_name="no stderr: $1"
-       shift
-       if [ ! -s "$stderr" ]; then
-               rm "$stderr"
-               test_ok_
-       else
-               if [ "$verbose" = t ]; then
-                       output=`echo; echo Stderr is:; cat "$stderr"`
-               else
-                       output=
-               fi
-               # rm first in case test_failure exits.
-               rm "$stderr"
-               test_failure_ "$@" "$output"
-       fi
-}
-
 # This is not among top-level (test_expect_success)
 # but is a prefix that can be used in the test script, like:
 #
@@ -1208,7 +1132,7 @@ test_emacs () {
 test_python() {
     # Note: if there is need to print debug information from python program,
     # use stdout = os.fdopen(6, 'w') or stderr = os.fdopen(7, 'w')
-    PYTHONPATH="$TEST_DIRECTORY/../bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
+    PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
        $NOTMUCH_PYTHON -B - > OUTPUT
 }
 
@@ -1220,7 +1144,7 @@ test_C () {
     exec_file="test${test_count}"
     test_file="${exec_file}.c"
     cat > ${test_file}
-    ${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${TEST_DIRECTORY}/../lib -o ${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
+    ${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${NOTMUCH_SRCDIR}/lib -o ${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
     echo "== stdout ==" > OUTPUT.stdout
     echo "== stderr ==" > OUTPUT.stderr
     ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
@@ -1278,6 +1202,22 @@ test_init_ () {
 
 . ./test-lib-common.sh || exit 1
 
+if [ "${NOTMUCH_GMIME_MAJOR}" = 3 ]; then
+    test_subtest_broken_gmime_3 () {
+       test_subtest_known_broken
+    }
+    test_subtest_broken_gmime_2 () {
+       true
+    }
+else
+    test_subtest_broken_gmime_3 () {
+       true
+    }
+    test_subtest_broken_gmime_2 () {
+       test_subtest_known_broken
+    }
+fi
+
 emacs_generate_script
 
 
@@ -1381,7 +1321,7 @@ esac
 test_declare_external_prereq dtach
 test_declare_external_prereq emacs
 test_declare_external_prereq ${TEST_EMACSCLIENT}
-test_declare_external_prereq gdb
+test_declare_external_prereq ${TEST_GDB}
 test_declare_external_prereq gpg
 test_declare_external_prereq openssl
 test_declare_external_prereq gpgsm
index 1723ce665caa73287c4ae5dced5099786626c15b..158be28a365eaef601efea2209ab07bcafce8622 100755 (executable)
@@ -4,12 +4,14 @@ test_description='the verbosity options of the test framework itself.'
 
 . ./test-lib.sh || exit 1
 
-test_expect_success 'print something in test_expect_success and pass' '
+test_begin_subtest 'print something in test_expect_success and pass'
+test_expect_success '
   echo "hello stdout" &&
   echo "hello stderr" >&2 &&
   true
 '
-test_expect_success 'print something in test_expect_success and fail' '
+test_begin_subtest 'print something in test_expect_success and fail'
+test_expect_success '
   echo "hello stdout" &&
   echo "hello stderr" >&2 &&
   false
index 905f23763468149b8ced3a5f7e9585701da2d0fe..3027880b45beee8ef24594bcef0410d44ce9d81b 100644 (file)
@@ -3,14 +3,14 @@
 dir := util
 extra_cflags += -I$(srcdir)/$(dir)
 
-libutil_c_srcs := $(dir)/xutil.c $(dir)/error_util.c $(dir)/hex-escape.c \
+libnotmuch_util_c_srcs := $(dir)/xutil.c $(dir)/error_util.c $(dir)/hex-escape.c \
                  $(dir)/string-util.c $(dir)/talloc-extra.c $(dir)/zlib-extra.c \
-               $(dir)/util.c
+               $(dir)/util.c $(dir)/gmime-extra.c
 
-libutil_modules := $(libutil_c_srcs:.c=.o)
+libnotmuch_util_modules := $(libnotmuch_util_c_srcs:.c=.o)
 
-$(dir)/libutil.a: $(libutil_modules)
+$(dir)/libnotmuch_util.a: $(libnotmuch_util_modules)
        $(call quiet,AR) rcs $@ $^
 
-SRCS := $(SRCS) $(libutil_c_srcs)
-CLEAN := $(CLEAN) $(libutil_modules) $(dir)/libutil.a
+SRCS := $(SRCS) $(libnotmuch_util_c_srcs)
+CLEAN := $(CLEAN) $(libnotmuch_util_modules) $(dir)/libnotmuch_util.a
diff --git a/util/endian-util.h b/util/endian-util.h
deleted file mode 100644 (file)
index bc80c40..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* this file mimics the macros present in recent GCC and CLANG */
-
-#ifndef _ENDIAN_UTIL_H
-#define _ENDIAN_UTIL_H
-
-/* This are prefixed with UTIL to avoid collisions
- *
- * You can use something like the following to define UTIL_BYTE_ORDER
- * in a configure script.
- */
-#if 0
-#include <stdio.h>
-#include <stdint.h>
-uint32_t test = 0x34333231;
-int main() { printf("%.4s\n", (const char*)&test); return 0; }
-#endif
-
-#define UTIL_ORDER_BIG_ENDIAN    4321
-#define UTIL_ORDER_LITTLE_ENDIAN  1234
-
-
-#if !defined(UTIL_BYTE_ORDER) || ((UTIL_BYTE_ORDER != UTIL_ORDER_BIG_ENDIAN) && \
-                                 (UTIL_BYTE_ORDER != UTIL_ORDER_LITTLE_ENDIAN))
-#undef UTIL_BYTE_ORDER
-#ifdef __BYTE_ORDER__
-#  if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
-#    define UTIL_BYTE_ORDER UTIL_ORDER_LITTLE_ENDIAN
-#  elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#    define UTIL_BYTE_ORDER UTIL_ORDER_BIG_ENDIAN
-#  else
-#    error "Unsupported __BYTE_ORDER__"
-#  endif
-#else
-#  error "UTIL_BYTE_ORDER not correctly defined and __BYTE_ORDER__ not defined."
-#endif
-#endif
-
-#endif
diff --git a/util/gmime-extra.c b/util/gmime-extra.c
new file mode 100644 (file)
index 0000000..f153858
--- /dev/null
@@ -0,0 +1,20 @@
+#include "gmime-extra.h"
+
+GMimeStream *
+g_mime_stream_stdout_new()
+{
+    GMimeStream *stream_stdout = NULL;
+    GMimeStream *stream_buffered = NULL;
+
+    stream_stdout = g_mime_stream_pipe_new (STDOUT_FILENO);
+    if (!stream_stdout)
+       return NULL;
+
+    g_mime_stream_pipe_set_owner (GMIME_STREAM_PIPE (stream_stdout), FALSE);
+
+    stream_buffered = g_mime_stream_buffer_new (stream_stdout, GMIME_STREAM_BUFFER_BLOCK_WRITE);
+
+    g_object_unref (stream_stdout);
+
+    return stream_buffered;
+}
diff --git a/util/gmime-extra.h b/util/gmime-extra.h
new file mode 100644 (file)
index 0000000..e0432a9
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _GMIME_EXTRA_H
+#define _GMIME_EXTRA_H
+#include <gmime/gmime.h>
+
+GMimeStream *g_mime_stream_stdout_new(void);
+#endif
diff --git a/version b/version
index 379191a43b01d4e7e023f969207e33794d408dfc..8b95abd9483e5ec2c932da88c141b56dc1f2b550 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.23.7
+0.24.2