public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@lst.de>
Cc: viro@zeniv.linux.org.uk, xfs@oss.sgi.com
Subject: Re: [PATCH 5/6] xfs: move non-inline symlinks to the pagecache
Date: Fri, 24 Apr 2015 08:29:42 +1000	[thread overview]
Message-ID: <20150423222942.GK15810@dastard> (raw)
In-Reply-To: <1429816064-10033-6-git-send-email-hch@lst.de>

On Thu, Apr 23, 2015 at 09:07:43PM +0200, Christoph Hellwig wrote:
> We can use the generic symlink in pagecache code for XFS non-inline
> symlinks.  Because links are always shorter than a page we will
> get the zero termination for the link for free.

Doesn't work for v5 filesystems where headers and CRCs are embedded
into the same blocks as the symlink data. i.e. this now falls down
to ->readpage to read the link data into the page cache, and that
just reads the entire blocks into the page cache. So what we can end
up within the page cache is this:

   4k block/page
+---|--------------+
 hdr  symlink data

And for a 1k block size v5 filesystem it could be this within a 4k
page:

    1k block            1k block
+---|--------------+----|---------------+
 hdr  symlink data   hdr   symlink data

Either way, it will be completely misinterpretted by the generic
symlink code...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-04-23 22:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 19:07 optimize symlink handling Christoph Hellwig
2015-04-23 19:07 ` [PATCH 2/6] xfs: factor out a helper to initialize a local format inode fork Christoph Hellwig
2015-04-23 19:07 ` [PATCH 3/6] xfs: set up inode operation vectors later Christoph Hellwig
2015-04-23 19:07 ` [PATCH 4/6] xfs: use ->readlink to implement the readlink_by_handle ioctl Christoph Hellwig
2015-04-23 19:07 ` [PATCH 5/6] xfs: move non-inline symlinks to the pagecache Christoph Hellwig
2015-04-23 22:29   ` Dave Chinner [this message]
2015-04-24  8:21     ` Christoph Hellwig
2015-04-25 14:16     ` Christoph Hellwig
2015-04-25 14:57       ` Al Viro
2015-04-25 15:11         ` Al Viro
2015-04-25 18:32         ` Christoph Hellwig
2015-04-25 21:05           ` Al Viro
2015-04-23 19:07 ` [PATCH 6/6] xfs: optimize inline symlinks Christoph Hellwig

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20150423222942.GK15810@dastard \
    --to=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

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

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