Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540010 - kernel 3.14.27-hardened - hard link between directories on OCFS2 filesystem returns wrong error code
Summary: kernel 3.14.27-hardened - hard link between directories on OCFS2 filesystem r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 19:15 UTC by Dan Goodliffe
Modified: 2015-02-24 16:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Goodliffe 2015-02-13 19:15:01 UTC
Following a brief email discussion with the courier-imap devs (http://sourceforge.net/p/courier/mailman/message/33395496/) it appears to OCFS2 file systems return ENOENT instead of (probably) EXDEV when attempting to hard link between directories. (This has a knock effect in courier-imap, hence the original report to them)

Reproducible: Always

Steps to Reproduce:
On an OCFS2 mounted file system:
1. mkdir 1 2
2. touch 1/a
3. ln 1/a 2/a
Actual Results:  
ln: failed to create hard link '2/a' => '1/a': No such file or directory

Expected Results:  
ln: failed to create hard link '2/a' => '1/a': Invalid cross device link

(I actually expected it to work, but accept that it isn't supported)

courier-imap already implements a workaround for limitation on AFS.


Portage 2.2.17 (python 3.3.5-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.2, glibc-2.20-r1, 3.14.27-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.14.27-hardened-r1-x86_64-Intel-R-_Core-TM-_i3_CPU_530_@_2.93GHz-with-gentoo-2.2
KiB Mem:     8032708 total,   1180788 free
KiB Swap:    2097148 total,   1886096 free
Timestamp of repository gentoo: Thu, 12 Feb 2015 14:30:01 +0000
sh bash 4.3_p33-r1
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.3_p33-r1::gentoo
dev-lang/perl:            5.20.1-r4::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.9::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.5::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: ssh://portage@portage/usr/portage
    priority: -1000

jmbsvicetto
    location: /var/lib/layman/jmbsvicetto
    masters: gentoo
    priority: 0                                                                           
                                                                                          
RandomLAN                                                                                 
    location: /var/lib/layman/RandomLAN                                                   
    masters: gentoo                                                                       
    priority: 1                                                                           
                                                                                          
ACCEPT_KEYWORDS="amd64 ~amd64"                                                            
ACCEPT_LICENSE="* -@EULA"                                                                 
CBUILD="x86_64-pc-linux-gnu"                                                              
CFLAGS="-O3 -march=native -pipe"                                                          
CHOST="x86_64-pc-linux-gnu"                                                               
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"                            
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"                                                                                         
CXXFLAGS="-O3 -march=native -pipe"                                                        
DISTDIR="/usr/portage/distfiles"                                                          
FCFLAGS="-O2 -pipe"                                                                       
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"                                                                    
FFLAGS="-O2 -pipe"                                                                        
GENTOO_MIRRORS="http://firebrand.random.lan/portage http://defiant.random.lan/portage http://sys.randomdan.homeip.net/"                                                             
LANG="en_GB.utf8"                                                                         
LC_ALL="en_GB.utf8"                                                                       
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                         
MAKEOPTS="-j2"                                                                            
PKGDIR="/usr/portage/packages"                                                            
PORTAGE_CONFIGROOT="/"                                                                    
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/lost+found"                                          
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                              
PORTAGE_TMPDIR="/var/tmp"                                                                 
USE="a52 aac accessibility acl acpi ads amd64 apache2 apm aspell authdaemond autoupdate bash-completion berkdb bzip2 c++0x cairo caps cli consolekit cracklib crypt ctype curl cxx daemon dbus device-mapper disk-partition diskio divx dlna dri dts dv dvb encode exif exiscan exiscan-acl extras fam fastbuild fastcgi ffmpeg filter firmware fontconfig freetype fuse gettext gif git glib graphviz gudev hardened hash hpn iconv icu id3 imagemagick imap imlib innodb inotify ipv6 ithreads jpeg jpeg2k json justify lame lastfm lcms ldap libav libnotify logrotate lvmroot lzma lzo maildir mediaserver mmx mmxext modperl modules motif mp3 mpeg mpeg2 mpeg4 mplayer mpm-prefork mysql mythtv ncurses network network-cron nls no-old-linux nocardbus nocd nojoystick nptl nptlonly nscd nsplugin nuv ocfs2 offensive ogg oggvorbis openssl pam pax_kernel pcre pdf pgmaster png policykit posix postgres python3 qt3support raid readline real realmedia remote session sharedext smp snmp soap sockets spamassassin sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 symlink syslog systemd taglib theora threads threadsafe thumbnail tidy truetype unicode upcall upnp urandom usb utp uuid v4l v4l2 vim-pager vim-syntax vim-with-x win32codecs winbind wmf wmp xattr xcomposite xml xmms xosd xsl xslt xtpax xulrunner xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias filter authz_core auth_basic authz_user authn_core unixd authz_host cgid mime_magic mime autoindex vhost_alias dav dir deflate log_config env rewrite cache socache_shmcb cache_disk status" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DRACUT_MODULES="lvm syslog mdraid" DVB_CARDS="usb-dib0700" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-13 19:26:32 UTC
1) How is this a Gentoo problem?
2) Wouldn't that be fixed in a newer kernel already?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-13 19:27:57 UTC
Looks like: https://lkml.org/lkml/2015/1/27/289
Comment 3 Dan Goodliffe 2015-02-13 19:34:09 UTC
1. It isn't specifically.
2. It isn't in the latest gentoo-sources.

And damn... I looked around previously but took too long before reporting. Never found anything. By the looks of it, I can probably apply that patch to this kernel and test it.
Comment 4 Mike Pagano gentoo-dev 2015-02-14 00:48:05 UTC
It's in gentoo-sources-3.19.0
Comment 5 Dan Goodliffe 2015-02-14 01:02:19 UTC
I've been stuck on 3.14.* for unrelated reasons (the details of which I forget, but ocfs2 again, wouldn't mount r/w on both nodes) but I'll give 3.19 a go when there's a hardened version.

In the meantime, I've got the patch from the link Jeroen provided running in 3.14.27. It's not a clean patch, but it applies without modification and does what it says on the tin.
Comment 6 Anthony Basile gentoo-dev 2015-02-14 12:59:50 UTC
(In reply to Mike Pagano from comment #4)
> It's in gentoo-sources-3.19.0

it will eventually make it into hardened-sources.

@mike this is in -base correct?
Comment 7 Mike Pagano gentoo-dev 2015-02-14 16:20:11 UTC
(In reply to Anthony Basile from comment #6)
> (In reply to Mike Pagano from comment #4)
> > It's in gentoo-sources-3.19.0
> 
> it will eventually make it into hardened-sources.
> 
> @mike this is in -base correct?


Hi, Anthony,

This patch is upstream has was released in 3.19.0.
Comment 8 Mike Pagano gentoo-dev 2015-02-24 16:47:41 UTC
I'm going to close this as 3.19.0 is released (with the patch).  Please reply otherwise if this is not fixed.