All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Krzysztof B??aszkowski <kb@sysmikro.com.pl>
Cc: Christoph Hellwig <hch@infradead.org>,
	Carlos Maiolino <cmaiolino@redhat.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: freevxfs: hp-ux support. patchset 1-7/7 rev 2
Date: Wed, 1 Jun 2016 00:33:10 -0700	[thread overview]
Message-ID: <20160601073310.GA6787@infradead.org> (raw)
In-Reply-To: <1464702291.900.75.camel@linux-q3cb.site>


Hi Krzysztof,

> I can check but here are my remarks:
> the dip2vip_cpy() does partial byte-swap from file system endian to cpu
> endian, so the union uses fs native endianess and this raises difficulty
> of using struct vxfs_inode_info to yet another level.
> Is this a good practice ? (apart from a benefit like some minor speed
> gain)

It seems easier this way around.  If you think byte swapping makes
life easier for you I'm happy to take an incremental patch.  Howerver
that means we'll need separate structure defintions for the union
members.

> Are there any real benefits from marking anything "bitwise" except that
> it is just another type ?

bitwise is an annotation for sparse so that you can't directly assign
to the variable, and need to use accessors instead.  In this case it's
used so that we are forced to use the byte swapping helpers and get a
warning from sparse if that's not done properly.

> 
> because for some strange reason the patch uses "PAGE_SHIFT" while
> original lookup.c from 3.16 or 3.18 kernels uses PAGE_CACHE_SHIFT but
> 4.6 kernel. so the patch below does not apply cleanly to source from 3.x
> kernels. I use 3.16, double checked latest 3.18.

Yes, PAGE_CACHE_SIZE, PAGE_CACHE_SHIFT and co were removed in kernel
4.6, as they have always been identical to the versions without _CACHE.

> Anyway because readdir() is not aware of fs endianess (because 0004
> patch is not in there) the hp-ux tests will fail with some general
> protection fault very likely.

I think all readdir structures are fixed up now, please check.

> I can't see also patches which fix these obvious bugs like freeing
> kmem_cache_alloc() objects with kfree.
> Even worse is releasing inode->i_private from the "evict_inode"
> callback.
> This leads to dangling objects in vxfs's kmem_cache when the fs is
> unmounted. Destroying cache on module unload causes kmem_cache_destroy
> to complain about it and after a few tries ((module load, mount, some
> ops on mountpoint, unmount, unload) x few times) hard lockup is
> inevitable.

Yeah, this was just getting started.  I've spent some more time on the
whole inode issues and have implemented this a bit different from what
you did, although the end result is very similar.  Can you take a look
at the tree here:

	http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/freevxfs

> Do you think other patches should be updated with regard to the patch
> you sent ?

Please take a look at the branch above.  The only major thing that
should be missing is your directory code refactoring.

  reply	other threads:[~2016-06-01  7:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 14:45 freevxfs: hp-ux support. patchset 1-7/7 Krzysztof Błaszkowski
2016-05-26 15:43 ` freevxfs: hp-ux support. (working) " Krzysztof Błaszkowski
2016-05-26 15:53 ` r Christoph Hellwig
2016-05-26 17:44   ` r Krzysztof Błaszkowski
2016-05-28 19:40 ` freevxfs: hp-ux support. patchset 1-7/7 rev 2 Krzysztof Błaszkowski
2016-05-30 11:19   ` Carlos Maiolino
2016-05-30 11:54     ` Krzysztof Błaszkowski
2016-05-31 12:25   ` Christoph Hellwig
2016-05-31 13:44     ` Krzysztof Błaszkowski
2016-06-01  7:33       ` Christoph Hellwig [this message]
2016-06-01  8:38         ` Krzysztof Błaszkowski
2016-06-01  8:41           ` freevxfs: hp-ux support. patchset r3, 2/4 Krzysztof Błaszkowski
2016-06-01  8:42           ` freevxfs: hp-ux support. patchset r3 3/4 Krzysztof Błaszkowski
2016-06-02  8:32             ` Christoph Hellwig
2016-06-02  9:18               ` Krzysztof Błaszkowski
2016-06-01  8:43           ` freevxfs: hp-ux support. patchset r3 4/4 Krzysztof Błaszkowski
2016-06-01  9:23         ` freevxfs: hp-ux support. patchset 1-7/7 rev 2 Krzysztof Błaszkowski
2016-06-02  8:25           ` Christoph Hellwig
2016-06-02  9:16             ` Krzysztof Błaszkowski
2016-06-10 14:46             ` freevxfs: hp-ux support. ( 1cce17017970c07) patchset 1/4 Krzysztof Błaszkowski
2016-06-01  9:27         ` freevxfs: hp-ux support. patchset 1-7/7 rev 2 Krzysztof Błaszkowski

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=20160601073310.GA6787@infradead.org \
    --to=hch@infradead.org \
    --cc=cmaiolino@redhat.com \
    --cc=kb@sysmikro.com.pl \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

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

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