Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756483Ab3CMObf (ORCPT ); Wed, 13 Mar 2013 10:31:35 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:54564 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901Ab3CMObe (ORCPT ); Wed, 13 Mar 2013 10:31:34 -0400 MIME-Version: 1.0 Reply-To: sedat.dilek@gmail.com In-Reply-To: <1363184193-1796-1-git-send-email-miklos@szeredi.hu> References: <1363184193-1796-1-git-send-email-miklos@szeredi.hu> Date: Wed, 13 Mar 2013 15:31:31 +0100 Message-ID: Subject: Re: [PATCH 0/9] overlay filesystem: request for inclusion (v17) From: Sedat Dilek To: Miklos Szeredi Cc: viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@infradead.org, akpm@linux-foundation.org, apw@canonical.com, nbd@openwrt.org, neilb@suse.de, jordipujolp@gmail.com, ezk@fsl.cs.sunysb.edu, dhowells@redhat.com, sedat.dilek@googlemail.com, hooanon05@yahoo.co.jp, mszeredi@suse.cz Content-Type: multipart/mixed; boundary=047d7bfd0c2e2b196404d7cf4325 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 129248 Lines: 1744 --047d7bfd0c2e2b196404d7cf4325 Content-Type: text/plain; charset=UTF-8 On Wed, Mar 13, 2013 at 3:16 PM, Miklos Szeredi wrote: > Here's another version with the comments addressed plus a small bugfix and some > checkpatch cleanups. > > Changes in v17: > > - fix wrong return value in a failure path in ovl_link() > - fix subjects > - use file_inode() and MODULE_ALIAS_FS() > - fold bugfix patches > - checkpatch cleanups > > Git tree is here: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs.current > Hi, I pulled in v17 (current) into Linux-Next (next-20130313) and built OverlayFS as a module. Unfortunately, I do not see any success message on loading it. --- dmesg_3.9.0-rc2-next20130313-3-iniza-small.txt 2013-03-13 15:21:19.578712536 +0100 +++ dmesg_3.9.0-rc2-next20130313-3-iniza-small_after-overlayfs-test.txt 2013-03-13 15:22:14.658238998 +0100 @@ -806,3 +806,8 @@ [ 25.517154] wlan0: associated [ 25.517214] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 54.149536] usb 2-1.5: USB disconnect, device number 3 +[ 86.502215] squashfs: version 4.0 (2009/01/31) Phillip Lougher +[ 87.007082] EXT4-fs (loop4): mounted filesystem with ordered data mode. Opts: (null) +[ 87.311998] EXT4-fs (loop4): re-mounted. Opts: data=ordered +[ 87.657291] EXT4-fs (loop4): re-mounted. Opts: data=ordered +[ 88.057251] EXT4-fs (loop4): re-mounted. Opts: data=ordered Highly appreciated to see such a message! Test-case script attached (needs an additional patch on top of overlayfs.current, see attachments). - Sedat - > Thanks, > Miklos > > --- > Andy Whitcroft (1): > overlayfs: add statfs support > > Erez Zadok (1): > overlayfs: implement show_options > > Miklos Szeredi (6): > vfs: add i_op->dentry_open() > vfs: export do_splice_direct() to modules > vfs: export __inode_permission() to modules > vfs: introduce clone_private_mount() > overlay filesystem > fs: limit filesystem stacking depth > > Neil Brown (1): > overlay: overlay filesystem documentation > > --- > Documentation/filesystems/Locking | 2 + > Documentation/filesystems/overlayfs.txt | 199 +++++++++ > Documentation/filesystems/vfs.txt | 7 + > MAINTAINERS | 7 + > fs/Kconfig | 1 + > fs/Makefile | 1 + > fs/ecryptfs/main.c | 7 + > fs/internal.h | 5 - > fs/namei.c | 10 +- > fs/namespace.c | 18 + > fs/open.c | 23 +- > fs/overlayfs/Kconfig | 10 + > fs/overlayfs/Makefile | 7 + > fs/overlayfs/copy_up.c | 385 +++++++++++++++++ > fs/overlayfs/dir.c | 605 +++++++++++++++++++++++++++ > fs/overlayfs/inode.c | 372 +++++++++++++++++ > fs/overlayfs/overlayfs.h | 70 ++++ > fs/overlayfs/readdir.c | 566 +++++++++++++++++++++++++ > fs/overlayfs/super.c | 686 +++++++++++++++++++++++++++++++ > fs/splice.c | 1 + > include/linux/fs.h | 14 + > include/linux/mount.h | 3 + > 22 files changed, 2989 insertions(+), 10 deletions(-) > create mode 100644 Documentation/filesystems/overlayfs.txt > create mode 100644 fs/overlayfs/Kconfig > create mode 100644 fs/overlayfs/Makefile > create mode 100644 fs/overlayfs/copy_up.c > create mode 100644 fs/overlayfs/dir.c > create mode 100644 fs/overlayfs/inode.c > create mode 100644 fs/overlayfs/overlayfs.h > create mode 100644 fs/overlayfs/readdir.c > create mode 100644 fs/overlayfs/super.c > --047d7bfd0c2e2b196404d7cf4325 Content-Type: application/x-sh; name="run_overlayfs-test.sh" Content-Disposition: attachment; filename="run_overlayfs-test.sh" Content-Transfer-Encoding: base64 X-Attachment-Id: f_he8l3v2f1 IyEvYmluL3NoCgojIFRlc3RjYXNlIGZvciBPdmVybGF5IEZpbGVTeXN0ZW0gKE92ZXJsYXlGUyBv ciBzaG9ydDogb3ZsKQojCiMgT3JpZ2luYWwgVGVzdGNhc2U6IGh0dHA6Ly9saXZlbmV0LnNlbGZp cC5jb20vZnRwL2RlYmlhbi9vdmVybGF5ZnMvdGVzdC90ZXN0MDYuc2gKIyAgIE9yaWdpbmFsIEF1 dGhvcjogSm9yZGkgUHVqb2wgPGpvcmRpcHVqb2xwQGdtYWlsLmNvbT4KIwojIFNsaWdodGx5IG1v ZGlmaWVkOiBTZWRhdCBEaWxlayA8c2VkYXQuZGlsZWtAZ21haWwuY29tPgojCiMgMTYtQXVnLTIw MTI6IHY0CiMgKiBSZXRlc3RlZCB3aXRoIE92ZXJsYXlGUyB2MTQgYWdhaW5zdCBMaW51eC1OZXh0 IChuZXh0LTIwMTIwODE2KQojICogQWRkZWQgYSBtaXNzaW5nIGNvbW1lbnQgc2lnbiAoIiMiKQoj IDMwLUFwci0yMDEyOiB2MwojICogUmV0ZXN0ZWQgd2l0aCBPdmVybGF5RlMgdjEyIGFnYWluc3Qg TGludXgtMy40LXJ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ke1JPT1RfRElSfSIKI190ZXN0Cgptb3VudCAtbyByZW1vdW50LHJ3ICIke0NP V19ESVJ9Igptb3VudCAtbyByZW1vdW50LHJ3ICIke1JPT1RfRElSfSIgfHwgZWNobyAiJHs/fSIK X3Rlc3QKCm1vdW50IC1vIHJlbW91bnQscncgIiR7Q09XX0RJUn0iCm1vdW50IC1vIHJlbW91bnQs cncsbm9leGVjICIke1JPT1RfRElSfSIKX3Rlc3QKCm1vdW50IC1vIHJlbW91bnQscncsbm9leGVj ICIke0NPV19ESVJ9Igptb3VudCAtbyByZW1vdW50LHJ3LG5vZXhlYyAiJHtST09UX0RJUn0iCl90 ZXN0CgojIGV4aXQgMAoKdW1vdW50ICIke1JPT1RfRElSfSIKCndoaWxlIHJlYWQgZjsgZG8KCVsg LWQgIiR7Zn0iIF0gJiYgXAoJbW91bnRwb2ludCAtcSAiJHtmfSIgJiYgXAoJdW1vdW50ICIke2Z9 IiB8fCA6CmRvbmUgPDwgRU9GCiQoZmluZCAiJHtXT1JLX0RJUn0iIC1taW5kZXB0aCAxIC1tYXhk ZXB0aCAxIC10eXBlIGQpCkVPRgoKOgo= --047d7bfd0c2e2b196404d7cf4325 Content-Type: application/octet-stream; name="3.9.0-rc2-next20130313-3-iniza-small.patch" Content-Disposition: attachment; filename="3.9.0-rc2-next20130313-3-iniza-small.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_he8l5htn2 QW5keSBXaGl0Y3JvZnQgKDEpOgogICAgICBvdmVybGF5ZnM6IGFkZCBzdGF0ZnMgc3VwcG9ydAoK RXJleiBaYWRvayAoMSk6CiAgICAgIG92ZXJsYXlmczogaW1wbGVtZW50IHNob3dfb3B0aW9ucwoK TWlrbG9zIFN6ZXJlZGkgKDYpOgogICAgICB2ZnM6IGFkZCBpX29wLT5kZW50cnlfb3BlbigpCiAg ICAgIHZmczogZXhwb3J0IGRvX3NwbGljZV9kaXJlY3QoKSB0byBtb2R1bGVzCiAgICAgIHZmczog ZXhwb3J0IF9fa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mlsZXN5c3RlbXMvTG9ja2luZyAgICAgICB8 ICAgMiArCiBEb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL292ZXJsYXlmcy50eHQgfCAxOTkgKysr KysrKysrCiBEb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL3Zmcy50eHQgICAgICAgfCAgIDcgKwog TUFJTlRBSU5FUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA3ICsKIGZzL0tjb25m aWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMSArCiBmcy9NYWtlZmlsZSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDEgKwogZnMvZWNyeXB0ZnMvbWFpbi5jICAgICAg ICAgICAgICAgICAgICAgIHwgICA3ICsKIGZzL2ludGVybmFsLmggICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAgNSAtCiBmcy9uYW1laS5jICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg fCAgMTAgKy0KIGZzL25hbWVzcGFjZS5jICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAxOCAr CiBmcy9vcGVuLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMjMgKy0KIGZzL292 ZXJsYXlmcy9LY29uZmlnICAgICAgICAgICAgICAgICAgICB8ICAxMCArCiBmcy9vdmVybGF5ZnMv TWFrZWZpbGUgICAgICAgICAgICAgICAgICAgfCAgIDcgKwogZnMvb3ZlcmxheWZzL2NvcHlfdXAu YyAgICAgICAgICAgICAgICAgIHwgMzg1ICsrKysrKysrKysrKysrKysrKwogZnMvb3ZlcmxheWZz L2Rpci5jICAgICAgICAgICAgICAgICAgICAgIHwgNjA1ICsrKysrKysrKysrKysrKysrKysrKysr KysrKysKIGZzL292ZXJsYXlmcy9pbm9kZS5jICAgICAgICAgICAgICAgICAgICB8IDM3MiArKysr KysrKysrKysrKysrKwogZnMvb3ZlcmxheWZzL292ZXJsYXlmcy5oICAgICAgICAgICAgICAgIHwg I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dCBMaW51eCBmdHAg c2l0ZXMsIGluY2x1ZGluZzoKIGZ0cDovL2Z0cC5rZXJuZWwub3JnL3B1Yi9saW51eC9rZXJuZWwK IAotQ29weXJpZ2h0OiAxOTkxIC0gMjAwOSBMaW51cyBUb3J2YWxkcyBhbmQgb3RoZXJzLgorQ29w eXJpZ2h0OiAxOTkxIC0gMjAxMyBMaW51cyBUb3J2YWxkcyBhbmQgb3RoZXJzLgogCiBUaGUgZ2l0 IHJlcG9zaXRvcnkgZm9yIG1haW5saW5lIGtlcm5lbCBkZXZlbG9wbWVudCBpcyBhdDoKLWdpdDov L2dpdC5rZXJuZWwub3JnL3B1Yi9zY20vbGludXgva2VybmVsL2dpdC90b3J2YWxkcy9saW51eC0y LjYuZ2l0CitnaXQ6Ly9naXQua2VybmVsLm9yZy9wdWIvc2NtL2xpbnV4L2tlcm5lbC9naXQvdG9y dmFsZHMvbGludXguZ2l0CiAKICAgICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91 IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQogICAgIGl0IHVuZGVyIHRoZSB0ZXJt cyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Cg== --047d7bfd0c2e2b196404d7cf4325-- -- 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/